diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9ea66a8abf38..4921f83b5d35 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -158,9 +158,6 @@ # ServiceLabel: %Batch # ServiceOwners: @mksuni @bgklein @mscurrell @cRui861 @paterasMSFT @gingi @dpwatrous -# ServiceLabel: %BatchAI -# ServiceOwners: @matthchr - # ServiceLabel: %Billing # ServiceOwners: @cabbpt diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt index a8fe028ca1af..03f82283d9b4 100644 --- a/eng/versioning/external_dependencies.txt +++ b/eng/versioning/external_dependencies.txt @@ -33,7 +33,6 @@ com.microsoft.azure:azure-client-runtime;1.7.14 com.microsoft.azure:azure-core;0.9.8 com.microsoft.azure:azure-keyvault-cryptography;1.2.2 com.microsoft.azure:qpid-proton-j-extensions;1.2.5 -com.microsoft.azure.sdk.iot:iot-service-client;1.30.0 com.microsoft.sqlserver:mssql-jdbc;10.2.3.jre8 com.microsoft.azure:azure-functions-maven-plugin;1.30.0 com.microsoft.azure.functions:azure-functions-java-library;2.2.0 diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index c1184dbef8b2..1f2c7da4fb44 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -148,7 +148,6 @@ com.azure:azure-maps-geolocation;1.0.0-beta.3;1.0.0-beta.4 com.azure:azure-maps-render;2.0.0-beta.2;2.0.0-beta.3 com.azure:azure-maps-route;1.0.0-beta.3;1.0.0-beta.4 com.azure:azure-maps-search;2.0.0-beta.2;2.0.0-beta.3 -com.azure:azure-media-videoanalyzer-edge;1.0.0-beta.6;1.0.0-beta.7 com.azure:azure-messaging-eventgrid;4.27.0;4.28.0-beta.1 com.azure:azure-messaging-eventgrid-namespaces;1.1.1;1.2.0-beta.1 com.azure:azure-messaging-eventgrid-cloudnative-cloudevents;1.0.0-beta.1;1.0.0-beta.2 @@ -334,7 +333,6 @@ com.azure.resourcemanager:azure-resourcemanager-avs;1.2.0;1.3.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-consumption;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-commerce;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-billing;1.0.0;1.1.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-batchai;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-signalr;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-cognitiveservices;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-customerinsights;1.0.0-beta.3;1.0.0-beta.4 @@ -347,7 +345,6 @@ com.azure.resourcemanager:azure-resourcemanager-healthcareapis;1.2.0;1.3.0-beta. com.azure.resourcemanager:azure-resourcemanager-hybridcompute;1.0.0;1.1.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-logic;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-maintenance;1.0.0;1.1.0-beta.3 -com.azure.resourcemanager:azure-resourcemanager-machinelearningservices;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-mariadb;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-servicefabric;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-peering;1.0.0;1.1.0-beta.1 @@ -355,7 +352,6 @@ com.azure.resourcemanager:azure-resourcemanager-policyinsights;1.0.0;1.1.0-beta. com.azure.resourcemanager:azure-resourcemanager-support;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-subscription;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-powerbidedicated;1.0.0;1.1.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-storageimportexport;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-applicationinsights;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-deploymentmanager;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-notificationhubs;1.0.0;1.1.0-beta.1 @@ -370,7 +366,6 @@ com.azure.resourcemanager:azure-resourcemanager-iotcentral;1.0.0;1.1.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-labservices;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-vmwarecloudsimple;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-managedapplications;1.0.0;1.1.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-videoanalyzer;1.0.0-beta.5;1.0.0-beta.6 com.azure.resourcemanager:azure-resourcemanager-imagebuilder;1.2.0;1.3.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-maps;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-botservice;1.0.0;1.1.0-beta.1 diff --git a/pom.xml b/pom.xml index 6d0fed5556e4..dc168bbfdc6a 100644 --- a/pom.xml +++ b/pom.xml @@ -34,7 +34,6 @@ sdk/azurestackhci sdk/baremetalinfrastructure sdk/batch - sdk/batchai sdk/billing sdk/billingbenefits sdk/boms @@ -131,7 +130,6 @@ sdk/logic sdk/logz sdk/machinelearning - sdk/machinelearningservices sdk/maintenance sdk/managedapplications sdk/managednetworkfabric @@ -213,7 +211,6 @@ sdk/storage sdk/storageactions sdk/storagecache - sdk/storageimportexport sdk/storagemover sdk/storagepool sdk/streamanalytics @@ -228,7 +225,6 @@ sdk/tools sdk/translation sdk/trustedsigning - sdk/videoanalyzer sdk/vision sdk/vmwarecloudsimple sdk/voiceservices diff --git a/sdk/batchai/azure-resourcemanager-batchai/CHANGELOG.md b/sdk/batchai/azure-resourcemanager-batchai/CHANGELOG.md deleted file mode 100644 index eb7a02deeff7..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/CHANGELOG.md +++ /dev/null @@ -1,8 +0,0 @@ -# Release History - -## 1.0.0-beta.2 (Unreleased) - - -## 1.0.0-beta.1 (2021-04-14) - -- Azure Resource Manager BatchAI client library for Java. This package contains Microsoft Azure SDK for BatchAI Management SDK. The Azure BatchAI Management API. Package tag package-2018-05. 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/batchai/azure-resourcemanager-batchai/README.md b/sdk/batchai/azure-resourcemanager-batchai/README.md deleted file mode 100644 index 16884167d43a..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/README.md +++ /dev/null @@ -1,99 +0,0 @@ -# Azure Resource Manager BatchAI client library for Java - -Azure Resource Manager BatchAI client library for Java. - -This package contains Microsoft Azure SDK for BatchAI Management SDK. The Azure BatchAI Management API. Package tag package-2018-05. 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-batchai;current}) -```xml - - com.azure.resourcemanager - azure-resourcemanager-batchai - 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(); -BatchAIManager manager = BatchAIManager - .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 - -## 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://learn.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/batchai/azure-resourcemanager-batchai/pom.xml b/sdk/batchai/azure-resourcemanager-batchai/pom.xml deleted file mode 100644 index 0941c520b7eb..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - - - com.azure.resourcemanager - azure-resourcemanager-batchai - 1.0.0-beta.2 - jar - - Microsoft Azure SDK for BatchAI Management - This package contains Microsoft Azure SDK for BatchAI Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure BatchAI Management API. Package tag package-2018-05. - - 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 - - - - - - com.azure - azure-core - 1.54.1 - - - com.azure - azure-core-management - 1.15.6 - - - diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/BatchAIManager.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/BatchAIManager.java deleted file mode 100644 index a93ebc951a5c..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/BatchAIManager.java +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai; - -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.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; -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.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.fluent.BatchAI; -import com.azure.resourcemanager.batchai.implementation.BatchAIBuilder; -import com.azure.resourcemanager.batchai.implementation.ClustersImpl; -import com.azure.resourcemanager.batchai.implementation.ExperimentsImpl; -import com.azure.resourcemanager.batchai.implementation.FileServersImpl; -import com.azure.resourcemanager.batchai.implementation.JobsImpl; -import com.azure.resourcemanager.batchai.implementation.OperationsImpl; -import com.azure.resourcemanager.batchai.implementation.UsagesImpl; -import com.azure.resourcemanager.batchai.implementation.WorkspacesImpl; -import com.azure.resourcemanager.batchai.models.Clusters; -import com.azure.resourcemanager.batchai.models.Experiments; -import com.azure.resourcemanager.batchai.models.FileServers; -import com.azure.resourcemanager.batchai.models.Jobs; -import com.azure.resourcemanager.batchai.models.Operations; -import com.azure.resourcemanager.batchai.models.Usages; -import com.azure.resourcemanager.batchai.models.Workspaces; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Entry point to BatchAIManager. The Azure BatchAI Management API. */ -public final class BatchAIManager { - private Operations operations; - - private Usages usages; - - private Workspaces workspaces; - - private Experiments experiments; - - private Jobs jobs; - - private FileServers fileServers; - - private Clusters clusters; - - private final BatchAI clientObject; - - private BatchAIManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new BatchAIBuilder().pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of BatchAI service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the BatchAI service API instance. - */ - public static BatchAIManager 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 BatchAIManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new BatchAIManager.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 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; - } - - /** - * 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 BatchAI service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the BatchAI service API instance. - */ - public BatchAIManager 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.batchai") - .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 (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new RequestIdPolicy()); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new BearerTokenAuthenticationPolicy(credential, - profile.getEnvironment().getManagementEndpoint() + "/.default")); - policies.addAll(this.policies); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new BatchAIManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** @return Resource collection API of Operations. */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** @return Resource collection API of Usages. */ - public Usages usages() { - if (this.usages == null) { - this.usages = new UsagesImpl(clientObject.getUsages(), this); - } - return usages; - } - - /** @return Resource collection API of Workspaces. */ - public Workspaces workspaces() { - if (this.workspaces == null) { - this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this); - } - return workspaces; - } - - /** @return Resource collection API of Experiments. */ - public Experiments experiments() { - if (this.experiments == null) { - this.experiments = new ExperimentsImpl(clientObject.getExperiments(), this); - } - return experiments; - } - - /** @return Resource collection API of Jobs. */ - public Jobs jobs() { - if (this.jobs == null) { - this.jobs = new JobsImpl(clientObject.getJobs(), this); - } - return jobs; - } - - /** @return Resource collection API of FileServers. */ - public FileServers fileServers() { - if (this.fileServers == null) { - this.fileServers = new FileServersImpl(clientObject.getFileServers(), this); - } - return fileServers; - } - - /** @return Resource collection API of Clusters. */ - public Clusters clusters() { - if (this.clusters == null) { - this.clusters = new ClustersImpl(clientObject.getClusters(), this); - } - return clusters; - } - - /** - * @return Wrapped service client BatchAI providing direct access to the underlying auto-generated API - * implementation, based on Azure REST API. - */ - public BatchAI serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/BatchAI.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/BatchAI.java deleted file mode 100644 index 94b94d1556b6..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/BatchAI.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** The interface for BatchAI class. */ -public interface BatchAI { - /** - * Gets The subscriptionID for the Azure user. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the UsagesClient object to access its operations. - * - * @return the UsagesClient object. - */ - UsagesClient getUsages(); - - /** - * Gets the WorkspacesClient object to access its operations. - * - * @return the WorkspacesClient object. - */ - WorkspacesClient getWorkspaces(); - - /** - * Gets the ExperimentsClient object to access its operations. - * - * @return the ExperimentsClient object. - */ - ExperimentsClient getExperiments(); - - /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. - */ - JobsClient getJobs(); - - /** - * Gets the FileServersClient object to access its operations. - * - * @return the FileServersClient object. - */ - FileServersClient getFileServers(); - - /** - * Gets the ClustersClient object to access its operations. - * - * @return the ClustersClient object. - */ - ClustersClient getClusters(); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/ClustersClient.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/ClustersClient.java deleted file mode 100644 index 247cfbb903d0..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/ClustersClient.java +++ /dev/null @@ -1,310 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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.batchai.fluent.models.ClusterInner; -import com.azure.resourcemanager.batchai.fluent.models.RemoteLoginInformationInner; -import com.azure.resourcemanager.batchai.models.ClusterCreateParameters; -import com.azure.resourcemanager.batchai.models.ClusterUpdateParameters; - -/** An instance of this class provides access to all the operations defined in ClustersClient. */ -public interface ClustersClient { - /** - * Creates a Cluster in the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters The parameters to provide for the Cluster creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ClusterInner> beginCreate(String resourceGroupName, String workspaceName, - String clusterName, ClusterCreateParameters parameters); - - /** - * Creates a Cluster in the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters The parameters to provide for the Cluster creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ClusterInner> beginCreate(String resourceGroupName, String workspaceName, - String clusterName, ClusterCreateParameters parameters, Context context); - - /** - * Creates a Cluster in the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters The parameters to provide for the Cluster creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner create(String resourceGroupName, String workspaceName, String clusterName, - ClusterCreateParameters parameters); - - /** - * Creates a Cluster in the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters The parameters to provide for the Cluster creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner create(String resourceGroupName, String workspaceName, String clusterName, - ClusterCreateParameters parameters, Context context); - - /** - * Updates properties of a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner update(String resourceGroupName, String workspaceName, String clusterName, - ClusterUpdateParameters parameters); - - /** - * Updates properties of a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String workspaceName, String clusterName, - ClusterUpdateParameters parameters, Context context); - - /** - * Deletes a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String clusterName); - - /** - * Deletes a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String clusterName, - Context context); - - /** - * Deletes a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String clusterName); - - /** - * Deletes a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String clusterName, Context context); - - /** - * Gets information about a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner get(String resourceGroupName, String workspaceName, String clusterName); - - /** - * Gets information about a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String clusterName, - Context context); - - /** - * Get the IP address, port of all the compute nodes in the Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP address, port of all the compute nodes in the Cluster. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRemoteLoginInformation(String resourceGroupName, - String workspaceName, String clusterName); - - /** - * Get the IP address, port of all the compute nodes in the Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP address, port of all the compute nodes in the Cluster. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRemoteLoginInformation(String resourceGroupName, - String workspaceName, String clusterName, Context context); - - /** - * Gets information about Clusters associated with the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Clusters associated with the given Workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); - - /** - * Gets information about Clusters associated with the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Clusters associated with the given Workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Integer maxResults, - Context context); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/ExperimentsClient.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/ExperimentsClient.java deleted file mode 100644 index 611104ce182e..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/ExperimentsClient.java +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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.batchai.fluent.models.ExperimentInner; - -/** An instance of this class provides access to all the operations defined in ExperimentsClient. */ -public interface ExperimentsClient { - /** - * Gets a list of Experiments within the specified Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments within the specified Workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); - - /** - * Gets a list of Experiments within the specified Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments within the specified Workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Integer maxResults, - Context context); - - /** - * Creates an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return experiment information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ExperimentInner> beginCreate(String resourceGroupName, String workspaceName, - String experimentName); - - /** - * Creates an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return experiment information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ExperimentInner> beginCreate(String resourceGroupName, String workspaceName, - String experimentName, Context context); - - /** - * Creates an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return experiment information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ExperimentInner create(String resourceGroupName, String workspaceName, String experimentName); - - /** - * Creates an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return experiment information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ExperimentInner create(String resourceGroupName, String workspaceName, String experimentName, Context context); - - /** - * Deletes an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String experimentName); - - /** - * Deletes an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String experimentName, Context context); - - /** - * Deletes an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String experimentName); - - /** - * Deletes an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String experimentName, Context context); - - /** - * Gets information about an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 an Experiment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ExperimentInner get(String resourceGroupName, String workspaceName, String experimentName); - - /** - * Gets information about an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 an Experiment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String experimentName, - Context context); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/FileServersClient.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/FileServersClient.java deleted file mode 100644 index 709fd144dd4a..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/FileServersClient.java +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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.batchai.fluent.models.FileServerInner; -import com.azure.resourcemanager.batchai.models.FileServerCreateParameters; - -/** An instance of this class provides access to all the operations defined in FileServersClient. */ -public interface FileServersClient { - /** - * Creates a File Server in the given workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param parameters The parameters to provide for File Server creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return file Server information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, FileServerInner> beginCreate(String resourceGroupName, String workspaceName, - String fileServerName, FileServerCreateParameters parameters); - - /** - * Creates a File Server in the given workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param parameters The parameters to provide for File Server creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return file Server information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, FileServerInner> beginCreate(String resourceGroupName, String workspaceName, - String fileServerName, FileServerCreateParameters parameters, Context context); - - /** - * Creates a File Server in the given workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param parameters The parameters to provide for File Server creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return file Server information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FileServerInner create(String resourceGroupName, String workspaceName, String fileServerName, - FileServerCreateParameters parameters); - - /** - * Creates a File Server in the given workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param parameters The parameters to provide for File Server creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return file Server information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FileServerInner create(String resourceGroupName, String workspaceName, String fileServerName, - FileServerCreateParameters parameters, Context context); - - /** - * Deletes a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String fileServerName); - - /** - * Deletes a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String fileServerName, Context context); - - /** - * Deletes a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String fileServerName); - - /** - * Deletes a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String fileServerName, Context context); - - /** - * Gets information about a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a File Server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FileServerInner get(String resourceGroupName, String workspaceName, String fileServerName); - - /** - * Gets information about a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a File Server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String fileServerName, - Context context); - - /** - * Gets a list of File Servers associated with the specified workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of File Servers associated with the specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); - - /** - * Gets a list of File Servers associated with the specified workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of File Servers associated with the specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Integer maxResults, - Context context); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/JobsClient.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/JobsClient.java deleted file mode 100644 index 43ddfeb26b1d..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/JobsClient.java +++ /dev/null @@ -1,432 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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.batchai.fluent.models.FileInner; -import com.azure.resourcemanager.batchai.fluent.models.JobInner; -import com.azure.resourcemanager.batchai.fluent.models.RemoteLoginInformationInner; -import com.azure.resourcemanager.batchai.models.JobCreateParameters; - -/** An instance of this class provides access to all the operations defined in JobsClient. */ -public interface JobsClient { - /** - * Gets a list of Jobs within the specified Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Jobs within the specified Experiment. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByExperiment(String resourceGroupName, String workspaceName, String experimentName); - - /** - * Gets a list of Jobs within the specified Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Jobs within the specified Experiment. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByExperiment(String resourceGroupName, String workspaceName, String experimentName, - Integer maxResults, Context context); - - /** - * Creates a Job in the given Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param parameters The parameters to provide for job creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, JobInner> beginCreate(String resourceGroupName, String workspaceName, - String experimentName, String jobName, JobCreateParameters parameters); - - /** - * Creates a Job in the given Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param parameters The parameters to provide for job creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, JobInner> beginCreate(String resourceGroupName, String workspaceName, - String experimentName, String jobName, JobCreateParameters parameters, Context context); - - /** - * Creates a Job in the given Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param parameters The parameters to provide for job creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner create(String resourceGroupName, String workspaceName, String experimentName, String jobName, - JobCreateParameters parameters); - - /** - * Creates a Job in the given Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param parameters The parameters to provide for job creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner create(String resourceGroupName, String workspaceName, String experimentName, String jobName, - JobCreateParameters parameters, Context context); - - /** - * Deletes a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String experimentName, String jobName); - - /** - * Deletes a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String experimentName, String jobName, Context context); - - /** - * Deletes a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String experimentName, String jobName); - - /** - * Deletes a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String experimentName, String jobName, Context context); - - /** - * Gets information about a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner get(String resourceGroupName, String workspaceName, String experimentName, String jobName); - - /** - * Gets information about a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String experimentName, - String jobName, Context context); - - /** - * List all directories and files inside the given directory of the Job's output directory (if the output directory - * is on Azure File Share or Azure Storage Container). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param outputdirectoryid Id of the job output directory. This is the OutputDirectory-->id parameter that is - * given by the user during Create Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listOutputFiles(String resourceGroupName, String workspaceName, String experimentName, - String jobName, String outputdirectoryid); - - /** - * List all directories and files inside the given directory of the Job's output directory (if the output directory - * is on Azure File Share or Azure Storage Container). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param outputdirectoryid Id of the job output directory. This is the OutputDirectory-->id parameter that is - * given by the user during Create Job. - * @param directory The path to the directory. - * @param linkexpiryinminutes The number of minutes after which the download link will expire. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listOutputFiles(String resourceGroupName, String workspaceName, String experimentName, - String jobName, String outputdirectoryid, String directory, Integer linkexpiryinminutes, Integer maxResults, - Context context); - - /** - * Gets a list of currently existing nodes which were used for the Job execution. The returned information contains - * the node ID, its public IP and SSH port. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of currently existing nodes which were used for the Job execution. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRemoteLoginInformation(String resourceGroupName, - String workspaceName, String experimentName, String jobName); - - /** - * Gets a list of currently existing nodes which were used for the Job execution. The returned information contains - * the node ID, its public IP and SSH port. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of currently existing nodes which were used for the Job execution. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRemoteLoginInformation(String resourceGroupName, - String workspaceName, String experimentName, String jobName, Context context); - - /** - * Terminates a job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - SyncPoller, Void> beginTerminate(String resourceGroupName, String workspaceName, - String experimentName, String jobName); - - /** - * Terminates a job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - SyncPoller, Void> beginTerminate(String resourceGroupName, String workspaceName, - String experimentName, String jobName, Context context); - - /** - * Terminates a job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 terminate(String resourceGroupName, String workspaceName, String experimentName, String jobName); - - /** - * Terminates a job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 terminate(String resourceGroupName, String workspaceName, String experimentName, String jobName, - Context context); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/OperationsClient.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/OperationsClient.java deleted file mode 100644 index 9db1904fce77..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/OperationsClient.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batchai.fluent.models.OperationInner; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public interface OperationsClient { - /** - * Lists available operations for the Microsoft.BatchAI provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the list of all operations supported by BatchAI resource provider. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists available operations for the Microsoft.BatchAI provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the list of all operations supported by BatchAI resource provider. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/UsagesClient.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/UsagesClient.java deleted file mode 100644 index 636acc0e52bf..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/UsagesClient.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batchai.fluent.models.UsageInner; - -/** An instance of this class provides access to all the operations defined in UsagesClient. */ -public interface UsagesClient { - /** - * Gets the current usage information as well as limits for Batch AI resources for given subscription. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for Batch AI resources for given subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location); - - /** - * Gets the current usage information as well as limits for Batch AI resources for given subscription. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for Batch AI resources for given subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location, Context context); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/WorkspacesClient.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/WorkspacesClient.java deleted file mode 100644 index 7eb364d4ef50..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/WorkspacesClient.java +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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.batchai.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.batchai.models.WorkspaceCreateParameters; -import com.azure.resourcemanager.batchai.models.WorkspaceUpdateParameters; - -/** An instance of this class provides access to all the operations defined in WorkspacesClient. */ -public interface WorkspacesClient { - /** - * Gets a list of Workspaces associated with the given subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces associated with the given subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Gets a list of Workspaces associated with the given subscription. - * - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces associated with the given subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Integer maxResults, Context context); - - /** - * Gets a list of Workspaces within the specified resource group. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces within the specified resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Gets a list of Workspaces within the specified resource group. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces within the specified resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Integer maxResults, Context context); - - /** - * Creates a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Workspace creation parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, WorkspaceInner> beginCreate(String resourceGroupName, String workspaceName, - WorkspaceCreateParameters parameters); - - /** - * Creates a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Workspace creation parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, WorkspaceInner> beginCreate(String resourceGroupName, String workspaceName, - WorkspaceCreateParameters parameters, Context context); - - /** - * Creates a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Workspace creation parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner create(String resourceGroupName, String workspaceName, WorkspaceCreateParameters parameters); - - /** - * Creates a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Workspace creation parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner create(String resourceGroupName, String workspaceName, WorkspaceCreateParameters parameters, - Context context); - - /** - * Updates properties of a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Additional parameters for workspace update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters); - - /** - * Updates properties of a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Additional parameters for workspace update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters, Context context); - - /** - * Deletes a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName); - - /** - * Deletes a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, Context context); - - /** - * Deletes a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName); - - /** - * Deletes a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets information about a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); - - /** - * Gets information about a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, - Context context); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/ClusterInner.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/ClusterInner.java deleted file mode 100644 index 76fcfe5ef654..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/ClusterInner.java +++ /dev/null @@ -1,393 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.models.AllocationState; -import com.azure.resourcemanager.batchai.models.BatchAIError; -import com.azure.resourcemanager.batchai.models.NodeSetup; -import com.azure.resourcemanager.batchai.models.NodeStateCounts; -import com.azure.resourcemanager.batchai.models.ProvisioningState; -import com.azure.resourcemanager.batchai.models.ResourceId; -import com.azure.resourcemanager.batchai.models.ScaleSettings; -import com.azure.resourcemanager.batchai.models.UserAccountSettings; -import com.azure.resourcemanager.batchai.models.VirtualMachineConfiguration; -import com.azure.resourcemanager.batchai.models.VmPriority; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Information about a Cluster. */ -@JsonFlatten -@Fluent -public class ClusterInner extends ProxyResource { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ClusterInner.class); - - /* - * The size of the virtual machines in the cluster. All nodes in a cluster - * have the same VM size. - */ - @JsonProperty(value = "properties.vmSize") - private String vmSize; - - /* - * VM priority of cluster nodes. - */ - @JsonProperty(value = "properties.vmPriority") - private VmPriority vmPriority; - - /* - * Scale settings of the cluster. - */ - @JsonProperty(value = "properties.scaleSettings") - private ScaleSettings scaleSettings; - - /* - * Virtual machine configuration (OS image) of the compute nodes. All nodes - * in a cluster have the same OS image configuration. - */ - @JsonProperty(value = "properties.virtualMachineConfiguration") - private VirtualMachineConfiguration virtualMachineConfiguration; - - /* - * Setup (mount file systems, performance counters settings and custom - * setup task) to be performed on each compute node in the cluster. - */ - @JsonProperty(value = "properties.nodeSetup") - private NodeSetup nodeSetup; - - /* - * Administrator user account settings which can be used to SSH to compute - * nodes. - */ - @JsonProperty(value = "properties.userAccountSettings") - private UserAccountSettings userAccountSettings; - - /* - * Virtual network subnet resource ID the cluster nodes belong to. - */ - @JsonProperty(value = "properties.subnet") - private ResourceId subnet; - - /* - * The time when the cluster was created. - */ - @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationTime; - - /* - * Provisioning state of the cluster. Possible value are: creating - - * Specifies that the cluster is being created. succeeded - Specifies that - * the cluster has been created successfully. failed - Specifies that the - * cluster creation has failed. deleting - Specifies that the cluster is - * being deleted. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * Time when the provisioning state was changed. - */ - @JsonProperty(value = "properties.provisioningStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime provisioningStateTransitionTime; - - /* - * Allocation state of the cluster. Possible values are: steady - Indicates - * that the cluster is not resizing. There are no changes to the number of - * compute nodes in the cluster in progress. A cluster enters this state - * when it is created and when no operations are being performed on the - * cluster to change the number of compute nodes. resizing - Indicates that - * the cluster is resizing; that is, compute nodes are being added to or - * removed from the cluster. - */ - @JsonProperty(value = "properties.allocationState", access = JsonProperty.Access.WRITE_ONLY) - private AllocationState allocationState; - - /* - * The time at which the cluster entered its current allocation state. - */ - @JsonProperty(value = "properties.allocationStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime allocationStateTransitionTime; - - /* - * Collection of errors encountered by various compute nodes during node - * setup. - */ - @JsonProperty(value = "properties.errors", access = JsonProperty.Access.WRITE_ONLY) - private List errors; - - /* - * The number of compute nodes currently assigned to the cluster. - */ - @JsonProperty(value = "properties.currentNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer currentNodeCount; - - /* - * Counts of various node states on the cluster. - */ - @JsonProperty(value = "properties.nodeStateCounts", access = JsonProperty.Access.WRITE_ONLY) - private NodeStateCounts nodeStateCounts; - - /** - * Get the vmSize property: The size of the virtual machines in the cluster. All nodes in a cluster have the same VM - * size. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: The size of the virtual machines in the cluster. All nodes in a cluster have the same VM - * size. - * - * @param vmSize the vmSize value to set. - * @return the ClusterInner object itself. - */ - public ClusterInner withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the vmPriority property: VM priority of cluster nodes. - * - * @return the vmPriority value. - */ - public VmPriority vmPriority() { - return this.vmPriority; - } - - /** - * Set the vmPriority property: VM priority of cluster nodes. - * - * @param vmPriority the vmPriority value to set. - * @return the ClusterInner object itself. - */ - public ClusterInner withVmPriority(VmPriority vmPriority) { - this.vmPriority = vmPriority; - return this; - } - - /** - * Get the scaleSettings property: Scale settings of the cluster. - * - * @return the scaleSettings value. - */ - public ScaleSettings scaleSettings() { - return this.scaleSettings; - } - - /** - * Set the scaleSettings property: Scale settings of the cluster. - * - * @param scaleSettings the scaleSettings value to set. - * @return the ClusterInner object itself. - */ - public ClusterInner withScaleSettings(ScaleSettings scaleSettings) { - this.scaleSettings = scaleSettings; - return this; - } - - /** - * Get the virtualMachineConfiguration property: Virtual machine configuration (OS image) of the compute nodes. All - * nodes in a cluster have the same OS image configuration. - * - * @return the virtualMachineConfiguration value. - */ - public VirtualMachineConfiguration virtualMachineConfiguration() { - return this.virtualMachineConfiguration; - } - - /** - * Set the virtualMachineConfiguration property: Virtual machine configuration (OS image) of the compute nodes. All - * nodes in a cluster have the same OS image configuration. - * - * @param virtualMachineConfiguration the virtualMachineConfiguration value to set. - * @return the ClusterInner object itself. - */ - public ClusterInner withVirtualMachineConfiguration(VirtualMachineConfiguration virtualMachineConfiguration) { - this.virtualMachineConfiguration = virtualMachineConfiguration; - return this; - } - - /** - * Get the nodeSetup property: Setup (mount file systems, performance counters settings and custom setup task) to be - * performed on each compute node in the cluster. - * - * @return the nodeSetup value. - */ - public NodeSetup nodeSetup() { - return this.nodeSetup; - } - - /** - * Set the nodeSetup property: Setup (mount file systems, performance counters settings and custom setup task) to be - * performed on each compute node in the cluster. - * - * @param nodeSetup the nodeSetup value to set. - * @return the ClusterInner object itself. - */ - public ClusterInner withNodeSetup(NodeSetup nodeSetup) { - this.nodeSetup = nodeSetup; - return this; - } - - /** - * Get the userAccountSettings property: Administrator user account settings which can be used to SSH to compute - * nodes. - * - * @return the userAccountSettings value. - */ - public UserAccountSettings userAccountSettings() { - return this.userAccountSettings; - } - - /** - * Set the userAccountSettings property: Administrator user account settings which can be used to SSH to compute - * nodes. - * - * @param userAccountSettings the userAccountSettings value to set. - * @return the ClusterInner object itself. - */ - public ClusterInner withUserAccountSettings(UserAccountSettings userAccountSettings) { - this.userAccountSettings = userAccountSettings; - return this; - } - - /** - * Get the subnet property: Virtual network subnet resource ID the cluster nodes belong to. - * - * @return the subnet value. - */ - public ResourceId subnet() { - return this.subnet; - } - - /** - * Set the subnet property: Virtual network subnet resource ID the cluster nodes belong to. - * - * @param subnet the subnet value to set. - * @return the ClusterInner object itself. - */ - public ClusterInner withSubnet(ResourceId subnet) { - this.subnet = subnet; - return this; - } - - /** - * Get the creationTime property: The time when the cluster was created. - * - * @return the creationTime value. - */ - public OffsetDateTime creationTime() { - return this.creationTime; - } - - /** - * Get the provisioningState property: Provisioning state of the cluster. Possible value are: creating - Specifies - * that the cluster is being created. succeeded - Specifies that the cluster has been created successfully. failed - - * Specifies that the cluster creation has failed. deleting - Specifies that the cluster is being deleted. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the provisioningStateTransitionTime property: Time when the provisioning state was changed. - * - * @return the provisioningStateTransitionTime value. - */ - public OffsetDateTime provisioningStateTransitionTime() { - return this.provisioningStateTransitionTime; - } - - /** - * Get the allocationState property: Allocation state of the cluster. Possible values are: steady - Indicates that - * the cluster is not resizing. There are no changes to the number of compute nodes in the cluster in progress. A - * cluster enters this state when it is created and when no operations are being performed on the cluster to change - * the number of compute nodes. resizing - Indicates that the cluster is resizing; that is, compute nodes are being - * added to or removed from the cluster. - * - * @return the allocationState value. - */ - public AllocationState allocationState() { - return this.allocationState; - } - - /** - * Get the allocationStateTransitionTime property: The time at which the cluster entered its current allocation - * state. - * - * @return the allocationStateTransitionTime value. - */ - public OffsetDateTime allocationStateTransitionTime() { - return this.allocationStateTransitionTime; - } - - /** - * Get the errors property: Collection of errors encountered by various compute nodes during node setup. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Get the currentNodeCount property: The number of compute nodes currently assigned to the cluster. - * - * @return the currentNodeCount value. - */ - public Integer currentNodeCount() { - return this.currentNodeCount; - } - - /** - * Get the nodeStateCounts property: Counts of various node states on the cluster. - * - * @return the nodeStateCounts value. - */ - public NodeStateCounts nodeStateCounts() { - return this.nodeStateCounts; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scaleSettings() != null) { - scaleSettings().validate(); - } - if (virtualMachineConfiguration() != null) { - virtualMachineConfiguration().validate(); - } - if (nodeSetup() != null) { - nodeSetup().validate(); - } - if (userAccountSettings() != null) { - userAccountSettings().validate(); - } - if (subnet() != null) { - subnet().validate(); - } - if (errors() != null) { - errors().forEach(e -> e.validate()); - } - if (nodeStateCounts() != null) { - nodeStateCounts().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/ExperimentInner.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/ExperimentInner.java deleted file mode 100644 index 13926eb05b8f..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/ExperimentInner.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Experiment information. */ -@JsonFlatten -@Immutable -public class ExperimentInner extends ProxyResource { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ExperimentInner.class); - - /* - * Time when the Experiment was created. - */ - @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationTime; - - /* - * The provisioned state of the experiment - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * The time at which the experiment entered its current provisioning state. - */ - @JsonProperty(value = "properties.provisioningStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime provisioningStateTransitionTime; - - /** - * Get the creationTime property: Time when the Experiment was created. - * - * @return the creationTime value. - */ - public OffsetDateTime creationTime() { - return this.creationTime; - } - - /** - * Get the provisioningState property: The provisioned state of the experiment. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the provisioningStateTransitionTime property: The time at which the experiment entered its current - * provisioning state. - * - * @return the provisioningStateTransitionTime value. - */ - public OffsetDateTime provisioningStateTransitionTime() { - return this.provisioningStateTransitionTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/FileInner.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/FileInner.java deleted file mode 100644 index 2c53a79fc770..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/FileInner.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.models.FileType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Properties of the file or directory. */ -@JsonFlatten -@Immutable -public class FileInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(FileInner.class); - - /* - * Name of the file. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * Type of the file. Possible values are file and directory. - */ - @JsonProperty(value = "fileType", access = JsonProperty.Access.WRITE_ONLY) - private FileType fileType; - - /* - * URL to download the corresponding file. The downloadUrl is not returned - * for directories. - */ - @JsonProperty(value = "downloadUrl", access = JsonProperty.Access.WRITE_ONLY) - private String downloadUrl; - - /* - * The time at which the file was last modified. - */ - @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModified; - - /* - * The file of the size. - */ - @JsonProperty(value = "properties.contentLength", access = JsonProperty.Access.WRITE_ONLY) - private Long contentLength; - - /** - * Get the name property: Name of the file. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the fileType property: Type of the file. Possible values are file and directory. - * - * @return the fileType value. - */ - public FileType fileType() { - return this.fileType; - } - - /** - * Get the downloadUrl property: URL to download the corresponding file. The downloadUrl is not returned for - * directories. - * - * @return the downloadUrl value. - */ - public String downloadUrl() { - return this.downloadUrl; - } - - /** - * Get the lastModified property: The time at which the file was last modified. - * - * @return the lastModified value. - */ - public OffsetDateTime lastModified() { - return this.lastModified; - } - - /** - * Get the contentLength property: The file of the size. - * - * @return the contentLength value. - */ - public Long contentLength() { - return this.contentLength; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/FileServerInner.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/FileServerInner.java deleted file mode 100644 index e05bdfef6e9a..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/FileServerInner.java +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.models.DataDisks; -import com.azure.resourcemanager.batchai.models.FileServerProvisioningState; -import com.azure.resourcemanager.batchai.models.MountSettings; -import com.azure.resourcemanager.batchai.models.ResourceId; -import com.azure.resourcemanager.batchai.models.SshConfiguration; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** File Server information. */ -@JsonFlatten -@Fluent -public class FileServerInner extends ProxyResource { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(FileServerInner.class); - - /* - * VM size of the File Server. - */ - @JsonProperty(value = "properties.vmSize") - private String vmSize; - - /* - * SSH configuration for accessing the File Server node. - */ - @JsonProperty(value = "properties.sshConfiguration") - private SshConfiguration sshConfiguration; - - /* - * Information about disks attached to File Server VM. - */ - @JsonProperty(value = "properties.dataDisks") - private DataDisks dataDisks; - - /* - * File Server virtual network subnet resource ID. - */ - @JsonProperty(value = "properties.subnet") - private ResourceId subnet; - - /* - * File Server mount settings. - */ - @JsonProperty(value = "properties.mountSettings", access = JsonProperty.Access.WRITE_ONLY) - private MountSettings mountSettings; - - /* - * Time when the provisioning state was changed. - */ - @JsonProperty(value = "properties.provisioningStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime provisioningStateTransitionTime; - - /* - * Time when the FileServer was created. - */ - @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationTime; - - /* - * Provisioning state of the File Server. Possible values: creating - The - * File Server is getting created; updating - The File Server creation has - * been accepted and it is getting updated; deleting - The user has - * requested that the File Server be deleted, and it is in the process of - * being deleted; failed - The File Server creation has failed with the - * specified error code. Details about the error code are specified in the - * message field; succeeded - The File Server creation has succeeded. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private FileServerProvisioningState provisioningState; - - /** - * Get the vmSize property: VM size of the File Server. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: VM size of the File Server. - * - * @param vmSize the vmSize value to set. - * @return the FileServerInner object itself. - */ - public FileServerInner withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the sshConfiguration property: SSH configuration for accessing the File Server node. - * - * @return the sshConfiguration value. - */ - public SshConfiguration sshConfiguration() { - return this.sshConfiguration; - } - - /** - * Set the sshConfiguration property: SSH configuration for accessing the File Server node. - * - * @param sshConfiguration the sshConfiguration value to set. - * @return the FileServerInner object itself. - */ - public FileServerInner withSshConfiguration(SshConfiguration sshConfiguration) { - this.sshConfiguration = sshConfiguration; - return this; - } - - /** - * Get the dataDisks property: Information about disks attached to File Server VM. - * - * @return the dataDisks value. - */ - public DataDisks dataDisks() { - return this.dataDisks; - } - - /** - * Set the dataDisks property: Information about disks attached to File Server VM. - * - * @param dataDisks the dataDisks value to set. - * @return the FileServerInner object itself. - */ - public FileServerInner withDataDisks(DataDisks dataDisks) { - this.dataDisks = dataDisks; - return this; - } - - /** - * Get the subnet property: File Server virtual network subnet resource ID. - * - * @return the subnet value. - */ - public ResourceId subnet() { - return this.subnet; - } - - /** - * Set the subnet property: File Server virtual network subnet resource ID. - * - * @param subnet the subnet value to set. - * @return the FileServerInner object itself. - */ - public FileServerInner withSubnet(ResourceId subnet) { - this.subnet = subnet; - return this; - } - - /** - * Get the mountSettings property: File Server mount settings. - * - * @return the mountSettings value. - */ - public MountSettings mountSettings() { - return this.mountSettings; - } - - /** - * Get the provisioningStateTransitionTime property: Time when the provisioning state was changed. - * - * @return the provisioningStateTransitionTime value. - */ - public OffsetDateTime provisioningStateTransitionTime() { - return this.provisioningStateTransitionTime; - } - - /** - * Get the creationTime property: Time when the FileServer was created. - * - * @return the creationTime value. - */ - public OffsetDateTime creationTime() { - return this.creationTime; - } - - /** - * Get the provisioningState property: Provisioning state of the File Server. Possible values: creating - The File - * Server is getting created; updating - The File Server creation has been accepted and it is getting updated; - * deleting - The user has requested that the File Server be deleted, and it is in the process of being deleted; - * failed - The File Server creation has failed with the specified error code. Details about the error code are - * specified in the message field; succeeded - The File Server creation has succeeded. - * - * @return the provisioningState value. - */ - public FileServerProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sshConfiguration() != null) { - sshConfiguration().validate(); - } - if (dataDisks() != null) { - dataDisks().validate(); - } - if (subnet() != null) { - subnet().validate(); - } - if (mountSettings() != null) { - mountSettings().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/JobInner.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/JobInner.java deleted file mode 100644 index 9848382d3d7a..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/JobInner.java +++ /dev/null @@ -1,848 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.models.Caffe2Settings; -import com.azure.resourcemanager.batchai.models.CaffeSettings; -import com.azure.resourcemanager.batchai.models.ChainerSettings; -import com.azure.resourcemanager.batchai.models.CntKsettings; -import com.azure.resourcemanager.batchai.models.ContainerSettings; -import com.azure.resourcemanager.batchai.models.CustomMpiSettings; -import com.azure.resourcemanager.batchai.models.CustomToolkitSettings; -import com.azure.resourcemanager.batchai.models.EnvironmentVariable; -import com.azure.resourcemanager.batchai.models.EnvironmentVariableWithSecretValue; -import com.azure.resourcemanager.batchai.models.ExecutionState; -import com.azure.resourcemanager.batchai.models.HorovodSettings; -import com.azure.resourcemanager.batchai.models.InputDirectory; -import com.azure.resourcemanager.batchai.models.JobPreparation; -import com.azure.resourcemanager.batchai.models.JobPriority; -import com.azure.resourcemanager.batchai.models.JobPropertiesConstraints; -import com.azure.resourcemanager.batchai.models.JobPropertiesExecutionInfo; -import com.azure.resourcemanager.batchai.models.MountVolumes; -import com.azure.resourcemanager.batchai.models.OutputDirectory; -import com.azure.resourcemanager.batchai.models.ProvisioningState; -import com.azure.resourcemanager.batchai.models.PyTorchSettings; -import com.azure.resourcemanager.batchai.models.ResourceId; -import com.azure.resourcemanager.batchai.models.TensorFlowSettings; -import com.azure.resourcemanager.batchai.models.ToolType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Information about a Job. */ -@JsonFlatten -@Fluent -public class JobInner extends ProxyResource { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(JobInner.class); - - /* - * Scheduling priority associated with the job. - */ - @JsonProperty(value = "properties.schedulingPriority") - private JobPriority schedulingPriority; - - /* - * Resource ID of the cluster associated with the job. - */ - @JsonProperty(value = "properties.cluster") - private ResourceId cluster; - - /* - * Collection of mount volumes available to the job during execution. These - * volumes are mounted before the job execution and unmounted after the job - * completion. The volumes are mounted at location specified by - * $AZ_BATCHAI_JOB_MOUNT_ROOT environment variable. - */ - @JsonProperty(value = "properties.mountVolumes") - private MountVolumes mountVolumes; - - /* - * The job will be gang scheduled on that many compute nodes - */ - @JsonProperty(value = "properties.nodeCount") - private Integer nodeCount; - - /* - * If the container was downloaded as part of cluster setup then the same - * container image will be used. If not provided, the job will run on the - * VM. - */ - @JsonProperty(value = "properties.containerSettings") - private ContainerSettings containerSettings; - - /* - * Possible values are: cntk, tensorflow, caffe, caffe2, chainer, pytorch, - * custom, custommpi, horovod. - */ - @JsonProperty(value = "properties.toolType") - private ToolType toolType; - - /* - * CNTK (aka Microsoft Cognitive Toolkit) job settings. - */ - @JsonProperty(value = "properties.cntkSettings") - private CntKsettings cntkSettings; - - /* - * pyTorch job settings. - */ - @JsonProperty(value = "properties.pyTorchSettings") - private PyTorchSettings pyTorchSettings; - - /* - * TensorFlow job settings. - */ - @JsonProperty(value = "properties.tensorFlowSettings") - private TensorFlowSettings tensorFlowSettings; - - /* - * Caffe job settings. - */ - @JsonProperty(value = "properties.caffeSettings") - private CaffeSettings caffeSettings; - - /* - * Caffe2 job settings. - */ - @JsonProperty(value = "properties.caffe2Settings") - private Caffe2Settings caffe2Settings; - - /* - * Chainer job settings. - */ - @JsonProperty(value = "properties.chainerSettings") - private ChainerSettings chainerSettings; - - /* - * Custom tool kit job settings. - */ - @JsonProperty(value = "properties.customToolkitSettings") - private CustomToolkitSettings customToolkitSettings; - - /* - * Custom MPI job settings. - */ - @JsonProperty(value = "properties.customMpiSettings") - private CustomMpiSettings customMpiSettings; - - /* - * Specifies the settings for Horovod job. - */ - @JsonProperty(value = "properties.horovodSettings") - private HorovodSettings horovodSettings; - - /* - * The specified actions will run on all the nodes that are part of the job - */ - @JsonProperty(value = "properties.jobPreparation") - private JobPreparation jobPreparation; - - /* - * A segment of job's output directories path created by Batch AI. Batch AI - * creates job's output directories under an unique path to avoid conflicts - * between jobs. This value contains a path segment generated by Batch AI - * to make the path unique and can be used to find the output directory on - * the node or mounted filesystem. - */ - @JsonProperty(value = "properties.jobOutputDirectoryPathSegment", access = JsonProperty.Access.WRITE_ONLY) - private String jobOutputDirectoryPathSegment; - - /* - * The path where the Batch AI service stores stdout, stderror and - * execution log of the job. - */ - @JsonProperty(value = "properties.stdOutErrPathPrefix") - private String stdOutErrPathPrefix; - - /* - * A list of input directories for the job. - */ - @JsonProperty(value = "properties.inputDirectories") - private List inputDirectories; - - /* - * A list of output directories for the job. - */ - @JsonProperty(value = "properties.outputDirectories") - private List outputDirectories; - - /* - * A collection of user defined environment variables to be setup for the - * job. - */ - @JsonProperty(value = "properties.environmentVariables") - private List environmentVariables; - - /* - * A collection of user defined environment variables with secret values to - * be setup for the job. Server will never report values of these variables - * back. - */ - @JsonProperty(value = "properties.secrets") - private List secrets; - - /* - * Constraints associated with the Job. - */ - @JsonProperty(value = "properties.constraints") - private JobPropertiesConstraints constraints; - - /* - * The creation time of the job. - */ - @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationTime; - - /* - * The provisioned state of the Batch AI job - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * The time at which the job entered its current provisioning state. - */ - @JsonProperty(value = "properties.provisioningStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime provisioningStateTransitionTime; - - /* - * The current state of the job. Possible values are: queued - The job is - * queued and able to run. A job enters this state when it is created, or - * when it is awaiting a retry after a failed run. running - The job is - * running on a compute cluster. This includes job-level preparation such - * as downloading resource files or set up container specified on the job - - * it does not necessarily mean that the job command line has started - * executing. terminating - The job is terminated by the user, the - * terminate operation is in progress. succeeded - The job has completed - * running successfully and exited with exit code 0. failed - The job has - * finished unsuccessfully (failed with a non-zero exit code) and has - * exhausted its retry limit. A job is also marked as failed if an error - * occurred launching the job. - */ - @JsonProperty(value = "properties.executionState", access = JsonProperty.Access.WRITE_ONLY) - private ExecutionState executionState; - - /* - * The time at which the job entered its current execution state. - */ - @JsonProperty(value = "properties.executionStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime executionStateTransitionTime; - - /* - * Information about the execution of a job. - */ - @JsonProperty(value = "properties.executionInfo") - private JobPropertiesExecutionInfo executionInfo; - - /** - * Get the schedulingPriority property: Scheduling priority associated with the job. - * - * @return the schedulingPriority value. - */ - public JobPriority schedulingPriority() { - return this.schedulingPriority; - } - - /** - * Set the schedulingPriority property: Scheduling priority associated with the job. - * - * @param schedulingPriority the schedulingPriority value to set. - * @return the JobInner object itself. - */ - public JobInner withSchedulingPriority(JobPriority schedulingPriority) { - this.schedulingPriority = schedulingPriority; - return this; - } - - /** - * Get the cluster property: Resource ID of the cluster associated with the job. - * - * @return the cluster value. - */ - public ResourceId cluster() { - return this.cluster; - } - - /** - * Set the cluster property: Resource ID of the cluster associated with the job. - * - * @param cluster the cluster value to set. - * @return the JobInner object itself. - */ - public JobInner withCluster(ResourceId cluster) { - this.cluster = cluster; - return this; - } - - /** - * Get the mountVolumes property: Collection of mount volumes available to the job during execution. These volumes - * are mounted before the job execution and unmounted after the job completion. The volumes are mounted at location - * specified by $AZ_BATCHAI_JOB_MOUNT_ROOT environment variable. - * - * @return the mountVolumes value. - */ - public MountVolumes mountVolumes() { - return this.mountVolumes; - } - - /** - * Set the mountVolumes property: Collection of mount volumes available to the job during execution. These volumes - * are mounted before the job execution and unmounted after the job completion. The volumes are mounted at location - * specified by $AZ_BATCHAI_JOB_MOUNT_ROOT environment variable. - * - * @param mountVolumes the mountVolumes value to set. - * @return the JobInner object itself. - */ - public JobInner withMountVolumes(MountVolumes mountVolumes) { - this.mountVolumes = mountVolumes; - return this; - } - - /** - * Get the nodeCount property: The job will be gang scheduled on that many compute nodes. - * - * @return the nodeCount value. - */ - public Integer nodeCount() { - return this.nodeCount; - } - - /** - * Set the nodeCount property: The job will be gang scheduled on that many compute nodes. - * - * @param nodeCount the nodeCount value to set. - * @return the JobInner object itself. - */ - public JobInner withNodeCount(Integer nodeCount) { - this.nodeCount = nodeCount; - return this; - } - - /** - * Get the containerSettings property: If the container was downloaded as part of cluster setup then the same - * container image will be used. If not provided, the job will run on the VM. - * - * @return the containerSettings value. - */ - public ContainerSettings containerSettings() { - return this.containerSettings; - } - - /** - * Set the containerSettings property: If the container was downloaded as part of cluster setup then the same - * container image will be used. If not provided, the job will run on the VM. - * - * @param containerSettings the containerSettings value to set. - * @return the JobInner object itself. - */ - public JobInner withContainerSettings(ContainerSettings containerSettings) { - this.containerSettings = containerSettings; - return this; - } - - /** - * Get the toolType property: Possible values are: cntk, tensorflow, caffe, caffe2, chainer, pytorch, custom, - * custommpi, horovod. - * - * @return the toolType value. - */ - public ToolType toolType() { - return this.toolType; - } - - /** - * Set the toolType property: Possible values are: cntk, tensorflow, caffe, caffe2, chainer, pytorch, custom, - * custommpi, horovod. - * - * @param toolType the toolType value to set. - * @return the JobInner object itself. - */ - public JobInner withToolType(ToolType toolType) { - this.toolType = toolType; - return this; - } - - /** - * Get the cntkSettings property: CNTK (aka Microsoft Cognitive Toolkit) job settings. - * - * @return the cntkSettings value. - */ - public CntKsettings cntkSettings() { - return this.cntkSettings; - } - - /** - * Set the cntkSettings property: CNTK (aka Microsoft Cognitive Toolkit) job settings. - * - * @param cntkSettings the cntkSettings value to set. - * @return the JobInner object itself. - */ - public JobInner withCntkSettings(CntKsettings cntkSettings) { - this.cntkSettings = cntkSettings; - return this; - } - - /** - * Get the pyTorchSettings property: pyTorch job settings. - * - * @return the pyTorchSettings value. - */ - public PyTorchSettings pyTorchSettings() { - return this.pyTorchSettings; - } - - /** - * Set the pyTorchSettings property: pyTorch job settings. - * - * @param pyTorchSettings the pyTorchSettings value to set. - * @return the JobInner object itself. - */ - public JobInner withPyTorchSettings(PyTorchSettings pyTorchSettings) { - this.pyTorchSettings = pyTorchSettings; - return this; - } - - /** - * Get the tensorFlowSettings property: TensorFlow job settings. - * - * @return the tensorFlowSettings value. - */ - public TensorFlowSettings tensorFlowSettings() { - return this.tensorFlowSettings; - } - - /** - * Set the tensorFlowSettings property: TensorFlow job settings. - * - * @param tensorFlowSettings the tensorFlowSettings value to set. - * @return the JobInner object itself. - */ - public JobInner withTensorFlowSettings(TensorFlowSettings tensorFlowSettings) { - this.tensorFlowSettings = tensorFlowSettings; - return this; - } - - /** - * Get the caffeSettings property: Caffe job settings. - * - * @return the caffeSettings value. - */ - public CaffeSettings caffeSettings() { - return this.caffeSettings; - } - - /** - * Set the caffeSettings property: Caffe job settings. - * - * @param caffeSettings the caffeSettings value to set. - * @return the JobInner object itself. - */ - public JobInner withCaffeSettings(CaffeSettings caffeSettings) { - this.caffeSettings = caffeSettings; - return this; - } - - /** - * Get the caffe2Settings property: Caffe2 job settings. - * - * @return the caffe2Settings value. - */ - public Caffe2Settings caffe2Settings() { - return this.caffe2Settings; - } - - /** - * Set the caffe2Settings property: Caffe2 job settings. - * - * @param caffe2Settings the caffe2Settings value to set. - * @return the JobInner object itself. - */ - public JobInner withCaffe2Settings(Caffe2Settings caffe2Settings) { - this.caffe2Settings = caffe2Settings; - return this; - } - - /** - * Get the chainerSettings property: Chainer job settings. - * - * @return the chainerSettings value. - */ - public ChainerSettings chainerSettings() { - return this.chainerSettings; - } - - /** - * Set the chainerSettings property: Chainer job settings. - * - * @param chainerSettings the chainerSettings value to set. - * @return the JobInner object itself. - */ - public JobInner withChainerSettings(ChainerSettings chainerSettings) { - this.chainerSettings = chainerSettings; - return this; - } - - /** - * Get the customToolkitSettings property: Custom tool kit job settings. - * - * @return the customToolkitSettings value. - */ - public CustomToolkitSettings customToolkitSettings() { - return this.customToolkitSettings; - } - - /** - * Set the customToolkitSettings property: Custom tool kit job settings. - * - * @param customToolkitSettings the customToolkitSettings value to set. - * @return the JobInner object itself. - */ - public JobInner withCustomToolkitSettings(CustomToolkitSettings customToolkitSettings) { - this.customToolkitSettings = customToolkitSettings; - return this; - } - - /** - * Get the customMpiSettings property: Custom MPI job settings. - * - * @return the customMpiSettings value. - */ - public CustomMpiSettings customMpiSettings() { - return this.customMpiSettings; - } - - /** - * Set the customMpiSettings property: Custom MPI job settings. - * - * @param customMpiSettings the customMpiSettings value to set. - * @return the JobInner object itself. - */ - public JobInner withCustomMpiSettings(CustomMpiSettings customMpiSettings) { - this.customMpiSettings = customMpiSettings; - return this; - } - - /** - * Get the horovodSettings property: Specifies the settings for Horovod job. - * - * @return the horovodSettings value. - */ - public HorovodSettings horovodSettings() { - return this.horovodSettings; - } - - /** - * Set the horovodSettings property: Specifies the settings for Horovod job. - * - * @param horovodSettings the horovodSettings value to set. - * @return the JobInner object itself. - */ - public JobInner withHorovodSettings(HorovodSettings horovodSettings) { - this.horovodSettings = horovodSettings; - return this; - } - - /** - * Get the jobPreparation property: The specified actions will run on all the nodes that are part of the job. - * - * @return the jobPreparation value. - */ - public JobPreparation jobPreparation() { - return this.jobPreparation; - } - - /** - * Set the jobPreparation property: The specified actions will run on all the nodes that are part of the job. - * - * @param jobPreparation the jobPreparation value to set. - * @return the JobInner object itself. - */ - public JobInner withJobPreparation(JobPreparation jobPreparation) { - this.jobPreparation = jobPreparation; - return this; - } - - /** - * Get the jobOutputDirectoryPathSegment property: A segment of job's output directories path created by Batch AI. - * Batch AI creates job's output directories under an unique path to avoid conflicts between jobs. This value - * contains a path segment generated by Batch AI to make the path unique and can be used to find the output - * directory on the node or mounted filesystem. - * - * @return the jobOutputDirectoryPathSegment value. - */ - public String jobOutputDirectoryPathSegment() { - return this.jobOutputDirectoryPathSegment; - } - - /** - * Get the stdOutErrPathPrefix property: The path where the Batch AI service stores stdout, stderror and execution - * log of the job. - * - * @return the stdOutErrPathPrefix value. - */ - public String stdOutErrPathPrefix() { - return this.stdOutErrPathPrefix; - } - - /** - * Set the stdOutErrPathPrefix property: The path where the Batch AI service stores stdout, stderror and execution - * log of the job. - * - * @param stdOutErrPathPrefix the stdOutErrPathPrefix value to set. - * @return the JobInner object itself. - */ - public JobInner withStdOutErrPathPrefix(String stdOutErrPathPrefix) { - this.stdOutErrPathPrefix = stdOutErrPathPrefix; - return this; - } - - /** - * Get the inputDirectories property: A list of input directories for the job. - * - * @return the inputDirectories value. - */ - public List inputDirectories() { - return this.inputDirectories; - } - - /** - * Set the inputDirectories property: A list of input directories for the job. - * - * @param inputDirectories the inputDirectories value to set. - * @return the JobInner object itself. - */ - public JobInner withInputDirectories(List inputDirectories) { - this.inputDirectories = inputDirectories; - return this; - } - - /** - * Get the outputDirectories property: A list of output directories for the job. - * - * @return the outputDirectories value. - */ - public List outputDirectories() { - return this.outputDirectories; - } - - /** - * Set the outputDirectories property: A list of output directories for the job. - * - * @param outputDirectories the outputDirectories value to set. - * @return the JobInner object itself. - */ - public JobInner withOutputDirectories(List outputDirectories) { - this.outputDirectories = outputDirectories; - return this; - } - - /** - * Get the environmentVariables property: A collection of user defined environment variables to be setup for the - * job. - * - * @return the environmentVariables value. - */ - public List environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: A collection of user defined environment variables to be setup for the - * job. - * - * @param environmentVariables the environmentVariables value to set. - * @return the JobInner object itself. - */ - public JobInner withEnvironmentVariables(List environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * Get the secrets property: A collection of user defined environment variables with secret values to be setup for - * the job. Server will never report values of these variables back. - * - * @return the secrets value. - */ - public List secrets() { - return this.secrets; - } - - /** - * Set the secrets property: A collection of user defined environment variables with secret values to be setup for - * the job. Server will never report values of these variables back. - * - * @param secrets the secrets value to set. - * @return the JobInner object itself. - */ - public JobInner withSecrets(List secrets) { - this.secrets = secrets; - return this; - } - - /** - * Get the constraints property: Constraints associated with the Job. - * - * @return the constraints value. - */ - public JobPropertiesConstraints constraints() { - return this.constraints; - } - - /** - * Set the constraints property: Constraints associated with the Job. - * - * @param constraints the constraints value to set. - * @return the JobInner object itself. - */ - public JobInner withConstraints(JobPropertiesConstraints constraints) { - this.constraints = constraints; - return this; - } - - /** - * Get the creationTime property: The creation time of the job. - * - * @return the creationTime value. - */ - public OffsetDateTime creationTime() { - return this.creationTime; - } - - /** - * Get the provisioningState property: The provisioned state of the Batch AI job. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the provisioningStateTransitionTime property: The time at which the job entered its current provisioning - * state. - * - * @return the provisioningStateTransitionTime value. - */ - public OffsetDateTime provisioningStateTransitionTime() { - return this.provisioningStateTransitionTime; - } - - /** - * Get the executionState property: The current state of the job. Possible values are: queued - The job is queued - * and able to run. A job enters this state when it is created, or when it is awaiting a retry after a failed run. - * running - The job is running on a compute cluster. This includes job-level preparation such as downloading - * resource files or set up container specified on the job - it does not necessarily mean that the job command line - * has started executing. terminating - The job is terminated by the user, the terminate operation is in progress. - * succeeded - The job has completed running successfully and exited with exit code 0. failed - The job has finished - * unsuccessfully (failed with a non-zero exit code) and has exhausted its retry limit. A job is also marked as - * failed if an error occurred launching the job. - * - * @return the executionState value. - */ - public ExecutionState executionState() { - return this.executionState; - } - - /** - * Get the executionStateTransitionTime property: The time at which the job entered its current execution state. - * - * @return the executionStateTransitionTime value. - */ - public OffsetDateTime executionStateTransitionTime() { - return this.executionStateTransitionTime; - } - - /** - * Get the executionInfo property: Information about the execution of a job. - * - * @return the executionInfo value. - */ - public JobPropertiesExecutionInfo executionInfo() { - return this.executionInfo; - } - - /** - * Set the executionInfo property: Information about the execution of a job. - * - * @param executionInfo the executionInfo value to set. - * @return the JobInner object itself. - */ - public JobInner withExecutionInfo(JobPropertiesExecutionInfo executionInfo) { - this.executionInfo = executionInfo; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (cluster() != null) { - cluster().validate(); - } - if (mountVolumes() != null) { - mountVolumes().validate(); - } - if (containerSettings() != null) { - containerSettings().validate(); - } - if (cntkSettings() != null) { - cntkSettings().validate(); - } - if (pyTorchSettings() != null) { - pyTorchSettings().validate(); - } - if (tensorFlowSettings() != null) { - tensorFlowSettings().validate(); - } - if (caffeSettings() != null) { - caffeSettings().validate(); - } - if (caffe2Settings() != null) { - caffe2Settings().validate(); - } - if (chainerSettings() != null) { - chainerSettings().validate(); - } - if (customToolkitSettings() != null) { - customToolkitSettings().validate(); - } - if (customMpiSettings() != null) { - customMpiSettings().validate(); - } - if (horovodSettings() != null) { - horovodSettings().validate(); - } - if (jobPreparation() != null) { - jobPreparation().validate(); - } - if (inputDirectories() != null) { - inputDirectories().forEach(e -> e.validate()); - } - if (outputDirectories() != null) { - outputDirectories().forEach(e -> e.validate()); - } - if (environmentVariables() != null) { - environmentVariables().forEach(e -> e.validate()); - } - if (secrets() != null) { - secrets().forEach(e -> e.validate()); - } - if (constraints() != null) { - constraints().validate(); - } - if (executionInfo() != null) { - executionInfo().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/OperationInner.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/OperationInner.java deleted file mode 100644 index cce19d96c889..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/OperationInner.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.models.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Details of a REST API operation. */ -@Fluent -public final class OperationInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(OperationInner.class); - - /* - * This is of the format {provider}/{resource}/{operation} - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * The object that describes the operation. - */ - @JsonProperty(value = "display") - private OperationDisplay display; - - /* - * The intended executor of the operation. - */ - @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) - private String origin; - - /* - * Any object - */ - @JsonProperty(value = "properties") - private Object properties; - - /** - * Get the name property: This is of the format {provider}/{resource}/{operation}. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the display property: The object that describes the operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display property: The object that describes the operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - - /** - * Get the origin property: The intended executor of the operation. - * - * @return the origin value. - */ - public String origin() { - return this.origin; - } - - /** - * Get the properties property: Any object. - * - * @return the properties value. - */ - public Object properties() { - return this.properties; - } - - /** - * Set the properties property: Any object. - * - * @param properties the properties value to set. - * @return the OperationInner object itself. - */ - public OperationInner withProperties(Object properties) { - this.properties = properties; - 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/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/RemoteLoginInformationInner.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/RemoteLoginInformationInner.java deleted file mode 100644 index 643b9ca7a85f..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/RemoteLoginInformationInner.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.fluent.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; - -/** Login details to SSH to a compute node in cluster. */ -@Immutable -public final class RemoteLoginInformationInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(RemoteLoginInformationInner.class); - - /* - * ID of the compute node. - */ - @JsonProperty(value = "nodeId", access = JsonProperty.Access.WRITE_ONLY) - private String nodeId; - - /* - * Public IP address of the compute node. - */ - @JsonProperty(value = "ipAddress", access = JsonProperty.Access.WRITE_ONLY) - private String ipAddress; - - /* - * SSH port number of the node. - */ - @JsonProperty(value = "port", access = JsonProperty.Access.WRITE_ONLY) - private Integer port; - - /** - * Get the nodeId property: ID of the compute node. - * - * @return the nodeId value. - */ - public String nodeId() { - return this.nodeId; - } - - /** - * Get the ipAddress property: Public IP address of the compute node. - * - * @return the ipAddress value. - */ - public String ipAddress() { - return this.ipAddress; - } - - /** - * Get the port property: SSH port number of the node. - * - * @return the port value. - */ - public Integer port() { - return this.port; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/UsageInner.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/UsageInner.java deleted file mode 100644 index c42f1d969b2c..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/UsageInner.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.models.UsageName; -import com.azure.resourcemanager.batchai.models.UsageUnit; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes Batch AI Resource Usage. */ -@Immutable -public final class UsageInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(UsageInner.class); - - /* - * An enum describing the unit of usage measurement. - */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) - private UsageUnit unit; - - /* - * The current usage of the resource. - */ - @JsonProperty(value = "currentValue", access = JsonProperty.Access.WRITE_ONLY) - private Integer currentValue; - - /* - * The maximum permitted usage of the resource. - */ - @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) - private Long limit; - - /* - * The name of the type of usage. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private UsageName name; - - /** - * Get the unit property: An enum describing the unit of usage measurement. - * - * @return the unit value. - */ - public UsageUnit unit() { - return this.unit; - } - - /** - * Get the currentValue property: The current usage of the resource. - * - * @return the currentValue value. - */ - public Integer currentValue() { - return this.currentValue; - } - - /** - * Get the limit property: The maximum permitted usage of the resource. - * - * @return the limit value. - */ - public Long limit() { - return this.limit; - } - - /** - * Get the name property: The name of the type of usage. - * - * @return the name value. - */ - public UsageName name() { - return this.name; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() != null) { - name().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/WorkspaceInner.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/WorkspaceInner.java deleted file mode 100644 index a78bec4e58b3..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/WorkspaceInner.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Batch AI Workspace information. */ -@JsonFlatten -@Immutable -public class WorkspaceInner extends Resource { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(WorkspaceInner.class); - - /* - * Time when the Workspace was created. - */ - @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationTime; - - /* - * The provisioned state of the Workspace - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * The time at which the workspace entered its current provisioning state. - */ - @JsonProperty(value = "properties.provisioningStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime provisioningStateTransitionTime; - - /** - * Get the creationTime property: Time when the Workspace was created. - * - * @return the creationTime value. - */ - public OffsetDateTime creationTime() { - return this.creationTime; - } - - /** - * Get the provisioningState property: The provisioned state of the Workspace. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the provisioningStateTransitionTime property: The time at which the workspace entered its current - * provisioning state. - * - * @return the provisioningStateTransitionTime value. - */ - public OffsetDateTime provisioningStateTransitionTime() { - return this.provisioningStateTransitionTime; - } - - /** {@inheritDoc} */ - @Override - public WorkspaceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public WorkspaceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/package-info.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/package-info.java deleted file mode 100644 index aa14540f821c..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/models/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the inner data models for BatchAI. The Azure BatchAI Management API. */ -package com.azure.resourcemanager.batchai.fluent.models; diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/package-info.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/package-info.java deleted file mode 100644 index 676b1fcec4dc..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the service clients for BatchAI. The Azure BatchAI Management API. */ -package com.azure.resourcemanager.batchai.fluent; diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/BatchAIBuilder.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/BatchAIBuilder.java deleted file mode 100644 index 6ebc0343e8d3..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/BatchAIBuilder.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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 BatchAIImpl type. */ -@ServiceClientBuilder(serviceClients = { BatchAIImpl.class }) -public final class BatchAIBuilder { - /* - * The subscriptionID for the Azure user. - */ - private String subscriptionId; - - /** - * Sets The subscriptionID for the Azure user. - * - * @param subscriptionId the subscriptionId value. - * @return the BatchAIBuilder. - */ - public BatchAIBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the BatchAIBuilder. - */ - public BatchAIBuilder 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 BatchAIBuilder. - */ - public BatchAIBuilder 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 BatchAIBuilder. - */ - public BatchAIBuilder 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 BatchAIBuilder. - */ - public BatchAIBuilder 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 BatchAIBuilder. - */ - public BatchAIBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of BatchAIImpl with the provided parameters. - * - * @return an instance of BatchAIImpl. - */ - public BatchAIImpl 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(); - } - BatchAIImpl client - = new BatchAIImpl(pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); - return client; - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/BatchAIImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/BatchAIImpl.java deleted file mode 100644 index 0913e8e0dd76..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/BatchAIImpl.java +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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.batchai.fluent.BatchAI; -import com.azure.resourcemanager.batchai.fluent.ClustersClient; -import com.azure.resourcemanager.batchai.fluent.ExperimentsClient; -import com.azure.resourcemanager.batchai.fluent.FileServersClient; -import com.azure.resourcemanager.batchai.fluent.JobsClient; -import com.azure.resourcemanager.batchai.fluent.OperationsClient; -import com.azure.resourcemanager.batchai.fluent.UsagesClient; -import com.azure.resourcemanager.batchai.fluent.WorkspacesClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import java.util.Map; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** Initializes a new instance of the BatchAIImpl type. */ -@ServiceClient(builder = BatchAIBuilder.class) -public final class BatchAIImpl implements BatchAI { - private final ClientLogger logger = new ClientLogger(BatchAIImpl.class); - - /** The subscriptionID for the Azure user. */ - private final String subscriptionId; - - /** - * Gets The subscriptionID for the Azure user. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** server parameter. */ - private final String endpoint; - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** Api Version. */ - private final String apiVersion; - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** The HTTP pipeline to send requests through. */ - private final HttpPipeline httpPipeline; - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - public HttpPipeline getHttpPipeline() { - return this.httpPipeline; - } - - /** The serializer to serialize an object into a string. */ - private final SerializerAdapter serializerAdapter; - - /** - * Gets The serializer to serialize an object into a string. - * - * @return the serializerAdapter value. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** The default poll interval for long-running operation. */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** The OperationsClient object to access its operations. */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** The UsagesClient object to access its operations. */ - private final UsagesClient usages; - - /** - * Gets the UsagesClient object to access its operations. - * - * @return the UsagesClient object. - */ - public UsagesClient getUsages() { - return this.usages; - } - - /** The WorkspacesClient object to access its operations. */ - private final WorkspacesClient workspaces; - - /** - * Gets the WorkspacesClient object to access its operations. - * - * @return the WorkspacesClient object. - */ - public WorkspacesClient getWorkspaces() { - return this.workspaces; - } - - /** The ExperimentsClient object to access its operations. */ - private final ExperimentsClient experiments; - - /** - * Gets the ExperimentsClient object to access its operations. - * - * @return the ExperimentsClient object. - */ - public ExperimentsClient getExperiments() { - return this.experiments; - } - - /** The JobsClient object to access its operations. */ - private final JobsClient jobs; - - /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. - */ - public JobsClient getJobs() { - return this.jobs; - } - - /** The FileServersClient object to access its operations. */ - private final FileServersClient fileServers; - - /** - * Gets the FileServersClient object to access its operations. - * - * @return the FileServersClient object. - */ - public FileServersClient getFileServers() { - return this.fileServers; - } - - /** The ClustersClient object to access its operations. */ - private final ClustersClient clusters; - - /** - * Gets the ClustersClient object to access its operations. - * - * @return the ClustersClient object. - */ - public ClustersClient getClusters() { - return this.clusters; - } - - /** - * Initializes an instance of BatchAI 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 subscriptionID for the Azure user. - * @param endpoint server parameter. - */ - BatchAIImpl(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 = "2018-05-01"; - this.operations = new OperationsClientImpl(this); - this.usages = new UsagesClientImpl(this); - this.workspaces = new WorkspacesClientImpl(this); - this.experiments = new ExperimentsClientImpl(this); - this.jobs = new JobsClientImpl(this); - this.fileServers = new FileServersClientImpl(this); - this.clusters = new ClustersClientImpl(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/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ClusterImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ClusterImpl.java deleted file mode 100644 index 8b7b4d20e3b5..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ClusterImpl.java +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batchai.fluent.models.ClusterInner; -import com.azure.resourcemanager.batchai.models.AllocationState; -import com.azure.resourcemanager.batchai.models.BatchAIError; -import com.azure.resourcemanager.batchai.models.Cluster; -import com.azure.resourcemanager.batchai.models.ClusterCreateParameters; -import com.azure.resourcemanager.batchai.models.ClusterUpdateParameters; -import com.azure.resourcemanager.batchai.models.NodeSetup; -import com.azure.resourcemanager.batchai.models.NodeStateCounts; -import com.azure.resourcemanager.batchai.models.ProvisioningState; -import com.azure.resourcemanager.batchai.models.RemoteLoginInformation; -import com.azure.resourcemanager.batchai.models.ResourceId; -import com.azure.resourcemanager.batchai.models.ScaleSettings; -import com.azure.resourcemanager.batchai.models.UserAccountSettings; -import com.azure.resourcemanager.batchai.models.VirtualMachineConfiguration; -import com.azure.resourcemanager.batchai.models.VmPriority; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class ClusterImpl implements Cluster, Cluster.Definition, Cluster.Update { - private ClusterInner innerObject; - - private final com.azure.resourcemanager.batchai.BatchAIManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String vmSize() { - return this.innerModel().vmSize(); - } - - public VmPriority vmPriority() { - return this.innerModel().vmPriority(); - } - - public ScaleSettings scaleSettings() { - return this.innerModel().scaleSettings(); - } - - public VirtualMachineConfiguration virtualMachineConfiguration() { - return this.innerModel().virtualMachineConfiguration(); - } - - public NodeSetup nodeSetup() { - return this.innerModel().nodeSetup(); - } - - public UserAccountSettings userAccountSettings() { - return this.innerModel().userAccountSettings(); - } - - public ResourceId subnet() { - return this.innerModel().subnet(); - } - - public OffsetDateTime creationTime() { - return this.innerModel().creationTime(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public OffsetDateTime provisioningStateTransitionTime() { - return this.innerModel().provisioningStateTransitionTime(); - } - - public AllocationState allocationState() { - return this.innerModel().allocationState(); - } - - public OffsetDateTime allocationStateTransitionTime() { - return this.innerModel().allocationStateTransitionTime(); - } - - public List errors() { - List inner = this.innerModel().errors(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Integer currentNodeCount() { - return this.innerModel().currentNodeCount(); - } - - public NodeStateCounts nodeStateCounts() { - return this.innerModel().nodeStateCounts(); - } - - public ClusterInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.batchai.BatchAIManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String clusterName; - - private ClusterCreateParameters createParameters; - - private ClusterUpdateParameters updateParameters; - - public ClusterImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public Cluster create() { - this.innerObject = serviceManager.serviceClient() - .getClusters() - .create(resourceGroupName, workspaceName, clusterName, createParameters, Context.NONE); - return this; - } - - public Cluster create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getClusters() - .create(resourceGroupName, workspaceName, clusterName, createParameters, context); - return this; - } - - ClusterImpl(String name, com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerObject = new ClusterInner(); - this.serviceManager = serviceManager; - this.clusterName = name; - this.createParameters = new ClusterCreateParameters(); - } - - public ClusterImpl update() { - this.updateParameters = new ClusterUpdateParameters(); - return this; - } - - public Cluster apply() { - this.innerObject = serviceManager.serviceClient() - .getClusters() - .updateWithResponse(resourceGroupName, workspaceName, clusterName, updateParameters, Context.NONE) - .getValue(); - return this; - } - - public Cluster apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getClusters() - .updateWithResponse(resourceGroupName, workspaceName, clusterName, updateParameters, context) - .getValue(); - return this; - } - - ClusterImpl(ClusterInner innerObject, com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters"); - } - - public Cluster refresh() { - this.innerObject = serviceManager.serviceClient() - .getClusters() - .getWithResponse(resourceGroupName, workspaceName, clusterName, Context.NONE) - .getValue(); - return this; - } - - public Cluster refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getClusters() - .getWithResponse(resourceGroupName, workspaceName, clusterName, context) - .getValue(); - return this; - } - - public PagedIterable listRemoteLoginInformation() { - return serviceManager.clusters().listRemoteLoginInformation(resourceGroupName, workspaceName, clusterName); - } - - public PagedIterable listRemoteLoginInformation(Context context) { - return serviceManager.clusters() - .listRemoteLoginInformation(resourceGroupName, workspaceName, clusterName, context); - } - - public ClusterImpl withVmSize(String vmSize) { - this.createParameters.withVmSize(vmSize); - return this; - } - - public ClusterImpl withVmPriority(VmPriority vmPriority) { - this.createParameters.withVmPriority(vmPriority); - return this; - } - - public ClusterImpl withScaleSettings(ScaleSettings scaleSettings) { - if (isInCreateMode()) { - this.createParameters.withScaleSettings(scaleSettings); - return this; - } else { - this.updateParameters.withScaleSettings(scaleSettings); - return this; - } - } - - public ClusterImpl withVirtualMachineConfiguration(VirtualMachineConfiguration virtualMachineConfiguration) { - this.createParameters.withVirtualMachineConfiguration(virtualMachineConfiguration); - return this; - } - - public ClusterImpl withNodeSetup(NodeSetup nodeSetup) { - this.createParameters.withNodeSetup(nodeSetup); - return this; - } - - public ClusterImpl withUserAccountSettings(UserAccountSettings userAccountSettings) { - this.createParameters.withUserAccountSettings(userAccountSettings); - return this; - } - - public ClusterImpl withSubnet(ResourceId subnet) { - this.createParameters.withSubnet(subnet); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ClustersClientImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ClustersClientImpl.java deleted file mode 100644 index 726ef5e3c5f4..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ClustersClientImpl.java +++ /dev/null @@ -1,1457 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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.batchai.fluent.ClustersClient; -import com.azure.resourcemanager.batchai.fluent.models.ClusterInner; -import com.azure.resourcemanager.batchai.fluent.models.RemoteLoginInformationInner; -import com.azure.resourcemanager.batchai.models.ClusterCreateParameters; -import com.azure.resourcemanager.batchai.models.ClusterListResult; -import com.azure.resourcemanager.batchai.models.ClusterUpdateParameters; -import com.azure.resourcemanager.batchai.models.RemoteLoginInformationListResult; -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 ClustersClient. */ -public final class ClustersClientImpl implements ClustersClient { - private final ClientLogger logger = new ClientLogger(ClustersClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ClustersService service; - - /** The service client containing this operation class. */ - private final BatchAIImpl client; - - /** - * Initializes an instance of ClustersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ClustersClientImpl(BatchAIImpl client) { - this.service = RestProxy.create(ClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for BatchAIClusters to be used by the proxy service to perform REST - * calls. - */ - @Host("{$host}") - @ServiceInterface(name = "BatchAIClusters") - private interface ClustersService { - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/clusters/{clusterName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("clusterName") String clusterName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ClusterCreateParameters parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/clusters/{clusterName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("clusterName") String clusterName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ClusterUpdateParameters parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/clusters/{clusterName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("clusterName") String clusterName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/clusters/{clusterName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("clusterName") String clusterName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/clusters/{clusterName}/listRemoteLoginInformation") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRemoteLoginInformation(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("clusterName") String clusterName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/clusters") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspace(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("maxresults") Integer maxResults, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRemoteLoginInformationNext( - @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> listByWorkspaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Creates a Cluster in the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters The parameters to provide for the Cluster creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, - String clusterName, ClusterCreateParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, workspaceName, - clusterName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a Cluster in the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters The parameters to provide for the Cluster creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, - String clusterName, ClusterCreateParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, workspaceName, clusterName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Creates a Cluster in the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters The parameters to provide for the Cluster creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ClusterInner> beginCreateAsync(String resourceGroupName, - String workspaceName, String clusterName, ClusterCreateParameters parameters) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, workspaceName, clusterName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, Context.NONE); - } - - /** - * Creates a Cluster in the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters The parameters to provide for the Cluster creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ClusterInner> beginCreateAsync(String resourceGroupName, - String workspaceName, String clusterName, ClusterCreateParameters parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, workspaceName, clusterName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, context); - } - - /** - * Creates a Cluster in the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters The parameters to provide for the Cluster creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ClusterInner> beginCreate(String resourceGroupName, - String workspaceName, String clusterName, ClusterCreateParameters parameters) { - return beginCreateAsync(resourceGroupName, workspaceName, clusterName, parameters).getSyncPoller(); - } - - /** - * Creates a Cluster in the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters The parameters to provide for the Cluster creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ClusterInner> beginCreate(String resourceGroupName, - String workspaceName, String clusterName, ClusterCreateParameters parameters, Context context) { - return beginCreateAsync(resourceGroupName, workspaceName, clusterName, parameters, context).getSyncPoller(); - } - - /** - * Creates a Cluster in the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters The parameters to provide for the Cluster creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String workspaceName, String clusterName, - ClusterCreateParameters parameters) { - return beginCreateAsync(resourceGroupName, workspaceName, clusterName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a Cluster in the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters The parameters to provide for the Cluster creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String workspaceName, String clusterName, - ClusterCreateParameters parameters, Context context) { - return beginCreateAsync(resourceGroupName, workspaceName, clusterName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a Cluster in the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters The parameters to provide for the Cluster creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner create(String resourceGroupName, String workspaceName, String clusterName, - ClusterCreateParameters parameters) { - return createAsync(resourceGroupName, workspaceName, clusterName, parameters).block(); - } - - /** - * Creates a Cluster in the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters The parameters to provide for the Cluster creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner create(String resourceGroupName, String workspaceName, String clusterName, - ClusterCreateParameters parameters, Context context) { - return createAsync(resourceGroupName, workspaceName, clusterName, parameters, context).block(); - } - - /** - * Updates properties of a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String clusterName, ClusterUpdateParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, workspaceName, - clusterName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates properties of a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String clusterName, ClusterUpdateParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, workspaceName, clusterName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Updates properties of a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String clusterName, - ClusterUpdateParameters parameters) { - return updateWithResponseAsync(resourceGroupName, workspaceName, clusterName, parameters) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates properties of a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner update(String resourceGroupName, String workspaceName, String clusterName, - ClusterUpdateParameters parameters) { - return updateAsync(resourceGroupName, workspaceName, clusterName, parameters).block(); - } - - /** - * Updates properties of a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String workspaceName, String clusterName, - ClusterUpdateParameters parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, workspaceName, clusterName, parameters, context).block(); - } - - /** - * Deletes a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, - String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required 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.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, - clusterName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, - 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 (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required 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.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, clusterName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Deletes a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String clusterName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, clusterName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - Context.NONE); - } - - /** - * Deletes a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String clusterName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, clusterName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String clusterName) { - return beginDeleteAsync(resourceGroupName, workspaceName, clusterName).getSyncPoller(); - } - - /** - * Deletes a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String clusterName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, clusterName, context).getSyncPoller(); - } - - /** - * Deletes a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, String clusterName) { - return beginDeleteAsync(resourceGroupName, workspaceName, clusterName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, String clusterName, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, clusterName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String clusterName) { - deleteAsync(resourceGroupName, workspaceName, clusterName).block(); - } - - /** - * Deletes a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String clusterName, Context context) { - deleteAsync(resourceGroupName, workspaceName, clusterName, context).block(); - } - - /** - * Gets information about a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required 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.get(this.client.getEndpoint(), resourceGroupName, workspaceName, - clusterName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets information about a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - 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 (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required 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.get(this.client.getEndpoint(), resourceGroupName, workspaceName, clusterName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Gets information about a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String clusterName) { - return getWithResponseAsync(resourceGroupName, workspaceName, clusterName) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets information about a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner get(String resourceGroupName, String workspaceName, String clusterName) { - return getAsync(resourceGroupName, workspaceName, clusterName).block(); - } - - /** - * Gets information about a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String clusterName, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, clusterName, context).block(); - } - - /** - * Get the IP address, port of all the compute nodes in the Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP address, port of all the compute nodes in the Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listRemoteLoginInformationSinglePageAsync(String resourceGroupName, String workspaceName, String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required 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.listRemoteLoginInformation(this.client.getEndpoint(), resourceGroupName, - workspaceName, clusterName, this.client.getApiVersion(), this.client.getSubscriptionId(), 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 IP address, port of all the compute nodes in the Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP address, port of all the compute nodes in the Cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRemoteLoginInformationSinglePageAsync( - String resourceGroupName, String workspaceName, 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 (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required 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 - .listRemoteLoginInformation(this.client.getEndpoint(), resourceGroupName, workspaceName, clusterName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the IP address, port of all the compute nodes in the Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP address, port of all the compute nodes in the Cluster. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRemoteLoginInformationAsync(String resourceGroupName, - String workspaceName, String clusterName) { - return new PagedFlux<>( - () -> listRemoteLoginInformationSinglePageAsync(resourceGroupName, workspaceName, clusterName), - nextLink -> listRemoteLoginInformationNextSinglePageAsync(nextLink)); - } - - /** - * Get the IP address, port of all the compute nodes in the Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP address, port of all the compute nodes in the Cluster. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRemoteLoginInformationAsync(String resourceGroupName, - String workspaceName, String clusterName, Context context) { - return new PagedFlux<>( - () -> listRemoteLoginInformationSinglePageAsync(resourceGroupName, workspaceName, clusterName, context), - nextLink -> listRemoteLoginInformationNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the IP address, port of all the compute nodes in the Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP address, port of all the compute nodes in the Cluster. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRemoteLoginInformation(String resourceGroupName, - String workspaceName, String clusterName) { - return new PagedIterable<>(listRemoteLoginInformationAsync(resourceGroupName, workspaceName, clusterName)); - } - - /** - * Get the IP address, port of all the compute nodes in the Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP address, port of all the compute nodes in the Cluster. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRemoteLoginInformation(String resourceGroupName, - String workspaceName, String clusterName, Context context) { - return new PagedIterable<>( - listRemoteLoginInformationAsync(resourceGroupName, workspaceName, clusterName, context)); - } - - /** - * Gets information about Clusters associated with the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Clusters associated with the given Workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, - String workspaceName, Integer maxResults) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByWorkspace(this.client.getEndpoint(), resourceGroupName, workspaceName, - maxResults, this.client.getApiVersion(), this.client.getSubscriptionId(), 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 information about Clusters associated with the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Clusters associated with the given Workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, - String workspaceName, Integer maxResults, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByWorkspace(this.client.getEndpoint(), resourceGroupName, workspaceName, maxResults, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets information about Clusters associated with the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Clusters associated with the given Workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName, - Integer maxResults) { - return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, maxResults), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); - } - - /** - * Gets information about Clusters associated with the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Clusters associated with the given Workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) { - final Integer maxResults = null; - return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, maxResults), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); - } - - /** - * Gets information about Clusters associated with the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Clusters associated with the given Workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName, - Integer maxResults, Context context) { - return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, maxResults, context), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets information about Clusters associated with the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Clusters associated with the given Workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { - final Integer maxResults = null; - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, maxResults)); - } - - /** - * Gets information about Clusters associated with the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Clusters associated with the given Workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, - Integer maxResults, Context context) { - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, maxResults, 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 values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listRemoteLoginInformationNextSinglePageAsync(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.listRemoteLoginInformationNext(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 values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listRemoteLoginInformationNextSinglePageAsync(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.listRemoteLoginInformationNext(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 values returned by the List Clusters operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(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.listByWorkspaceNext(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 values returned by the List Clusters operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(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.listByWorkspaceNext(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/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ClustersImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ClustersImpl.java deleted file mode 100644 index 29c03d1b31c4..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ClustersImpl.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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.batchai.fluent.ClustersClient; -import com.azure.resourcemanager.batchai.fluent.models.ClusterInner; -import com.azure.resourcemanager.batchai.fluent.models.RemoteLoginInformationInner; -import com.azure.resourcemanager.batchai.models.Cluster; -import com.azure.resourcemanager.batchai.models.Clusters; -import com.azure.resourcemanager.batchai.models.RemoteLoginInformation; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class ClustersImpl implements Clusters { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ClustersImpl.class); - - private final ClustersClient innerClient; - - private final com.azure.resourcemanager.batchai.BatchAIManager serviceManager; - - public ClustersImpl(ClustersClient innerClient, com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public void delete(String resourceGroupName, String workspaceName, String clusterName) { - this.serviceClient().delete(resourceGroupName, workspaceName, clusterName); - } - - public void delete(String resourceGroupName, String workspaceName, String clusterName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, clusterName, context); - } - - public Cluster get(String resourceGroupName, String workspaceName, String clusterName) { - ClusterInner inner = this.serviceClient().get(resourceGroupName, workspaceName, clusterName); - if (inner != null) { - return new ClusterImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String clusterName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, clusterName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ClusterImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PagedIterable listRemoteLoginInformation(String resourceGroupName, - String workspaceName, String clusterName) { - PagedIterable inner - = this.serviceClient().listRemoteLoginInformation(resourceGroupName, workspaceName, clusterName); - return Utils.mapPage(inner, inner1 -> new RemoteLoginInformationImpl(inner1, this.manager())); - } - - public PagedIterable listRemoteLoginInformation(String resourceGroupName, - String workspaceName, String clusterName, Context context) { - PagedIterable inner - = this.serviceClient().listRemoteLoginInformation(resourceGroupName, workspaceName, clusterName, context); - return Utils.mapPage(inner, inner1 -> new RemoteLoginInformationImpl(inner1, this.manager())); - } - - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); - } - - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Integer maxResults, - Context context) { - PagedIterable inner - = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, maxResults, context); - return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); - } - - public Cluster getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); - if (clusterName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); - if (clusterName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, 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 workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); - if (clusterName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); - } - this.delete(resourceGroupName, workspaceName, clusterName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); - if (clusterName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); - } - this.delete(resourceGroupName, workspaceName, clusterName, context); - } - - private ClustersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.batchai.BatchAIManager manager() { - return this.serviceManager; - } - - public ClusterImpl define(String name) { - return new ClusterImpl(name, this.manager()); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ExperimentImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ExperimentImpl.java deleted file mode 100644 index 6ee111892dc0..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ExperimentImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.resourcemanager.batchai.fluent.models.ExperimentInner; -import com.azure.resourcemanager.batchai.models.Experiment; -import com.azure.resourcemanager.batchai.models.ProvisioningState; -import java.time.OffsetDateTime; - -public final class ExperimentImpl implements Experiment { - private ExperimentInner innerObject; - - private final com.azure.resourcemanager.batchai.BatchAIManager serviceManager; - - ExperimentImpl(ExperimentInner innerObject, com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public OffsetDateTime creationTime() { - return this.innerModel().creationTime(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public OffsetDateTime provisioningStateTransitionTime() { - return this.innerModel().provisioningStateTransitionTime(); - } - - public ExperimentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.batchai.BatchAIManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ExperimentsClientImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ExperimentsClientImpl.java deleted file mode 100644 index 5c815be8a3ff..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ExperimentsClientImpl.java +++ /dev/null @@ -1,974 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.batchai.fluent.ExperimentsClient; -import com.azure.resourcemanager.batchai.fluent.models.ExperimentInner; -import com.azure.resourcemanager.batchai.models.ExperimentListResult; -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 ExperimentsClient. */ -public final class ExperimentsClientImpl implements ExperimentsClient { - private final ClientLogger logger = new ClientLogger(ExperimentsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ExperimentsService service; - - /** The service client containing this operation class. */ - private final BatchAIImpl client; - - /** - * Initializes an instance of ExperimentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ExperimentsClientImpl(BatchAIImpl client) { - this.service - = RestProxy.create(ExperimentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for BatchAIExperiments to be used by the proxy service to perform REST - * calls. - */ - @Host("{$host}") - @ServiceInterface(name = "BatchAIExperiments") - private interface ExperimentsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/experiments") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspace(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("maxresults") Integer maxResults, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/experiments/{experimentName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("experimentName") String experimentName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/experiments/{experimentName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("experimentName") String experimentName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/experiments/{experimentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("experimentName") String experimentName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of Experiments within the specified Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments within the specified Workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, - String workspaceName, Integer maxResults) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByWorkspace(this.client.getEndpoint(), resourceGroupName, workspaceName, - maxResults, this.client.getApiVersion(), this.client.getSubscriptionId(), 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 a list of Experiments within the specified Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments within the specified Workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, - String workspaceName, Integer maxResults, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByWorkspace(this.client.getEndpoint(), resourceGroupName, workspaceName, maxResults, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of Experiments within the specified Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments within the specified Workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName, - Integer maxResults) { - return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, maxResults), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of Experiments within the specified Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments within the specified Workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) { - final Integer maxResults = null; - return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, maxResults), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of Experiments within the specified Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments within the specified Workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName, - Integer maxResults, Context context) { - return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, maxResults, context), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of Experiments within the specified Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments within the specified Workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { - final Integer maxResults = null; - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, maxResults)); - } - - /** - * Gets a list of Experiments within the specified Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments within the specified Workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, - Integer maxResults, Context context) { - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, maxResults, context)); - } - - /** - * Creates an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return experiment information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, - String experimentName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required 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.create(this.client.getEndpoint(), resourceGroupName, workspaceName, - experimentName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return experiment information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, - String experimentName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required 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.create(this.client.getEndpoint(), resourceGroupName, workspaceName, experimentName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Creates an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return experiment information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ExperimentInner> beginCreateAsync(String resourceGroupName, - String workspaceName, String experimentName) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, workspaceName, experimentName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExperimentInner.class, ExperimentInner.class, Context.NONE); - } - - /** - * Creates an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return experiment information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ExperimentInner> beginCreateAsync(String resourceGroupName, - String workspaceName, String experimentName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, workspaceName, experimentName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ExperimentInner.class, ExperimentInner.class, context); - } - - /** - * Creates an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return experiment information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ExperimentInner> beginCreate(String resourceGroupName, - String workspaceName, String experimentName) { - return beginCreateAsync(resourceGroupName, workspaceName, experimentName).getSyncPoller(); - } - - /** - * Creates an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return experiment information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ExperimentInner> beginCreate(String resourceGroupName, - String workspaceName, String experimentName, Context context) { - return beginCreateAsync(resourceGroupName, workspaceName, experimentName, context).getSyncPoller(); - } - - /** - * Creates an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return experiment information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String workspaceName, String experimentName) { - return beginCreateAsync(resourceGroupName, workspaceName, experimentName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return experiment information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String workspaceName, String experimentName, - Context context) { - return beginCreateAsync(resourceGroupName, workspaceName, experimentName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return experiment information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ExperimentInner create(String resourceGroupName, String workspaceName, String experimentName) { - return createAsync(resourceGroupName, workspaceName, experimentName).block(); - } - - /** - * Creates an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return experiment information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ExperimentInner create(String resourceGroupName, String workspaceName, String experimentName, - Context context) { - return createAsync(resourceGroupName, workspaceName, experimentName, context).block(); - } - - /** - * Deletes an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, - String experimentName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required 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.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, - experimentName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, - String experimentName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required 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.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, experimentName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Deletes an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String experimentName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, experimentName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - Context.NONE); - } - - /** - * Deletes an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String experimentName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, experimentName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String experimentName) { - return beginDeleteAsync(resourceGroupName, workspaceName, experimentName).getSyncPoller(); - } - - /** - * Deletes an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String experimentName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, experimentName, context).getSyncPoller(); - } - - /** - * Deletes an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, String experimentName) { - return beginDeleteAsync(resourceGroupName, workspaceName, experimentName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, String experimentName, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, experimentName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String experimentName) { - deleteAsync(resourceGroupName, workspaceName, experimentName).block(); - } - - /** - * Deletes an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String experimentName, Context context) { - deleteAsync(resourceGroupName, workspaceName, experimentName, context).block(); - } - - /** - * Gets information about an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an Experiment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String experimentName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required 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.get(this.client.getEndpoint(), resourceGroupName, workspaceName, - experimentName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets information about an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an Experiment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String experimentName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required 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.get(this.client.getEndpoint(), resourceGroupName, workspaceName, experimentName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Gets information about an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an Experiment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String experimentName) { - return getWithResponseAsync(resourceGroupName, workspaceName, experimentName) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets information about an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an Experiment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ExperimentInner get(String resourceGroupName, String workspaceName, String experimentName) { - return getAsync(resourceGroupName, workspaceName, experimentName).block(); - } - - /** - * Gets information about an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 an Experiment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String experimentName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, experimentName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(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.listByWorkspaceNext(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 values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(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.listByWorkspaceNext(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/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ExperimentsImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ExperimentsImpl.java deleted file mode 100644 index 676aa204f5bf..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/ExperimentsImpl.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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.batchai.fluent.ExperimentsClient; -import com.azure.resourcemanager.batchai.fluent.models.ExperimentInner; -import com.azure.resourcemanager.batchai.models.Experiment; -import com.azure.resourcemanager.batchai.models.Experiments; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class ExperimentsImpl implements Experiments { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ExperimentsImpl.class); - - private final ExperimentsClient innerClient; - - private final com.azure.resourcemanager.batchai.BatchAIManager serviceManager; - - public ExperimentsImpl(ExperimentsClient innerClient, - com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager())); - } - - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Integer maxResults, - Context context) { - PagedIterable inner - = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, maxResults, context); - return Utils.mapPage(inner, inner1 -> new ExperimentImpl(inner1, this.manager())); - } - - public Experiment create(String resourceGroupName, String workspaceName, String experimentName) { - ExperimentInner inner = this.serviceClient().create(resourceGroupName, workspaceName, experimentName); - if (inner != null) { - return new ExperimentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Experiment create(String resourceGroupName, String workspaceName, String experimentName, Context context) { - ExperimentInner inner = this.serviceClient().create(resourceGroupName, workspaceName, experimentName, context); - if (inner != null) { - return new ExperimentImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String experimentName) { - this.serviceClient().delete(resourceGroupName, workspaceName, experimentName); - } - - public void delete(String resourceGroupName, String workspaceName, String experimentName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, experimentName, context); - } - - public Experiment get(String resourceGroupName, String workspaceName, String experimentName) { - ExperimentInner inner = this.serviceClient().get(resourceGroupName, workspaceName, experimentName); - if (inner != null) { - return new ExperimentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String experimentName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, experimentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ExperimentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private ExperimentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.batchai.BatchAIManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/FileImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/FileImpl.java deleted file mode 100644 index 75b57a662924..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/FileImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.resourcemanager.batchai.fluent.models.FileInner; -import com.azure.resourcemanager.batchai.models.File; -import com.azure.resourcemanager.batchai.models.FileType; -import java.time.OffsetDateTime; - -public final class FileImpl implements File { - private FileInner innerObject; - - private final com.azure.resourcemanager.batchai.BatchAIManager serviceManager; - - FileImpl(FileInner innerObject, com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public FileType fileType() { - return this.innerModel().fileType(); - } - - public String downloadUrl() { - return this.innerModel().downloadUrl(); - } - - public OffsetDateTime lastModified() { - return this.innerModel().lastModified(); - } - - public Long contentLength() { - return this.innerModel().contentLength(); - } - - public FileInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.batchai.BatchAIManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/FileServerImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/FileServerImpl.java deleted file mode 100644 index 2c6779fceae2..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/FileServerImpl.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.batchai.fluent.models.FileServerInner; -import com.azure.resourcemanager.batchai.models.DataDisks; -import com.azure.resourcemanager.batchai.models.FileServer; -import com.azure.resourcemanager.batchai.models.FileServerCreateParameters; -import com.azure.resourcemanager.batchai.models.FileServerProvisioningState; -import com.azure.resourcemanager.batchai.models.MountSettings; -import com.azure.resourcemanager.batchai.models.ResourceId; -import com.azure.resourcemanager.batchai.models.SshConfiguration; -import java.time.OffsetDateTime; - -public final class FileServerImpl implements FileServer, FileServer.Definition { - private FileServerInner innerObject; - - private final com.azure.resourcemanager.batchai.BatchAIManager serviceManager; - - FileServerImpl(FileServerInner innerObject, com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String vmSize() { - return this.innerModel().vmSize(); - } - - public SshConfiguration sshConfiguration() { - return this.innerModel().sshConfiguration(); - } - - public DataDisks dataDisks() { - return this.innerModel().dataDisks(); - } - - public ResourceId subnet() { - return this.innerModel().subnet(); - } - - public MountSettings mountSettings() { - return this.innerModel().mountSettings(); - } - - public OffsetDateTime provisioningStateTransitionTime() { - return this.innerModel().provisioningStateTransitionTime(); - } - - public OffsetDateTime creationTime() { - return this.innerModel().creationTime(); - } - - public FileServerProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public FileServerInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.batchai.BatchAIManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String fileServerName; - - private FileServerCreateParameters createParameters; - - public FileServerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public FileServer create() { - this.innerObject = serviceManager.serviceClient() - .getFileServers() - .create(resourceGroupName, workspaceName, fileServerName, createParameters, Context.NONE); - return this; - } - - public FileServer create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getFileServers() - .create(resourceGroupName, workspaceName, fileServerName, createParameters, context); - return this; - } - - FileServerImpl(String name, com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerObject = new FileServerInner(); - this.serviceManager = serviceManager; - this.fileServerName = name; - this.createParameters = new FileServerCreateParameters(); - } - - public FileServer refresh() { - this.innerObject = serviceManager.serviceClient() - .getFileServers() - .getWithResponse(resourceGroupName, workspaceName, fileServerName, Context.NONE) - .getValue(); - return this; - } - - public FileServer refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getFileServers() - .getWithResponse(resourceGroupName, workspaceName, fileServerName, context) - .getValue(); - return this; - } - - public FileServerImpl withVmSize(String vmSize) { - this.createParameters.withVmSize(vmSize); - return this; - } - - public FileServerImpl withSshConfiguration(SshConfiguration sshConfiguration) { - this.createParameters.withSshConfiguration(sshConfiguration); - return this; - } - - public FileServerImpl withDataDisks(DataDisks dataDisks) { - this.createParameters.withDataDisks(dataDisks); - return this; - } - - public FileServerImpl withSubnet(ResourceId subnet) { - this.createParameters.withSubnet(subnet); - return this; - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/FileServersClientImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/FileServersClientImpl.java deleted file mode 100644 index fdb2840acc0c..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/FileServersClientImpl.java +++ /dev/null @@ -1,1026 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.batchai.fluent.FileServersClient; -import com.azure.resourcemanager.batchai.fluent.models.FileServerInner; -import com.azure.resourcemanager.batchai.models.FileServerCreateParameters; -import com.azure.resourcemanager.batchai.models.FileServerListResult; -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 FileServersClient. */ -public final class FileServersClientImpl implements FileServersClient { - private final ClientLogger logger = new ClientLogger(FileServersClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final FileServersService service; - - /** The service client containing this operation class. */ - private final BatchAIImpl client; - - /** - * Initializes an instance of FileServersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - FileServersClientImpl(BatchAIImpl client) { - this.service - = RestProxy.create(FileServersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for BatchAIFileServers to be used by the proxy service to perform REST - * calls. - */ - @Host("{$host}") - @ServiceInterface(name = "BatchAIFileServers") - private interface FileServersService { - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/fileServers/{fileServerName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("fileServerName") String fileServerName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") FileServerCreateParameters parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/fileServers/{fileServerName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("fileServerName") String fileServerName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/fileServers/{fileServerName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("fileServerName") String fileServerName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/fileServers") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspace(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("maxresults") Integer maxResults, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Creates a File Server in the given workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param parameters The parameters to provide for File Server creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return file Server information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, - String fileServerName, FileServerCreateParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (fileServerName == null) { - return Mono.error(new IllegalArgumentException("Parameter fileServerName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), resourceGroupName, workspaceName, fileServerName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a File Server in the given workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param parameters The parameters to provide for File Server creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return file Server information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, - String fileServerName, FileServerCreateParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (fileServerName == null) { - return Mono.error(new IllegalArgumentException("Parameter fileServerName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, workspaceName, fileServerName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Creates a File Server in the given workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param parameters The parameters to provide for File Server creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return file Server information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, FileServerInner> beginCreateAsync(String resourceGroupName, - String workspaceName, String fileServerName, FileServerCreateParameters parameters) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, workspaceName, fileServerName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - FileServerInner.class, FileServerInner.class, Context.NONE); - } - - /** - * Creates a File Server in the given workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param parameters The parameters to provide for File Server creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return file Server information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, FileServerInner> beginCreateAsync(String resourceGroupName, - String workspaceName, String fileServerName, FileServerCreateParameters parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, workspaceName, fileServerName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - FileServerInner.class, FileServerInner.class, context); - } - - /** - * Creates a File Server in the given workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param parameters The parameters to provide for File Server creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return file Server information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, FileServerInner> beginCreate(String resourceGroupName, - String workspaceName, String fileServerName, FileServerCreateParameters parameters) { - return beginCreateAsync(resourceGroupName, workspaceName, fileServerName, parameters).getSyncPoller(); - } - - /** - * Creates a File Server in the given workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param parameters The parameters to provide for File Server creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return file Server information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, FileServerInner> beginCreate(String resourceGroupName, - String workspaceName, String fileServerName, FileServerCreateParameters parameters, Context context) { - return beginCreateAsync(resourceGroupName, workspaceName, fileServerName, parameters, context).getSyncPoller(); - } - - /** - * Creates a File Server in the given workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param parameters The parameters to provide for File Server creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return file Server information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String workspaceName, String fileServerName, - FileServerCreateParameters parameters) { - return beginCreateAsync(resourceGroupName, workspaceName, fileServerName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a File Server in the given workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param parameters The parameters to provide for File Server creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return file Server information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String workspaceName, String fileServerName, - FileServerCreateParameters parameters, Context context) { - return beginCreateAsync(resourceGroupName, workspaceName, fileServerName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a File Server in the given workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param parameters The parameters to provide for File Server creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return file Server information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FileServerInner create(String resourceGroupName, String workspaceName, String fileServerName, - FileServerCreateParameters parameters) { - return createAsync(resourceGroupName, workspaceName, fileServerName, parameters).block(); - } - - /** - * Creates a File Server in the given workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param parameters The parameters to provide for File Server creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return file Server information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FileServerInner create(String resourceGroupName, String workspaceName, String fileServerName, - FileServerCreateParameters parameters, Context context) { - return createAsync(resourceGroupName, workspaceName, fileServerName, parameters, context).block(); - } - - /** - * Deletes a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, - String fileServerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (fileServerName == null) { - return Mono.error(new IllegalArgumentException("Parameter fileServerName is required 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.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, - fileServerName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, - String fileServerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (fileServerName == null) { - return Mono.error(new IllegalArgumentException("Parameter fileServerName is required 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.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, fileServerName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Deletes a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String fileServerName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, fileServerName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - Context.NONE); - } - - /** - * Deletes a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String fileServerName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, fileServerName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String fileServerName) { - return beginDeleteAsync(resourceGroupName, workspaceName, fileServerName).getSyncPoller(); - } - - /** - * Deletes a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String fileServerName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, fileServerName, context).getSyncPoller(); - } - - /** - * Deletes a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, String fileServerName) { - return beginDeleteAsync(resourceGroupName, workspaceName, fileServerName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, String fileServerName, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, fileServerName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String fileServerName) { - deleteAsync(resourceGroupName, workspaceName, fileServerName).block(); - } - - /** - * Deletes a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String fileServerName, Context context) { - deleteAsync(resourceGroupName, workspaceName, fileServerName, context).block(); - } - - /** - * Gets information about a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a File Server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String fileServerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (fileServerName == null) { - return Mono.error(new IllegalArgumentException("Parameter fileServerName is required 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.get(this.client.getEndpoint(), resourceGroupName, workspaceName, - fileServerName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets information about a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a File Server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String fileServerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (fileServerName == null) { - return Mono.error(new IllegalArgumentException("Parameter fileServerName is required 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.get(this.client.getEndpoint(), resourceGroupName, workspaceName, fileServerName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Gets information about a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a File Server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String fileServerName) { - return getWithResponseAsync(resourceGroupName, workspaceName, fileServerName) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets information about a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a File Server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FileServerInner get(String resourceGroupName, String workspaceName, String fileServerName) { - return getAsync(resourceGroupName, workspaceName, fileServerName).block(); - } - - /** - * Gets information about a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a File Server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String fileServerName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, fileServerName, context).block(); - } - - /** - * Gets a list of File Servers associated with the specified workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of File Servers associated with the specified workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, - String workspaceName, Integer maxResults) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByWorkspace(this.client.getEndpoint(), resourceGroupName, workspaceName, - maxResults, this.client.getApiVersion(), this.client.getSubscriptionId(), 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 a list of File Servers associated with the specified workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of File Servers associated with the specified workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, - String workspaceName, Integer maxResults, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByWorkspace(this.client.getEndpoint(), resourceGroupName, workspaceName, maxResults, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of File Servers associated with the specified workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of File Servers associated with the specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName, - Integer maxResults) { - return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, maxResults), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of File Servers associated with the specified workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of File Servers associated with the specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) { - final Integer maxResults = null; - return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, maxResults), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of File Servers associated with the specified workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of File Servers associated with the specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName, - Integer maxResults, Context context) { - return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, maxResults, context), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of File Servers associated with the specified workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of File Servers associated with the specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { - final Integer maxResults = null; - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, maxResults)); - } - - /** - * Gets a list of File Servers associated with the specified workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of File Servers associated with the specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, - Integer maxResults, Context context) { - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, maxResults, 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 values returned by the File Server List operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(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.listByWorkspaceNext(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 values returned by the File Server List operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(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.listByWorkspaceNext(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/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/FileServersImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/FileServersImpl.java deleted file mode 100644 index 7f1ea364107a..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/FileServersImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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.batchai.fluent.FileServersClient; -import com.azure.resourcemanager.batchai.fluent.models.FileServerInner; -import com.azure.resourcemanager.batchai.models.FileServer; -import com.azure.resourcemanager.batchai.models.FileServers; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class FileServersImpl implements FileServers { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(FileServersImpl.class); - - private final FileServersClient innerClient; - - private final com.azure.resourcemanager.batchai.BatchAIManager serviceManager; - - public FileServersImpl(FileServersClient innerClient, - com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public void delete(String resourceGroupName, String workspaceName, String fileServerName) { - this.serviceClient().delete(resourceGroupName, workspaceName, fileServerName); - } - - public void delete(String resourceGroupName, String workspaceName, String fileServerName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, fileServerName, context); - } - - public FileServer get(String resourceGroupName, String workspaceName, String fileServerName) { - FileServerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, fileServerName); - if (inner != null) { - return new FileServerImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String fileServerName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, fileServerName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new FileServerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new FileServerImpl(inner1, this.manager())); - } - - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Integer maxResults, - Context context) { - PagedIterable inner - = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, maxResults, context); - return Utils.mapPage(inner, inner1 -> new FileServerImpl(inner1, this.manager())); - } - - public FileServer getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String fileServerName = Utils.getValueFromIdByName(id, "fileServers"); - if (fileServerName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fileServers'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, fileServerName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String fileServerName = Utils.getValueFromIdByName(id, "fileServers"); - if (fileServerName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fileServers'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, fileServerName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String fileServerName = Utils.getValueFromIdByName(id, "fileServers"); - if (fileServerName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fileServers'.", id))); - } - this.delete(resourceGroupName, workspaceName, fileServerName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String fileServerName = Utils.getValueFromIdByName(id, "fileServers"); - if (fileServerName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'fileServers'.", id))); - } - this.delete(resourceGroupName, workspaceName, fileServerName, context); - } - - private FileServersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.batchai.BatchAIManager manager() { - return this.serviceManager; - } - - public FileServerImpl define(String name) { - return new FileServerImpl(name, this.manager()); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/JobImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/JobImpl.java deleted file mode 100644 index ac6d4724909a..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/JobImpl.java +++ /dev/null @@ -1,383 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batchai.fluent.models.JobInner; -import com.azure.resourcemanager.batchai.models.Caffe2Settings; -import com.azure.resourcemanager.batchai.models.CaffeSettings; -import com.azure.resourcemanager.batchai.models.ChainerSettings; -import com.azure.resourcemanager.batchai.models.CntKsettings; -import com.azure.resourcemanager.batchai.models.ContainerSettings; -import com.azure.resourcemanager.batchai.models.CustomMpiSettings; -import com.azure.resourcemanager.batchai.models.CustomToolkitSettings; -import com.azure.resourcemanager.batchai.models.EnvironmentVariable; -import com.azure.resourcemanager.batchai.models.EnvironmentVariableWithSecretValue; -import com.azure.resourcemanager.batchai.models.ExecutionState; -import com.azure.resourcemanager.batchai.models.HorovodSettings; -import com.azure.resourcemanager.batchai.models.InputDirectory; -import com.azure.resourcemanager.batchai.models.Job; -import com.azure.resourcemanager.batchai.models.JobBasePropertiesConstraints; -import com.azure.resourcemanager.batchai.models.JobCreateParameters; -import com.azure.resourcemanager.batchai.models.JobPreparation; -import com.azure.resourcemanager.batchai.models.JobPriority; -import com.azure.resourcemanager.batchai.models.JobPropertiesConstraints; -import com.azure.resourcemanager.batchai.models.JobPropertiesExecutionInfo; -import com.azure.resourcemanager.batchai.models.MountVolumes; -import com.azure.resourcemanager.batchai.models.OutputDirectory; -import com.azure.resourcemanager.batchai.models.ProvisioningState; -import com.azure.resourcemanager.batchai.models.PyTorchSettings; -import com.azure.resourcemanager.batchai.models.RemoteLoginInformation; -import com.azure.resourcemanager.batchai.models.ResourceId; -import com.azure.resourcemanager.batchai.models.TensorFlowSettings; -import com.azure.resourcemanager.batchai.models.ToolType; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class JobImpl implements Job, Job.Definition { - private JobInner innerObject; - - private final com.azure.resourcemanager.batchai.BatchAIManager serviceManager; - - JobImpl(JobInner innerObject, com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public JobPriority schedulingPriority() { - return this.innerModel().schedulingPriority(); - } - - public ResourceId cluster() { - return this.innerModel().cluster(); - } - - public MountVolumes mountVolumes() { - return this.innerModel().mountVolumes(); - } - - public Integer nodeCount() { - return this.innerModel().nodeCount(); - } - - public ContainerSettings containerSettings() { - return this.innerModel().containerSettings(); - } - - public ToolType toolType() { - return this.innerModel().toolType(); - } - - public CntKsettings cntkSettings() { - return this.innerModel().cntkSettings(); - } - - public PyTorchSettings pyTorchSettings() { - return this.innerModel().pyTorchSettings(); - } - - public TensorFlowSettings tensorFlowSettings() { - return this.innerModel().tensorFlowSettings(); - } - - public CaffeSettings caffeSettings() { - return this.innerModel().caffeSettings(); - } - - public Caffe2Settings caffe2Settings() { - return this.innerModel().caffe2Settings(); - } - - public ChainerSettings chainerSettings() { - return this.innerModel().chainerSettings(); - } - - public CustomToolkitSettings customToolkitSettings() { - return this.innerModel().customToolkitSettings(); - } - - public CustomMpiSettings customMpiSettings() { - return this.innerModel().customMpiSettings(); - } - - public HorovodSettings horovodSettings() { - return this.innerModel().horovodSettings(); - } - - public JobPreparation jobPreparation() { - return this.innerModel().jobPreparation(); - } - - public String jobOutputDirectoryPathSegment() { - return this.innerModel().jobOutputDirectoryPathSegment(); - } - - public String stdOutErrPathPrefix() { - return this.innerModel().stdOutErrPathPrefix(); - } - - public List inputDirectories() { - List inner = this.innerModel().inputDirectories(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List outputDirectories() { - List inner = this.innerModel().outputDirectories(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List environmentVariables() { - List inner = this.innerModel().environmentVariables(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List secrets() { - List inner = this.innerModel().secrets(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public JobPropertiesConstraints constraints() { - return this.innerModel().constraints(); - } - - public OffsetDateTime creationTime() { - return this.innerModel().creationTime(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public OffsetDateTime provisioningStateTransitionTime() { - return this.innerModel().provisioningStateTransitionTime(); - } - - public ExecutionState executionState() { - return this.innerModel().executionState(); - } - - public OffsetDateTime executionStateTransitionTime() { - return this.innerModel().executionStateTransitionTime(); - } - - public JobPropertiesExecutionInfo executionInfo() { - return this.innerModel().executionInfo(); - } - - public JobInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.batchai.BatchAIManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String experimentName; - - private String jobName; - - private JobCreateParameters createParameters; - - public JobImpl withExistingExperiment(String resourceGroupName, String workspaceName, String experimentName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.experimentName = experimentName; - return this; - } - - public Job create() { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .create(resourceGroupName, workspaceName, experimentName, jobName, createParameters, Context.NONE); - return this; - } - - public Job create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .create(resourceGroupName, workspaceName, experimentName, jobName, createParameters, context); - return this; - } - - JobImpl(String name, com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerObject = new JobInner(); - this.serviceManager = serviceManager; - this.jobName = name; - this.createParameters = new JobCreateParameters(); - } - - public Job refresh() { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .getWithResponse(resourceGroupName, workspaceName, experimentName, jobName, Context.NONE) - .getValue(); - return this; - } - - public Job refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .getWithResponse(resourceGroupName, workspaceName, experimentName, jobName, context) - .getValue(); - return this; - } - - public PagedIterable listRemoteLoginInformation() { - return serviceManager.jobs() - .listRemoteLoginInformation(resourceGroupName, workspaceName, experimentName, jobName); - } - - public PagedIterable listRemoteLoginInformation(Context context) { - return serviceManager.jobs() - .listRemoteLoginInformation(resourceGroupName, workspaceName, experimentName, jobName, context); - } - - public void terminate() { - serviceManager.jobs().terminate(resourceGroupName, workspaceName, experimentName, jobName); - } - - public void terminate(Context context) { - serviceManager.jobs().terminate(resourceGroupName, workspaceName, experimentName, jobName, context); - } - - public JobImpl withSchedulingPriority(JobPriority schedulingPriority) { - this.createParameters.withSchedulingPriority(schedulingPriority); - return this; - } - - public JobImpl withCluster(ResourceId cluster) { - this.createParameters.withCluster(cluster); - return this; - } - - public JobImpl withMountVolumes(MountVolumes mountVolumes) { - this.createParameters.withMountVolumes(mountVolumes); - return this; - } - - public JobImpl withNodeCount(Integer nodeCount) { - this.createParameters.withNodeCount(nodeCount); - return this; - } - - public JobImpl withContainerSettings(ContainerSettings containerSettings) { - this.createParameters.withContainerSettings(containerSettings); - return this; - } - - public JobImpl withCntkSettings(CntKsettings cntkSettings) { - this.createParameters.withCntkSettings(cntkSettings); - return this; - } - - public JobImpl withPyTorchSettings(PyTorchSettings pyTorchSettings) { - this.createParameters.withPyTorchSettings(pyTorchSettings); - return this; - } - - public JobImpl withTensorFlowSettings(TensorFlowSettings tensorFlowSettings) { - this.createParameters.withTensorFlowSettings(tensorFlowSettings); - return this; - } - - public JobImpl withCaffeSettings(CaffeSettings caffeSettings) { - this.createParameters.withCaffeSettings(caffeSettings); - return this; - } - - public JobImpl withCaffe2Settings(Caffe2Settings caffe2Settings) { - this.createParameters.withCaffe2Settings(caffe2Settings); - return this; - } - - public JobImpl withChainerSettings(ChainerSettings chainerSettings) { - this.createParameters.withChainerSettings(chainerSettings); - return this; - } - - public JobImpl withCustomToolkitSettings(CustomToolkitSettings customToolkitSettings) { - this.createParameters.withCustomToolkitSettings(customToolkitSettings); - return this; - } - - public JobImpl withCustomMpiSettings(CustomMpiSettings customMpiSettings) { - this.createParameters.withCustomMpiSettings(customMpiSettings); - return this; - } - - public JobImpl withHorovodSettings(HorovodSettings horovodSettings) { - this.createParameters.withHorovodSettings(horovodSettings); - return this; - } - - public JobImpl withJobPreparation(JobPreparation jobPreparation) { - this.createParameters.withJobPreparation(jobPreparation); - return this; - } - - public JobImpl withStdOutErrPathPrefix(String stdOutErrPathPrefix) { - this.createParameters.withStdOutErrPathPrefix(stdOutErrPathPrefix); - return this; - } - - public JobImpl withInputDirectories(List inputDirectories) { - this.createParameters.withInputDirectories(inputDirectories); - return this; - } - - public JobImpl withOutputDirectories(List outputDirectories) { - this.createParameters.withOutputDirectories(outputDirectories); - return this; - } - - public JobImpl withEnvironmentVariables(List environmentVariables) { - this.createParameters.withEnvironmentVariables(environmentVariables); - return this; - } - - public JobImpl withSecrets(List secrets) { - this.createParameters.withSecrets(secrets); - return this; - } - - public JobImpl withConstraints(JobBasePropertiesConstraints constraints) { - this.createParameters.withConstraints(constraints); - return this; - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/JobsClientImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/JobsClientImpl.java deleted file mode 100644 index 59f95c0c6ccf..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/JobsClientImpl.java +++ /dev/null @@ -1,2048 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.batchai.fluent.JobsClient; -import com.azure.resourcemanager.batchai.fluent.models.FileInner; -import com.azure.resourcemanager.batchai.fluent.models.JobInner; -import com.azure.resourcemanager.batchai.fluent.models.RemoteLoginInformationInner; -import com.azure.resourcemanager.batchai.models.FileListResult; -import com.azure.resourcemanager.batchai.models.JobCreateParameters; -import com.azure.resourcemanager.batchai.models.JobListResult; -import com.azure.resourcemanager.batchai.models.RemoteLoginInformationListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in JobsClient. */ -public final class JobsClientImpl implements JobsClient { - private final ClientLogger logger = new ClientLogger(JobsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final JobsService service; - - /** The service client containing this operation class. */ - private final BatchAIImpl client; - - /** - * Initializes an instance of JobsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - JobsClientImpl(BatchAIImpl client) { - this.service = RestProxy.create(JobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for BatchAIJobs to be used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "BatchAIJobs") - private interface JobsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/experiments/{experimentName}/jobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByExperiment(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("experimentName") String experimentName, @QueryParam("maxresults") Integer maxResults, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/experiments/{experimentName}/jobs/{jobName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("experimentName") String experimentName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") JobCreateParameters parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/experiments/{experimentName}/jobs/{jobName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("experimentName") String experimentName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/experiments/{experimentName}/jobs/{jobName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("experimentName") String experimentName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/experiments/{experimentName}/jobs/{jobName}/listOutputFiles") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listOutputFiles(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("experimentName") String experimentName, @PathParam("jobName") String jobName, - @QueryParam("outputdirectoryid") String outputdirectoryid, @QueryParam("directory") String directory, - @QueryParam("linkexpiryinminutes") Integer linkexpiryinminutes, - @QueryParam("maxresults") Integer maxResults, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/experiments/{experimentName}/jobs/{jobName}/listRemoteLoginInformation") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRemoteLoginInformation(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("experimentName") String experimentName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}/experiments/{experimentName}/jobs/{jobName}/terminate") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> terminate(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("experimentName") String experimentName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByExperimentNext( - @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> listOutputFilesNext( - @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> listRemoteLoginInformationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of Jobs within the specified Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Jobs within the specified Experiment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByExperimentSinglePageAsync(String resourceGroupName, - String workspaceName, String experimentName, Integer maxResults) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required 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.listByExperiment(this.client.getEndpoint(), resourceGroupName, - workspaceName, experimentName, maxResults, this.client.getApiVersion(), this.client.getSubscriptionId(), - 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 a list of Jobs within the specified Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Jobs within the specified Experiment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByExperimentSinglePageAsync(String resourceGroupName, - String workspaceName, String experimentName, Integer maxResults, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required 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 - .listByExperiment(this.client.getEndpoint(), resourceGroupName, workspaceName, experimentName, maxResults, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of Jobs within the specified Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Jobs within the specified Experiment. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByExperimentAsync(String resourceGroupName, String workspaceName, - String experimentName, Integer maxResults) { - return new PagedFlux<>( - () -> listByExperimentSinglePageAsync(resourceGroupName, workspaceName, experimentName, maxResults), - nextLink -> listByExperimentNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of Jobs within the specified Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Jobs within the specified Experiment. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByExperimentAsync(String resourceGroupName, String workspaceName, - String experimentName) { - final Integer maxResults = null; - return new PagedFlux<>( - () -> listByExperimentSinglePageAsync(resourceGroupName, workspaceName, experimentName, maxResults), - nextLink -> listByExperimentNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of Jobs within the specified Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Jobs within the specified Experiment. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByExperimentAsync(String resourceGroupName, String workspaceName, - String experimentName, Integer maxResults, Context context) { - return new PagedFlux<>(() -> listByExperimentSinglePageAsync(resourceGroupName, workspaceName, experimentName, - maxResults, context), nextLink -> listByExperimentNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of Jobs within the specified Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Jobs within the specified Experiment. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByExperiment(String resourceGroupName, String workspaceName, - String experimentName) { - final Integer maxResults = null; - return new PagedIterable<>(listByExperimentAsync(resourceGroupName, workspaceName, experimentName, maxResults)); - } - - /** - * Gets a list of Jobs within the specified Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Jobs within the specified Experiment. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByExperiment(String resourceGroupName, String workspaceName, - String experimentName, Integer maxResults, Context context) { - return new PagedIterable<>( - listByExperimentAsync(resourceGroupName, workspaceName, experimentName, maxResults, context)); - } - - /** - * Creates a Job in the given Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param parameters The parameters to provide for job creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, - String experimentName, String jobName, JobCreateParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), resourceGroupName, workspaceName, experimentName, - jobName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a Job in the given Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param parameters The parameters to provide for job creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, - String experimentName, String jobName, JobCreateParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, workspaceName, experimentName, jobName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Creates a Job in the given Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param parameters The parameters to provide for job creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, JobInner> beginCreateAsync(String resourceGroupName, String workspaceName, - String experimentName, String jobName, JobCreateParameters parameters) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, workspaceName, experimentName, jobName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, Context.NONE); - } - - /** - * Creates a Job in the given Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param parameters The parameters to provide for job creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, JobInner> beginCreateAsync(String resourceGroupName, String workspaceName, - String experimentName, String jobName, JobCreateParameters parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, workspaceName, experimentName, jobName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, context); - } - - /** - * Creates a Job in the given Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param parameters The parameters to provide for job creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, JobInner> beginCreate(String resourceGroupName, String workspaceName, - String experimentName, String jobName, JobCreateParameters parameters) { - return beginCreateAsync(resourceGroupName, workspaceName, experimentName, jobName, parameters).getSyncPoller(); - } - - /** - * Creates a Job in the given Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param parameters The parameters to provide for job creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, JobInner> beginCreate(String resourceGroupName, String workspaceName, - String experimentName, String jobName, JobCreateParameters parameters, Context context) { - return beginCreateAsync(resourceGroupName, workspaceName, experimentName, jobName, parameters, context) - .getSyncPoller(); - } - - /** - * Creates a Job in the given Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param parameters The parameters to provide for job creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String workspaceName, String experimentName, - String jobName, JobCreateParameters parameters) { - return beginCreateAsync(resourceGroupName, workspaceName, experimentName, jobName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a Job in the given Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param parameters The parameters to provide for job creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String workspaceName, String experimentName, - String jobName, JobCreateParameters parameters, Context context) { - return beginCreateAsync(resourceGroupName, workspaceName, experimentName, jobName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a Job in the given Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param parameters The parameters to provide for job creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner create(String resourceGroupName, String workspaceName, String experimentName, String jobName, - JobCreateParameters parameters) { - return createAsync(resourceGroupName, workspaceName, experimentName, jobName, parameters).block(); - } - - /** - * Creates a Job in the given Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param parameters The parameters to provide for job creation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner create(String resourceGroupName, String workspaceName, String experimentName, String jobName, - JobCreateParameters parameters, Context context) { - return createAsync(resourceGroupName, workspaceName, experimentName, jobName, parameters, context).block(); - } - - /** - * Deletes a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, - String experimentName, String jobName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required 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.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, - experimentName, jobName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, - String experimentName, String jobName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required 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.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, experimentName, jobName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Deletes a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String experimentName, String jobName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, experimentName, jobName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - Context.NONE); - } - - /** - * Deletes a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String experimentName, String jobName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, experimentName, jobName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String experimentName, String jobName) { - return beginDeleteAsync(resourceGroupName, workspaceName, experimentName, jobName).getSyncPoller(); - } - - /** - * Deletes a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String experimentName, String jobName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, experimentName, jobName, context).getSyncPoller(); - } - - /** - * Deletes a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, String experimentName, - String jobName) { - return beginDeleteAsync(resourceGroupName, workspaceName, experimentName, jobName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, String experimentName, - String jobName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, experimentName, jobName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String experimentName, String jobName) { - deleteAsync(resourceGroupName, workspaceName, experimentName, jobName).block(); - } - - /** - * Deletes a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String experimentName, String jobName, - Context context) { - deleteAsync(resourceGroupName, workspaceName, experimentName, jobName, context).block(); - } - - /** - * Gets information about a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String experimentName, String jobName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required 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.get(this.client.getEndpoint(), resourceGroupName, workspaceName, - experimentName, jobName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets information about a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String experimentName, String jobName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required 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.get(this.client.getEndpoint(), resourceGroupName, workspaceName, experimentName, jobName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Gets information about a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String experimentName, - String jobName) { - return getWithResponseAsync(resourceGroupName, workspaceName, experimentName, jobName) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets information about a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner get(String resourceGroupName, String workspaceName, String experimentName, String jobName) { - return getAsync(resourceGroupName, workspaceName, experimentName, jobName).block(); - } - - /** - * Gets information about a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String experimentName, - String jobName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, experimentName, jobName, context).block(); - } - - /** - * List all directories and files inside the given directory of the Job's output directory (if the output directory - * is on Azure File Share or Azure Storage Container). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param outputdirectoryid Id of the job output directory. This is the OutputDirectory-->id parameter that is - * given by the user during Create Job. - * @param directory The path to the directory. - * @param linkexpiryinminutes The number of minutes after which the download link will expire. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listOutputFilesSinglePageAsync(String resourceGroupName, - String workspaceName, String experimentName, String jobName, String outputdirectoryid, String directory, - Integer linkexpiryinminutes, Integer maxResults) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (outputdirectoryid == null) { - return Mono - .error(new IllegalArgumentException("Parameter outputdirectoryid is required 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.listOutputFiles(this.client.getEndpoint(), resourceGroupName, workspaceName, - experimentName, jobName, outputdirectoryid, directory, linkexpiryinminutes, maxResults, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all directories and files inside the given directory of the Job's output directory (if the output directory - * is on Azure File Share or Azure Storage Container). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param outputdirectoryid Id of the job output directory. This is the OutputDirectory-->id parameter that is - * given by the user during Create Job. - * @param directory The path to the directory. - * @param linkexpiryinminutes The number of minutes after which the download link will expire. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listOutputFilesSinglePageAsync(String resourceGroupName, - String workspaceName, String experimentName, String jobName, String outputdirectoryid, String directory, - Integer linkexpiryinminutes, Integer maxResults, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (outputdirectoryid == null) { - return Mono - .error(new IllegalArgumentException("Parameter outputdirectoryid is required 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 - .listOutputFiles(this.client.getEndpoint(), resourceGroupName, workspaceName, experimentName, jobName, - outputdirectoryid, directory, linkexpiryinminutes, maxResults, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List all directories and files inside the given directory of the Job's output directory (if the output directory - * is on Azure File Share or Azure Storage Container). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param outputdirectoryid Id of the job output directory. This is the OutputDirectory-->id parameter that is - * given by the user during Create Job. - * @param directory The path to the directory. - * @param linkexpiryinminutes The number of minutes after which the download link will expire. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listOutputFilesAsync(String resourceGroupName, String workspaceName, - String experimentName, String jobName, String outputdirectoryid, String directory, Integer linkexpiryinminutes, - Integer maxResults) { - return new PagedFlux<>( - () -> listOutputFilesSinglePageAsync(resourceGroupName, workspaceName, experimentName, jobName, - outputdirectoryid, directory, linkexpiryinminutes, maxResults), - nextLink -> listOutputFilesNextSinglePageAsync(nextLink)); - } - - /** - * List all directories and files inside the given directory of the Job's output directory (if the output directory - * is on Azure File Share or Azure Storage Container). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param outputdirectoryid Id of the job output directory. This is the OutputDirectory-->id parameter that is - * given by the user during Create Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listOutputFilesAsync(String resourceGroupName, String workspaceName, - String experimentName, String jobName, String outputdirectoryid) { - final String directory = null; - final Integer linkexpiryinminutes = null; - final Integer maxResults = null; - return new PagedFlux<>( - () -> listOutputFilesSinglePageAsync(resourceGroupName, workspaceName, experimentName, jobName, - outputdirectoryid, directory, linkexpiryinminutes, maxResults), - nextLink -> listOutputFilesNextSinglePageAsync(nextLink)); - } - - /** - * List all directories and files inside the given directory of the Job's output directory (if the output directory - * is on Azure File Share or Azure Storage Container). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param outputdirectoryid Id of the job output directory. This is the OutputDirectory-->id parameter that is - * given by the user during Create Job. - * @param directory The path to the directory. - * @param linkexpiryinminutes The number of minutes after which the download link will expire. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listOutputFilesAsync(String resourceGroupName, String workspaceName, - String experimentName, String jobName, String outputdirectoryid, String directory, Integer linkexpiryinminutes, - Integer maxResults, Context context) { - return new PagedFlux<>( - () -> listOutputFilesSinglePageAsync(resourceGroupName, workspaceName, experimentName, jobName, - outputdirectoryid, directory, linkexpiryinminutes, maxResults, context), - nextLink -> listOutputFilesNextSinglePageAsync(nextLink, context)); - } - - /** - * List all directories and files inside the given directory of the Job's output directory (if the output directory - * is on Azure File Share or Azure Storage Container). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param outputdirectoryid Id of the job output directory. This is the OutputDirectory-->id parameter that is - * given by the user during Create Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listOutputFiles(String resourceGroupName, String workspaceName, - String experimentName, String jobName, String outputdirectoryid) { - final String directory = null; - final Integer linkexpiryinminutes = null; - final Integer maxResults = null; - return new PagedIterable<>(listOutputFilesAsync(resourceGroupName, workspaceName, experimentName, jobName, - outputdirectoryid, directory, linkexpiryinminutes, maxResults)); - } - - /** - * List all directories and files inside the given directory of the Job's output directory (if the output directory - * is on Azure File Share or Azure Storage Container). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param outputdirectoryid Id of the job output directory. This is the OutputDirectory-->id parameter that is - * given by the user during Create Job. - * @param directory The path to the directory. - * @param linkexpiryinminutes The number of minutes after which the download link will expire. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listOutputFiles(String resourceGroupName, String workspaceName, - String experimentName, String jobName, String outputdirectoryid, String directory, Integer linkexpiryinminutes, - Integer maxResults, Context context) { - return new PagedIterable<>(listOutputFilesAsync(resourceGroupName, workspaceName, experimentName, jobName, - outputdirectoryid, directory, linkexpiryinminutes, maxResults, context)); - } - - /** - * Gets a list of currently existing nodes which were used for the Job execution. The returned information contains - * the node ID, its public IP and SSH port. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of currently existing nodes which were used for the Job execution. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRemoteLoginInformationSinglePageAsync( - String resourceGroupName, String workspaceName, String experimentName, String jobName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required 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.listRemoteLoginInformation(this.client.getEndpoint(), resourceGroupName, - workspaceName, experimentName, jobName, this.client.getApiVersion(), this.client.getSubscriptionId(), - 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 a list of currently existing nodes which were used for the Job execution. The returned information contains - * the node ID, its public IP and SSH port. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of currently existing nodes which were used for the Job execution. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRemoteLoginInformationSinglePageAsync( - String resourceGroupName, String workspaceName, String experimentName, String jobName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required 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 - .listRemoteLoginInformation(this.client.getEndpoint(), resourceGroupName, workspaceName, experimentName, - jobName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of currently existing nodes which were used for the Job execution. The returned information contains - * the node ID, its public IP and SSH port. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of currently existing nodes which were used for the Job execution. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRemoteLoginInformationAsync(String resourceGroupName, - String workspaceName, String experimentName, String jobName) { - return new PagedFlux<>( - () -> listRemoteLoginInformationSinglePageAsync(resourceGroupName, workspaceName, experimentName, jobName), - nextLink -> listRemoteLoginInformationNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of currently existing nodes which were used for the Job execution. The returned information contains - * the node ID, its public IP and SSH port. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of currently existing nodes which were used for the Job execution. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRemoteLoginInformationAsync(String resourceGroupName, - String workspaceName, String experimentName, String jobName, Context context) { - return new PagedFlux<>(() -> listRemoteLoginInformationSinglePageAsync(resourceGroupName, workspaceName, - experimentName, jobName, context), - nextLink -> listRemoteLoginInformationNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of currently existing nodes which were used for the Job execution. The returned information contains - * the node ID, its public IP and SSH port. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of currently existing nodes which were used for the Job execution. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRemoteLoginInformation(String resourceGroupName, - String workspaceName, String experimentName, String jobName) { - return new PagedIterable<>( - listRemoteLoginInformationAsync(resourceGroupName, workspaceName, experimentName, jobName)); - } - - /** - * Gets a list of currently existing nodes which were used for the Job execution. The returned information contains - * the node ID, its public IP and SSH port. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of currently existing nodes which were used for the Job execution. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRemoteLoginInformation(String resourceGroupName, - String workspaceName, String experimentName, String jobName, Context context) { - return new PagedIterable<>( - listRemoteLoginInformationAsync(resourceGroupName, workspaceName, experimentName, jobName, context)); - } - - /** - * Terminates a job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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>> terminateWithResponseAsync(String resourceGroupName, String workspaceName, - String experimentName, String jobName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required 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.terminate(this.client.getEndpoint(), resourceGroupName, workspaceName, - experimentName, jobName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Terminates a job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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>> terminateWithResponseAsync(String resourceGroupName, String workspaceName, - String experimentName, String jobName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (experimentName == null) { - return Mono.error(new IllegalArgumentException("Parameter experimentName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required 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.terminate(this.client.getEndpoint(), resourceGroupName, workspaceName, experimentName, jobName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Terminates a job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 PollerFlux, Void> beginTerminateAsync(String resourceGroupName, String workspaceName, - String experimentName, String jobName) { - Mono>> mono - = terminateWithResponseAsync(resourceGroupName, workspaceName, experimentName, jobName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - Context.NONE); - } - - /** - * Terminates a job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 PollerFlux, Void> beginTerminateAsync(String resourceGroupName, String workspaceName, - String experimentName, String jobName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = terminateWithResponseAsync(resourceGroupName, workspaceName, experimentName, jobName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Terminates a job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - public SyncPoller, Void> beginTerminate(String resourceGroupName, String workspaceName, - String experimentName, String jobName) { - return beginTerminateAsync(resourceGroupName, workspaceName, experimentName, jobName).getSyncPoller(); - } - - /** - * Terminates a job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - public SyncPoller, Void> beginTerminate(String resourceGroupName, String workspaceName, - String experimentName, String jobName, Context context) { - return beginTerminateAsync(resourceGroupName, workspaceName, experimentName, jobName, context).getSyncPoller(); - } - - /** - * Terminates a job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 terminateAsync(String resourceGroupName, String workspaceName, String experimentName, - String jobName) { - return beginTerminateAsync(resourceGroupName, workspaceName, experimentName, jobName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Terminates a job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 terminateAsync(String resourceGroupName, String workspaceName, String experimentName, - String jobName, Context context) { - return beginTerminateAsync(resourceGroupName, workspaceName, experimentName, jobName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Terminates a job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 terminate(String resourceGroupName, String workspaceName, String experimentName, String jobName) { - terminateAsync(resourceGroupName, workspaceName, experimentName, jobName).block(); - } - - /** - * Terminates a job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 terminate(String resourceGroupName, String workspaceName, String experimentName, String jobName, - Context context) { - terminateAsync(resourceGroupName, workspaceName, experimentName, jobName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByExperimentNextSinglePageAsync(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.listByExperimentNext(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 values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByExperimentNextSinglePageAsync(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.listByExperimentNext(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 values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listOutputFilesNextSinglePageAsync(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.listOutputFilesNext(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 values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listOutputFilesNextSinglePageAsync(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.listOutputFilesNext(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 values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listRemoteLoginInformationNextSinglePageAsync(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.listRemoteLoginInformationNext(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 values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listRemoteLoginInformationNextSinglePageAsync(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.listRemoteLoginInformationNext(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/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/JobsImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/JobsImpl.java deleted file mode 100644 index 35760ef0f4bc..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/JobsImpl.java +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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.batchai.fluent.JobsClient; -import com.azure.resourcemanager.batchai.fluent.models.FileInner; -import com.azure.resourcemanager.batchai.fluent.models.JobInner; -import com.azure.resourcemanager.batchai.fluent.models.RemoteLoginInformationInner; -import com.azure.resourcemanager.batchai.models.File; -import com.azure.resourcemanager.batchai.models.Job; -import com.azure.resourcemanager.batchai.models.Jobs; -import com.azure.resourcemanager.batchai.models.RemoteLoginInformation; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class JobsImpl implements Jobs { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(JobsImpl.class); - - private final JobsClient innerClient; - - private final com.azure.resourcemanager.batchai.BatchAIManager serviceManager; - - public JobsImpl(JobsClient innerClient, com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByExperiment(String resourceGroupName, String workspaceName, String experimentName) { - PagedIterable inner - = this.serviceClient().listByExperiment(resourceGroupName, workspaceName, experimentName); - return Utils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); - } - - public PagedIterable listByExperiment(String resourceGroupName, String workspaceName, String experimentName, - Integer maxResults, Context context) { - PagedIterable inner = this.serviceClient() - .listByExperiment(resourceGroupName, workspaceName, experimentName, maxResults, context); - return Utils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String experimentName, String jobName) { - this.serviceClient().delete(resourceGroupName, workspaceName, experimentName, jobName); - } - - public void delete(String resourceGroupName, String workspaceName, String experimentName, String jobName, - Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, experimentName, jobName, context); - } - - public Job get(String resourceGroupName, String workspaceName, String experimentName, String jobName) { - JobInner inner = this.serviceClient().get(resourceGroupName, workspaceName, experimentName, jobName); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String experimentName, - String jobName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, experimentName, jobName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new JobImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PagedIterable listOutputFiles(String resourceGroupName, String workspaceName, String experimentName, - String jobName, String outputdirectoryid) { - PagedIterable inner = this.serviceClient() - .listOutputFiles(resourceGroupName, workspaceName, experimentName, jobName, outputdirectoryid); - return Utils.mapPage(inner, inner1 -> new FileImpl(inner1, this.manager())); - } - - public PagedIterable listOutputFiles(String resourceGroupName, String workspaceName, String experimentName, - String jobName, String outputdirectoryid, String directory, Integer linkexpiryinminutes, Integer maxResults, - Context context) { - PagedIterable inner = this.serviceClient() - .listOutputFiles(resourceGroupName, workspaceName, experimentName, jobName, outputdirectoryid, directory, - linkexpiryinminutes, maxResults, context); - return Utils.mapPage(inner, inner1 -> new FileImpl(inner1, this.manager())); - } - - public PagedIterable listRemoteLoginInformation(String resourceGroupName, - String workspaceName, String experimentName, String jobName) { - PagedIterable inner = this.serviceClient() - .listRemoteLoginInformation(resourceGroupName, workspaceName, experimentName, jobName); - return Utils.mapPage(inner, inner1 -> new RemoteLoginInformationImpl(inner1, this.manager())); - } - - public PagedIterable listRemoteLoginInformation(String resourceGroupName, - String workspaceName, String experimentName, String jobName, Context context) { - PagedIterable inner = this.serviceClient() - .listRemoteLoginInformation(resourceGroupName, workspaceName, experimentName, jobName, context); - return Utils.mapPage(inner, inner1 -> new RemoteLoginInformationImpl(inner1, this.manager())); - } - - public void terminate(String resourceGroupName, String workspaceName, String experimentName, String jobName) { - this.serviceClient().terminate(resourceGroupName, workspaceName, experimentName, jobName); - } - - public void terminate(String resourceGroupName, String workspaceName, String experimentName, String jobName, - Context context) { - this.serviceClient().terminate(resourceGroupName, workspaceName, experimentName, jobName, context); - } - - public Job getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String experimentName = Utils.getValueFromIdByName(id, "experiments"); - if (experimentName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'experiments'.", id))); - } - String jobName = Utils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, experimentName, jobName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String experimentName = Utils.getValueFromIdByName(id, "experiments"); - if (experimentName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'experiments'.", id))); - } - String jobName = Utils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, experimentName, jobName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String experimentName = Utils.getValueFromIdByName(id, "experiments"); - if (experimentName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'experiments'.", id))); - } - String jobName = Utils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - this.delete(resourceGroupName, workspaceName, experimentName, jobName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String experimentName = Utils.getValueFromIdByName(id, "experiments"); - if (experimentName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'experiments'.", id))); - } - String jobName = Utils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - this.delete(resourceGroupName, workspaceName, experimentName, jobName, context); - } - - private JobsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.batchai.BatchAIManager manager() { - return this.serviceManager; - } - - public JobImpl define(String name) { - return new JobImpl(name, this.manager()); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/OperationImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/OperationImpl.java deleted file mode 100644 index d34c12017b76..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/OperationImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.resourcemanager.batchai.fluent.models.OperationInner; -import com.azure.resourcemanager.batchai.models.Operation; -import com.azure.resourcemanager.batchai.models.OperationDisplay; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.batchai.BatchAIManager serviceManager; - - OperationImpl(OperationInner innerObject, com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public String origin() { - return this.innerModel().origin(); - } - - public Object properties() { - return this.innerModel().properties(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.batchai.BatchAIManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/OperationsClientImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/OperationsClientImpl.java deleted file mode 100644 index 8b687d0a3400..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.fluent.OperationsClient; -import com.azure.resourcemanager.batchai.fluent.models.OperationInner; -import com.azure.resourcemanager.batchai.models.OperationListResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final OperationsService service; - - /** The service client containing this operation class. */ - private final BatchAIImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(BatchAIImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for BatchAIOperations to be used by the proxy service to perform REST - * calls. - */ - @Host("{$host}") - @ServiceInterface(name = "BatchAIOperations") - private interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.BatchAI/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists available operations for the Microsoft.BatchAI provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the list of all operations supported by BatchAI resource provider. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists available operations for the Microsoft.BatchAI provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the list of all operations supported by BatchAI resource provider. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists available operations for the Microsoft.BatchAI provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the list of all operations supported by BatchAI resource provider. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists available operations for the Microsoft.BatchAI provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the list of all operations supported by BatchAI resource provider. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists available operations for the Microsoft.BatchAI provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the list of all operations supported by BatchAI resource provider. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists available operations for the Microsoft.BatchAI provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the list of all operations supported by BatchAI resource provider. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(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 contains the list of all operations supported by BatchAI resource provider. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the list of all operations supported by BatchAI resource provider. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/OperationsImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/OperationsImpl.java deleted file mode 100644 index 8b1a7740929a..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/OperationsImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.fluent.OperationsClient; -import com.azure.resourcemanager.batchai.fluent.models.OperationInner; -import com.azure.resourcemanager.batchai.models.Operation; -import com.azure.resourcemanager.batchai.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class OperationsImpl implements Operations { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.batchai.BatchAIManager serviceManager; - - public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.batchai.BatchAIManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/RemoteLoginInformationImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/RemoteLoginInformationImpl.java deleted file mode 100644 index b45bcbe8e03f..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/RemoteLoginInformationImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.resourcemanager.batchai.fluent.models.RemoteLoginInformationInner; -import com.azure.resourcemanager.batchai.models.RemoteLoginInformation; - -public final class RemoteLoginInformationImpl implements RemoteLoginInformation { - private RemoteLoginInformationInner innerObject; - - private final com.azure.resourcemanager.batchai.BatchAIManager serviceManager; - - RemoteLoginInformationImpl(RemoteLoginInformationInner innerObject, - com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String nodeId() { - return this.innerModel().nodeId(); - } - - public String ipAddress() { - return this.innerModel().ipAddress(); - } - - public Integer port() { - return this.innerModel().port(); - } - - public RemoteLoginInformationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.batchai.BatchAIManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/UsageImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/UsageImpl.java deleted file mode 100644 index 623fd8cea1fe..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/UsageImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.resourcemanager.batchai.fluent.models.UsageInner; -import com.azure.resourcemanager.batchai.models.Usage; -import com.azure.resourcemanager.batchai.models.UsageName; -import com.azure.resourcemanager.batchai.models.UsageUnit; - -public final class UsageImpl implements Usage { - private UsageInner innerObject; - - private final com.azure.resourcemanager.batchai.BatchAIManager serviceManager; - - UsageImpl(UsageInner innerObject, com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public UsageUnit unit() { - return this.innerModel().unit(); - } - - public Integer currentValue() { - return this.innerModel().currentValue(); - } - - public Long limit() { - return this.innerModel().limit(); - } - - public UsageName name() { - return this.innerModel().name(); - } - - public UsageInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.batchai.BatchAIManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/UsagesClientImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/UsagesClientImpl.java deleted file mode 100644 index 228472bb37df..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/UsagesClientImpl.java +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.fluent.UsagesClient; -import com.azure.resourcemanager.batchai.fluent.models.UsageInner; -import com.azure.resourcemanager.batchai.models.ListUsagesResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in UsagesClient. */ -public final class UsagesClientImpl implements UsagesClient { - private final ClientLogger logger = new ClientLogger(UsagesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final UsagesService service; - - /** The service client containing this operation class. */ - private final BatchAIImpl client; - - /** - * Initializes an instance of UsagesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - UsagesClientImpl(BatchAIImpl client) { - this.service = RestProxy.create(UsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for BatchAIUsages to be used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "BatchAIUsages") - private interface UsagesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.BatchAI/locations/{location}/usages") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the current usage information as well as limits for Batch AI resources for given subscription. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for Batch AI resources for given subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the current usage information as well as limits for Batch AI resources for given subscription. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for Batch AI resources for given subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the current usage information as well as limits for Batch AI resources for given subscription. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for Batch AI resources for given subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location) { - return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the current usage information as well as limits for Batch AI resources for given subscription. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for Batch AI resources for given subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(location, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the current usage information as well as limits for Batch AI resources for given subscription. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for Batch AI resources for given subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location) { - return new PagedIterable<>(listAsync(location)); - } - - /** - * Gets the current usage information as well as limits for Batch AI resources for given subscription. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for Batch AI resources for given subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location, Context context) { - return new PagedIterable<>(listAsync(location, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Usages operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Usages operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/UsagesImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/UsagesImpl.java deleted file mode 100644 index 7c22d5afb1ed..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/UsagesImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.fluent.UsagesClient; -import com.azure.resourcemanager.batchai.fluent.models.UsageInner; -import com.azure.resourcemanager.batchai.models.Usage; -import com.azure.resourcemanager.batchai.models.Usages; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class UsagesImpl implements Usages { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(UsagesImpl.class); - - private final UsagesClient innerClient; - - private final com.azure.resourcemanager.batchai.BatchAIManager serviceManager; - - public UsagesImpl(UsagesClient innerClient, com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String location) { - PagedIterable inner = this.serviceClient().list(location); - return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); - } - - public PagedIterable list(String location, Context context) { - PagedIterable inner = this.serviceClient().list(location, context); - return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); - } - - private UsagesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.batchai.BatchAIManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/Utils.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/Utils.java deleted file mode 100644 index cda57ad641a0..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/Utils.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/WorkspaceImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/WorkspaceImpl.java deleted file mode 100644 index cc2e3ab1d5ba..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/WorkspaceImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batchai.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.batchai.models.ProvisioningState; -import com.azure.resourcemanager.batchai.models.Workspace; -import com.azure.resourcemanager.batchai.models.WorkspaceCreateParameters; -import com.azure.resourcemanager.batchai.models.WorkspaceUpdateParameters; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.Map; - -public final class WorkspaceImpl implements Workspace, Workspace.Definition, Workspace.Update { - private WorkspaceInner innerObject; - - private final com.azure.resourcemanager.batchai.BatchAIManager 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 OffsetDateTime creationTime() { - return this.innerModel().creationTime(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public OffsetDateTime provisioningStateTransitionTime() { - return this.innerModel().provisioningStateTransitionTime(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public WorkspaceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.batchai.BatchAIManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private WorkspaceCreateParameters createParameters; - - private WorkspaceUpdateParameters updateParameters; - - public WorkspaceImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public Workspace create() { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .create(resourceGroupName, workspaceName, createParameters, Context.NONE); - return this; - } - - public Workspace create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .create(resourceGroupName, workspaceName, createParameters, context); - return this; - } - - WorkspaceImpl(String name, com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerObject = new WorkspaceInner(); - this.serviceManager = serviceManager; - this.workspaceName = name; - this.createParameters = new WorkspaceCreateParameters(); - } - - public WorkspaceImpl update() { - this.updateParameters = new WorkspaceUpdateParameters(); - return this; - } - - public Workspace apply() { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .updateWithResponse(resourceGroupName, workspaceName, updateParameters, Context.NONE) - .getValue(); - return this; - } - - public Workspace apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .updateWithResponse(resourceGroupName, workspaceName, updateParameters, context) - .getValue(); - return this; - } - - WorkspaceImpl(WorkspaceInner innerObject, com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - } - - public Workspace refresh() { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE) - .getValue(); - return this; - } - - public Workspace refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .getByResourceGroupWithResponse(resourceGroupName, workspaceName, context) - .getValue(); - return this; - } - - public WorkspaceImpl withRegion(Region location) { - this.createParameters.withLocation(location.toString()); - return this; - } - - public WorkspaceImpl withRegion(String location) { - this.createParameters.withLocation(location); - return this; - } - - public WorkspaceImpl withTags(Map tags) { - if (isInCreateMode()) { - this.createParameters.withTags(tags); - return this; - } else { - this.updateParameters.withTags(tags); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/WorkspacesClientImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/WorkspacesClientImpl.java deleted file mode 100644 index 8c88dae071fe..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/WorkspacesClientImpl.java +++ /dev/null @@ -1,1253 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.batchai.fluent.WorkspacesClient; -import com.azure.resourcemanager.batchai.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.batchai.models.WorkspaceCreateParameters; -import com.azure.resourcemanager.batchai.models.WorkspaceListResult; -import com.azure.resourcemanager.batchai.models.WorkspaceUpdateParameters; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in WorkspacesClient. */ -public final class WorkspacesClientImpl implements WorkspacesClient { - private final ClientLogger logger = new ClientLogger(WorkspacesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final WorkspacesService service; - - /** The service client containing this operation class. */ - private final BatchAIImpl client; - - /** - * Initializes an instance of WorkspacesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkspacesClientImpl(BatchAIImpl client) { - this.service - = RestProxy.create(WorkspacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for BatchAIWorkspaces to be used by the proxy service to perform REST - * calls. - */ - @Host("{$host}") - @ServiceInterface(name = "BatchAIWorkspaces") - private interface WorkspacesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.BatchAI/workspaces") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("maxresults") Integer maxResults, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("maxresults") Integer maxResults, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") WorkspaceCreateParameters parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") WorkspaceUpdateParameters parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces" - + "/{workspaceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a list of Workspaces associated with the given subscription. - * - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces associated with the given subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer maxResults) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required 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(), maxResults, this.client.getApiVersion(), - this.client.getSubscriptionId(), 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 a list of Workspaces associated with the given subscription. - * - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces associated with the given subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Integer maxResults, 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(), maxResults, this.client.getApiVersion(), this.client.getSubscriptionId(), - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of Workspaces associated with the given subscription. - * - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces associated with the given subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer maxResults) { - return new PagedFlux<>(() -> listSinglePageAsync(maxResults), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of Workspaces associated with the given subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces associated with the given subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Integer maxResults = null; - return new PagedFlux<>(() -> listSinglePageAsync(maxResults), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of Workspaces associated with the given subscription. - * - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces associated with the given subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Integer maxResults, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(maxResults, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of Workspaces associated with the given subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces associated with the given subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Integer maxResults = null; - return new PagedIterable<>(listAsync(maxResults)); - } - - /** - * Gets a list of Workspaces associated with the given subscription. - * - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces associated with the given subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Integer maxResults, Context context) { - return new PagedIterable<>(listAsync(maxResults, context)); - } - - /** - * Gets a list of Workspaces within the specified resource group. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces within the specified resource group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Integer maxResults) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (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.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - maxResults, this.client.getApiVersion(), this.client.getSubscriptionId(), 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 a list of Workspaces within the specified resource group. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces within the specified resource group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Integer maxResults, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (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 - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, maxResults, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of Workspaces within the specified resource group. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces within the specified resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer maxResults) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, maxResults), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of Workspaces within the specified resource group. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces within the specified resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final Integer maxResults = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, maxResults), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of Workspaces within the specified resource group. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces within the specified resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer maxResults, - Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, maxResults, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of Workspaces within the specified resource group. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces within the specified resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final Integer maxResults = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, maxResults)); - } - - /** - * Gets a list of Workspaces within the specified resource group. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces within the specified resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Integer maxResults, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, maxResults, context)); - } - - /** - * Creates a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Workspace creation parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, - WorkspaceCreateParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Workspace creation parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, - WorkspaceCreateParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, workspaceName, this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Creates a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Workspace creation parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, WorkspaceInner> beginCreateAsync(String resourceGroupName, - String workspaceName, WorkspaceCreateParameters parameters) { - Mono>> mono = createWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, Context.NONE); - } - - /** - * Creates a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Workspace creation parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, WorkspaceInner> beginCreateAsync(String resourceGroupName, - String workspaceName, WorkspaceCreateParameters parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, workspaceName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, context); - } - - /** - * Creates a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Workspace creation parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, WorkspaceInner> beginCreate(String resourceGroupName, - String workspaceName, WorkspaceCreateParameters parameters) { - return beginCreateAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); - } - - /** - * Creates a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Workspace creation parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, WorkspaceInner> beginCreate(String resourceGroupName, - String workspaceName, WorkspaceCreateParameters parameters, Context context) { - return beginCreateAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); - } - - /** - * Creates a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Workspace creation parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String workspaceName, - WorkspaceCreateParameters parameters) { - return beginCreateAsync(resourceGroupName, workspaceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Workspace creation parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String workspaceName, - WorkspaceCreateParameters parameters, Context context) { - return beginCreateAsync(resourceGroupName, workspaceName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Workspace creation parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner create(String resourceGroupName, String workspaceName, WorkspaceCreateParameters parameters) { - return createAsync(resourceGroupName, workspaceName, parameters).block(); - } - - /** - * Creates a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Workspace creation parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner create(String resourceGroupName, String workspaceName, WorkspaceCreateParameters parameters, - Context context) { - return createAsync(resourceGroupName, workspaceName, parameters, context).block(); - } - - /** - * Updates properties of a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Additional parameters for workspace update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - 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(), resourceGroupName, workspaceName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates properties of a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Additional parameters for workspace update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - 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(), resourceGroupName, workspaceName, this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Updates properties of a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Additional parameters for workspace update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters) { - return updateWithResponseAsync(resourceGroupName, workspaceName, parameters) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates properties of a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Additional parameters for workspace update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters) { - return updateAsync(resourceGroupName, workspaceName, parameters).block(); - } - - /** - * Updates properties of a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param parameters Additional parameters for workspace update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return batch AI Workspace information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, workspaceName, parameters, context).block(); - } - - /** - * Deletes a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, workspaceName, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); - } - - /** - * Deletes a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - Context.NONE); - } - - /** - * Deletes a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName) { - return beginDeleteAsync(resourceGroupName, workspaceName).getSyncPoller(); - } - - /** - * Deletes a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, context).getSyncPoller(); - } - - /** - * Deletes a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName) { - return beginDeleteAsync(resourceGroupName, workspaceName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName) { - deleteAsync(resourceGroupName, workspaceName).block(); - } - - /** - * Deletes a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, Context context) { - deleteAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Gets information about a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, - workspaceName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets information about a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Gets information about a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets information about a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { - return getByResourceGroupAsync(resourceGroupName, workspaceName).block(); - } - - /** - * Gets information about a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 a Workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The 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 values returned by the List operation. - */ - @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 values returned by the List operation. - */ - @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)); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/WorkspacesImpl.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/WorkspacesImpl.java deleted file mode 100644 index c19091246f8a..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/WorkspacesImpl.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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.batchai.fluent.WorkspacesClient; -import com.azure.resourcemanager.batchai.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.batchai.models.Workspace; -import com.azure.resourcemanager.batchai.models.Workspaces; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class WorkspacesImpl implements Workspaces { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(WorkspacesImpl.class); - - private final WorkspacesClient innerClient; - - private final com.azure.resourcemanager.batchai.BatchAIManager serviceManager; - - public WorkspacesImpl(WorkspacesClient innerClient, - com.azure.resourcemanager.batchai.BatchAIManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public PagedIterable list(Integer maxResults, Context context) { - PagedIterable inner = this.serviceClient().list(maxResults, context); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Integer maxResults, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, maxResults, context); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public void deleteByResourceGroup(String resourceGroupName, String workspaceName) { - this.serviceClient().delete(resourceGroupName, workspaceName); - } - - public void delete(String resourceGroupName, String workspaceName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, context); - } - - public Workspace getByResourceGroup(String resourceGroupName, String workspaceName) { - WorkspaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, workspaceName); - if (inner != null) { - return new WorkspaceImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkspaceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Workspace getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - this.delete(resourceGroupName, workspaceName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - this.delete(resourceGroupName, workspaceName, context); - } - - private WorkspacesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.batchai.BatchAIManager manager() { - return this.serviceManager; - } - - public WorkspaceImpl define(String name) { - return new WorkspaceImpl(name, this.manager()); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/package-info.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/package-info.java deleted file mode 100644 index aa9f6a348f07..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the implementations for BatchAI. The Azure BatchAI Management API. */ -package com.azure.resourcemanager.batchai.implementation; diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AllocationState.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AllocationState.java deleted file mode 100644 index 204fd175a67f..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AllocationState.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AllocationState. */ -public final class AllocationState extends ExpandableStringEnum { - /** Static value steady for AllocationState. */ - public static final AllocationState STEADY = fromString("steady"); - - /** Static value resizing for AllocationState. */ - public static final AllocationState RESIZING = fromString("resizing"); - - /** - * Creates or finds a AllocationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding AllocationState. - */ - @JsonCreator - public static AllocationState fromString(String name) { - return fromString(name, AllocationState.class); - } - - /** @return known AllocationState values. */ - public static Collection values() { - return values(AllocationState.class); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AppInsightsReference.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AppInsightsReference.java deleted file mode 100644 index 30af6e92059e..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AppInsightsReference.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Azure Application Insights information for performance counters reporting. */ -@Fluent -public final class AppInsightsReference { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AppInsightsReference.class); - - /* - * Azure Application Insights component resource ID. - */ - @JsonProperty(value = "component", required = true) - private ResourceId component; - - /* - * Value of the Azure Application Insights instrumentation key. - */ - @JsonProperty(value = "instrumentationKey") - private String instrumentationKey; - - /* - * KeyVault Store and Secret which contains Azure Application Insights - * instrumentation key. One of instrumentationKey or - * instrumentationKeySecretReference must be specified. - */ - @JsonProperty(value = "instrumentationKeySecretReference") - private KeyVaultSecretReference instrumentationKeySecretReference; - - /** - * Get the component property: Azure Application Insights component resource ID. - * - * @return the component value. - */ - public ResourceId component() { - return this.component; - } - - /** - * Set the component property: Azure Application Insights component resource ID. - * - * @param component the component value to set. - * @return the AppInsightsReference object itself. - */ - public AppInsightsReference withComponent(ResourceId component) { - this.component = component; - return this; - } - - /** - * Get the instrumentationKey property: Value of the Azure Application Insights instrumentation key. - * - * @return the instrumentationKey value. - */ - public String instrumentationKey() { - return this.instrumentationKey; - } - - /** - * Set the instrumentationKey property: Value of the Azure Application Insights instrumentation key. - * - * @param instrumentationKey the instrumentationKey value to set. - * @return the AppInsightsReference object itself. - */ - public AppInsightsReference withInstrumentationKey(String instrumentationKey) { - this.instrumentationKey = instrumentationKey; - return this; - } - - /** - * Get the instrumentationKeySecretReference property: KeyVault Store and Secret which contains Azure Application - * Insights instrumentation key. One of instrumentationKey or instrumentationKeySecretReference must be specified. - * - * @return the instrumentationKeySecretReference value. - */ - public KeyVaultSecretReference instrumentationKeySecretReference() { - return this.instrumentationKeySecretReference; - } - - /** - * Set the instrumentationKeySecretReference property: KeyVault Store and Secret which contains Azure Application - * Insights instrumentation key. One of instrumentationKey or instrumentationKeySecretReference must be specified. - * - * @param instrumentationKeySecretReference the instrumentationKeySecretReference value to set. - * @return the AppInsightsReference object itself. - */ - public AppInsightsReference - withInstrumentationKeySecretReference(KeyVaultSecretReference instrumentationKeySecretReference) { - this.instrumentationKeySecretReference = instrumentationKeySecretReference; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (component() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property component in model AppInsightsReference")); - } else { - component().validate(); - } - if (instrumentationKeySecretReference() != null) { - instrumentationKeySecretReference().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AutoScaleSettings.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AutoScaleSettings.java deleted file mode 100644 index f3c43704250b..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AutoScaleSettings.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** - * Auto-scale settings for the cluster. The system automatically scales the cluster up and down (within minimumNodeCount - * and maximumNodeCount) based on the number of queued and running jobs assigned to the cluster. - */ -@Fluent -public final class AutoScaleSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AutoScaleSettings.class); - - /* - * The minimum number of compute nodes the Batch AI service will try to - * allocate for the cluster. Note, the actual number of nodes can be less - * than the specified value if the subscription has not enough quota to - * fulfill the request. - */ - @JsonProperty(value = "minimumNodeCount", required = true) - private int minimumNodeCount; - - /* - * The maximum number of compute nodes the cluster can have. - */ - @JsonProperty(value = "maximumNodeCount", required = true) - private int maximumNodeCount; - - /* - * The number of compute nodes to allocate on cluster creation. Note that - * this value is used only during cluster creation. Default: 0. - */ - @JsonProperty(value = "initialNodeCount") - private Integer initialNodeCount; - - /** - * Get the minimumNodeCount property: The minimum number of compute nodes the Batch AI service will try to allocate - * for the cluster. Note, the actual number of nodes can be less than the specified value if the subscription has - * not enough quota to fulfill the request. - * - * @return the minimumNodeCount value. - */ - public int minimumNodeCount() { - return this.minimumNodeCount; - } - - /** - * Set the minimumNodeCount property: The minimum number of compute nodes the Batch AI service will try to allocate - * for the cluster. Note, the actual number of nodes can be less than the specified value if the subscription has - * not enough quota to fulfill the request. - * - * @param minimumNodeCount the minimumNodeCount value to set. - * @return the AutoScaleSettings object itself. - */ - public AutoScaleSettings withMinimumNodeCount(int minimumNodeCount) { - this.minimumNodeCount = minimumNodeCount; - return this; - } - - /** - * Get the maximumNodeCount property: The maximum number of compute nodes the cluster can have. - * - * @return the maximumNodeCount value. - */ - public int maximumNodeCount() { - return this.maximumNodeCount; - } - - /** - * Set the maximumNodeCount property: The maximum number of compute nodes the cluster can have. - * - * @param maximumNodeCount the maximumNodeCount value to set. - * @return the AutoScaleSettings object itself. - */ - public AutoScaleSettings withMaximumNodeCount(int maximumNodeCount) { - this.maximumNodeCount = maximumNodeCount; - return this; - } - - /** - * Get the initialNodeCount property: The number of compute nodes to allocate on cluster creation. Note that this - * value is used only during cluster creation. Default: 0. - * - * @return the initialNodeCount value. - */ - public Integer initialNodeCount() { - return this.initialNodeCount; - } - - /** - * Set the initialNodeCount property: The number of compute nodes to allocate on cluster creation. Note that this - * value is used only during cluster creation. Default: 0. - * - * @param initialNodeCount the initialNodeCount value to set. - * @return the AutoScaleSettings object itself. - */ - public AutoScaleSettings withInitialNodeCount(Integer initialNodeCount) { - this.initialNodeCount = initialNodeCount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AzureBlobFileSystemReference.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AzureBlobFileSystemReference.java deleted file mode 100644 index 67b58eacf0d9..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AzureBlobFileSystemReference.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Azure Blob Storage Container mounting configuration. */ -@Fluent -public final class AzureBlobFileSystemReference { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AzureBlobFileSystemReference.class); - - /* - * Name of the Azure storage account. - */ - @JsonProperty(value = "accountName", required = true) - private String accountName; - - /* - * Name of the Azure Blob Storage container to mount on the cluster. - */ - @JsonProperty(value = "containerName", required = true) - private String containerName; - - /* - * Information about the Azure storage credentials. - */ - @JsonProperty(value = "credentials", required = true) - private AzureStorageCredentialsInfo credentials; - - /* - * The relative path on the compute node where the Azure File container - * will be mounted. Note that all cluster level containers will be mounted - * under $AZ_BATCHAI_MOUNT_ROOT location and all job level containers will - * be mounted under $AZ_BATCHAI_JOB_MOUNT_ROOT. - */ - @JsonProperty(value = "relativeMountPath", required = true) - private String relativeMountPath; - - /* - * Mount options for mounting blobfuse file system. - */ - @JsonProperty(value = "mountOptions") - private String mountOptions; - - /** - * Get the accountName property: Name of the Azure storage account. - * - * @return the accountName value. - */ - public String accountName() { - return this.accountName; - } - - /** - * Set the accountName property: Name of the Azure storage account. - * - * @param accountName the accountName value to set. - * @return the AzureBlobFileSystemReference object itself. - */ - public AzureBlobFileSystemReference withAccountName(String accountName) { - this.accountName = accountName; - return this; - } - - /** - * Get the containerName property: Name of the Azure Blob Storage container to mount on the cluster. - * - * @return the containerName value. - */ - public String containerName() { - return this.containerName; - } - - /** - * Set the containerName property: Name of the Azure Blob Storage container to mount on the cluster. - * - * @param containerName the containerName value to set. - * @return the AzureBlobFileSystemReference object itself. - */ - public AzureBlobFileSystemReference withContainerName(String containerName) { - this.containerName = containerName; - return this; - } - - /** - * Get the credentials property: Information about the Azure storage credentials. - * - * @return the credentials value. - */ - public AzureStorageCredentialsInfo credentials() { - return this.credentials; - } - - /** - * Set the credentials property: Information about the Azure storage credentials. - * - * @param credentials the credentials value to set. - * @return the AzureBlobFileSystemReference object itself. - */ - public AzureBlobFileSystemReference withCredentials(AzureStorageCredentialsInfo credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the relativeMountPath property: The relative path on the compute node where the Azure File container will be - * mounted. Note that all cluster level containers will be mounted under $AZ_BATCHAI_MOUNT_ROOT location and all job - * level containers will be mounted under $AZ_BATCHAI_JOB_MOUNT_ROOT. - * - * @return the relativeMountPath value. - */ - public String relativeMountPath() { - return this.relativeMountPath; - } - - /** - * Set the relativeMountPath property: The relative path on the compute node where the Azure File container will be - * mounted. Note that all cluster level containers will be mounted under $AZ_BATCHAI_MOUNT_ROOT location and all job - * level containers will be mounted under $AZ_BATCHAI_JOB_MOUNT_ROOT. - * - * @param relativeMountPath the relativeMountPath value to set. - * @return the AzureBlobFileSystemReference object itself. - */ - public AzureBlobFileSystemReference withRelativeMountPath(String relativeMountPath) { - this.relativeMountPath = relativeMountPath; - return this; - } - - /** - * Get the mountOptions property: Mount options for mounting blobfuse file system. - * - * @return the mountOptions value. - */ - public String mountOptions() { - return this.mountOptions; - } - - /** - * Set the mountOptions property: Mount options for mounting blobfuse file system. - * - * @param mountOptions the mountOptions value to set. - * @return the AzureBlobFileSystemReference object itself. - */ - public AzureBlobFileSystemReference withMountOptions(String mountOptions) { - this.mountOptions = mountOptions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (accountName() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property accountName in model AzureBlobFileSystemReference")); - } - if (containerName() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property containerName in model AzureBlobFileSystemReference")); - } - if (credentials() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property credentials in model AzureBlobFileSystemReference")); - } else { - credentials().validate(); - } - if (relativeMountPath() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property relativeMountPath in model AzureBlobFileSystemReference")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AzureFileShareReference.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AzureFileShareReference.java deleted file mode 100644 index cc69a6e96525..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AzureFileShareReference.java +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Azure File Share mounting configuration. */ -@Fluent -public final class AzureFileShareReference { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AzureFileShareReference.class); - - /* - * Name of the Azure storage account. - */ - @JsonProperty(value = "accountName", required = true) - private String accountName; - - /* - * URL to access the Azure File. - */ - @JsonProperty(value = "azureFileUrl", required = true) - private String azureFileUrl; - - /* - * Information about the Azure storage credentials. - */ - @JsonProperty(value = "credentials", required = true) - private AzureStorageCredentialsInfo credentials; - - /* - * The relative path on the compute node where the Azure File share will be - * mounted. Note that all cluster level file shares will be mounted under - * $AZ_BATCHAI_MOUNT_ROOT location and all job level file shares will be - * mounted under $AZ_BATCHAI_JOB_MOUNT_ROOT. - */ - @JsonProperty(value = "relativeMountPath", required = true) - private String relativeMountPath; - - /* - * File mode for files on the mounted file share. Default value: 0777. - */ - @JsonProperty(value = "fileMode") - private String fileMode; - - /* - * File mode for directories on the mounted file share. Default value: - * 0777. - */ - @JsonProperty(value = "directoryMode") - private String directoryMode; - - /** - * Get the accountName property: Name of the Azure storage account. - * - * @return the accountName value. - */ - public String accountName() { - return this.accountName; - } - - /** - * Set the accountName property: Name of the Azure storage account. - * - * @param accountName the accountName value to set. - * @return the AzureFileShareReference object itself. - */ - public AzureFileShareReference withAccountName(String accountName) { - this.accountName = accountName; - return this; - } - - /** - * Get the azureFileUrl property: URL to access the Azure File. - * - * @return the azureFileUrl value. - */ - public String azureFileUrl() { - return this.azureFileUrl; - } - - /** - * Set the azureFileUrl property: URL to access the Azure File. - * - * @param azureFileUrl the azureFileUrl value to set. - * @return the AzureFileShareReference object itself. - */ - public AzureFileShareReference withAzureFileUrl(String azureFileUrl) { - this.azureFileUrl = azureFileUrl; - return this; - } - - /** - * Get the credentials property: Information about the Azure storage credentials. - * - * @return the credentials value. - */ - public AzureStorageCredentialsInfo credentials() { - return this.credentials; - } - - /** - * Set the credentials property: Information about the Azure storage credentials. - * - * @param credentials the credentials value to set. - * @return the AzureFileShareReference object itself. - */ - public AzureFileShareReference withCredentials(AzureStorageCredentialsInfo credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the relativeMountPath property: The relative path on the compute node where the Azure File share will be - * mounted. Note that all cluster level file shares will be mounted under $AZ_BATCHAI_MOUNT_ROOT location and all - * job level file shares will be mounted under $AZ_BATCHAI_JOB_MOUNT_ROOT. - * - * @return the relativeMountPath value. - */ - public String relativeMountPath() { - return this.relativeMountPath; - } - - /** - * Set the relativeMountPath property: The relative path on the compute node where the Azure File share will be - * mounted. Note that all cluster level file shares will be mounted under $AZ_BATCHAI_MOUNT_ROOT location and all - * job level file shares will be mounted under $AZ_BATCHAI_JOB_MOUNT_ROOT. - * - * @param relativeMountPath the relativeMountPath value to set. - * @return the AzureFileShareReference object itself. - */ - public AzureFileShareReference withRelativeMountPath(String relativeMountPath) { - this.relativeMountPath = relativeMountPath; - return this; - } - - /** - * Get the fileMode property: File mode for files on the mounted file share. Default value: 0777. - * - * @return the fileMode value. - */ - public String fileMode() { - return this.fileMode; - } - - /** - * Set the fileMode property: File mode for files on the mounted file share. Default value: 0777. - * - * @param fileMode the fileMode value to set. - * @return the AzureFileShareReference object itself. - */ - public AzureFileShareReference withFileMode(String fileMode) { - this.fileMode = fileMode; - return this; - } - - /** - * Get the directoryMode property: File mode for directories on the mounted file share. Default value: 0777. - * - * @return the directoryMode value. - */ - public String directoryMode() { - return this.directoryMode; - } - - /** - * Set the directoryMode property: File mode for directories on the mounted file share. Default value: 0777. - * - * @param directoryMode the directoryMode value to set. - * @return the AzureFileShareReference object itself. - */ - public AzureFileShareReference withDirectoryMode(String directoryMode) { - this.directoryMode = directoryMode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (accountName() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property accountName in model AzureFileShareReference")); - } - if (azureFileUrl() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property azureFileUrl in model AzureFileShareReference")); - } - if (credentials() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property credentials in model AzureFileShareReference")); - } else { - credentials().validate(); - } - if (relativeMountPath() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property relativeMountPath in model AzureFileShareReference")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AzureStorageCredentialsInfo.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AzureStorageCredentialsInfo.java deleted file mode 100644 index 3ad4349f7dc1..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/AzureStorageCredentialsInfo.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Azure storage account credentials. */ -@Fluent -public final class AzureStorageCredentialsInfo { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AzureStorageCredentialsInfo.class); - - /* - * Storage account key. One of accountKey or accountKeySecretReference must - * be specified. - */ - @JsonProperty(value = "accountKey") - private String accountKey; - - /* - * Information about KeyVault secret storing the storage account key. One - * of accountKey or accountKeySecretReference must be specified. - */ - @JsonProperty(value = "accountKeySecretReference") - private KeyVaultSecretReference accountKeySecretReference; - - /** - * Get the accountKey property: Storage account key. One of accountKey or accountKeySecretReference must be - * specified. - * - * @return the accountKey value. - */ - public String accountKey() { - return this.accountKey; - } - - /** - * Set the accountKey property: Storage account key. One of accountKey or accountKeySecretReference must be - * specified. - * - * @param accountKey the accountKey value to set. - * @return the AzureStorageCredentialsInfo object itself. - */ - public AzureStorageCredentialsInfo withAccountKey(String accountKey) { - this.accountKey = accountKey; - return this; - } - - /** - * Get the accountKeySecretReference property: Information about KeyVault secret storing the storage account key. - * One of accountKey or accountKeySecretReference must be specified. - * - * @return the accountKeySecretReference value. - */ - public KeyVaultSecretReference accountKeySecretReference() { - return this.accountKeySecretReference; - } - - /** - * Set the accountKeySecretReference property: Information about KeyVault secret storing the storage account key. - * One of accountKey or accountKeySecretReference must be specified. - * - * @param accountKeySecretReference the accountKeySecretReference value to set. - * @return the AzureStorageCredentialsInfo object itself. - */ - public AzureStorageCredentialsInfo - withAccountKeySecretReference(KeyVaultSecretReference accountKeySecretReference) { - this.accountKeySecretReference = accountKeySecretReference; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (accountKeySecretReference() != null) { - accountKeySecretReference().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/BatchAIError.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/BatchAIError.java deleted file mode 100644 index 407cef3460c0..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/BatchAIError.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; -import java.util.List; - -/** An error response from the Batch AI service. */ -@Immutable -public final class BatchAIError { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(BatchAIError.class); - - /* - * An identifier of the error. Codes are invariant and are intended to be - * consumed programmatically. - */ - @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) - private String code; - - /* - * A message describing the error, intended to be suitable for display in a - * user interface. - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /* - * A list of additional details about the error. - */ - @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) - private List details; - - /** - * Get the code property: An identifier of the error. Codes are invariant and are intended to be consumed - * programmatically. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Get the message property: A message describing the error, intended to be suitable for display in a user - * interface. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the details property: A list of additional details about the error. - * - * @return the details value. - */ - public List details() { - return this.details; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (details() != null) { - details().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/CachingType.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/CachingType.java deleted file mode 100644 index d031f2121515..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/CachingType.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for CachingType. */ -public enum CachingType { - /** Enum value none. */ - NONE("none"), - - /** Enum value readonly. */ - READONLY("readonly"), - - /** Enum value readwrite. */ - READWRITE("readwrite"); - - /** The actual serialized value for a CachingType instance. */ - private final String value; - - CachingType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a CachingType instance. - * - * @param value the serialized value to parse. - * @return the parsed CachingType object, or null if unable to parse. - */ - @JsonCreator - public static CachingType fromString(String value) { - CachingType[] items = CachingType.values(); - for (CachingType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Caffe2Settings.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Caffe2Settings.java deleted file mode 100644 index f0c237051c57..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Caffe2Settings.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Caffe2 job settings. */ -@Fluent -public final class Caffe2Settings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(Caffe2Settings.class); - - /* - * The python script to execute. - */ - @JsonProperty(value = "pythonScriptFilePath", required = true) - private String pythonScriptFilePath; - - /* - * The path to the Python interpreter. - */ - @JsonProperty(value = "pythonInterpreterPath") - private String pythonInterpreterPath; - - /* - * Command line arguments that need to be passed to the python script. - */ - @JsonProperty(value = "commandLineArgs") - private String commandLineArgs; - - /** - * Get the pythonScriptFilePath property: The python script to execute. - * - * @return the pythonScriptFilePath value. - */ - public String pythonScriptFilePath() { - return this.pythonScriptFilePath; - } - - /** - * Set the pythonScriptFilePath property: The python script to execute. - * - * @param pythonScriptFilePath the pythonScriptFilePath value to set. - * @return the Caffe2Settings object itself. - */ - public Caffe2Settings withPythonScriptFilePath(String pythonScriptFilePath) { - this.pythonScriptFilePath = pythonScriptFilePath; - return this; - } - - /** - * Get the pythonInterpreterPath property: The path to the Python interpreter. - * - * @return the pythonInterpreterPath value. - */ - public String pythonInterpreterPath() { - return this.pythonInterpreterPath; - } - - /** - * Set the pythonInterpreterPath property: The path to the Python interpreter. - * - * @param pythonInterpreterPath the pythonInterpreterPath value to set. - * @return the Caffe2Settings object itself. - */ - public Caffe2Settings withPythonInterpreterPath(String pythonInterpreterPath) { - this.pythonInterpreterPath = pythonInterpreterPath; - return this; - } - - /** - * Get the commandLineArgs property: Command line arguments that need to be passed to the python script. - * - * @return the commandLineArgs value. - */ - public String commandLineArgs() { - return this.commandLineArgs; - } - - /** - * Set the commandLineArgs property: Command line arguments that need to be passed to the python script. - * - * @param commandLineArgs the commandLineArgs value to set. - * @return the Caffe2Settings object itself. - */ - public Caffe2Settings withCommandLineArgs(String commandLineArgs) { - this.commandLineArgs = commandLineArgs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (pythonScriptFilePath() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property pythonScriptFilePath in model Caffe2Settings")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/CaffeSettings.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/CaffeSettings.java deleted file mode 100644 index e4be93d85a1c..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/CaffeSettings.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Caffe job settings. */ -@Fluent -public final class CaffeSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(CaffeSettings.class); - - /* - * Path of the config file for the job. This property cannot be specified - * if pythonScriptFilePath is specified. - */ - @JsonProperty(value = "configFilePath") - private String configFilePath; - - /* - * Python script to execute. This property cannot be specified if - * configFilePath is specified. - */ - @JsonProperty(value = "pythonScriptFilePath") - private String pythonScriptFilePath; - - /* - * The path to the Python interpreter. The property can be specified only - * if the pythonScriptFilePath is specified. - */ - @JsonProperty(value = "pythonInterpreterPath") - private String pythonInterpreterPath; - - /* - * Command line arguments that need to be passed to the Caffe job. - */ - @JsonProperty(value = "commandLineArgs") - private String commandLineArgs; - - /* - * Number of processes to launch for the job execution. The default value - * for this property is equal to nodeCount property - */ - @JsonProperty(value = "processCount") - private Integer processCount; - - /** - * Get the configFilePath property: Path of the config file for the job. This property cannot be specified if - * pythonScriptFilePath is specified. - * - * @return the configFilePath value. - */ - public String configFilePath() { - return this.configFilePath; - } - - /** - * Set the configFilePath property: Path of the config file for the job. This property cannot be specified if - * pythonScriptFilePath is specified. - * - * @param configFilePath the configFilePath value to set. - * @return the CaffeSettings object itself. - */ - public CaffeSettings withConfigFilePath(String configFilePath) { - this.configFilePath = configFilePath; - return this; - } - - /** - * Get the pythonScriptFilePath property: Python script to execute. This property cannot be specified if - * configFilePath is specified. - * - * @return the pythonScriptFilePath value. - */ - public String pythonScriptFilePath() { - return this.pythonScriptFilePath; - } - - /** - * Set the pythonScriptFilePath property: Python script to execute. This property cannot be specified if - * configFilePath is specified. - * - * @param pythonScriptFilePath the pythonScriptFilePath value to set. - * @return the CaffeSettings object itself. - */ - public CaffeSettings withPythonScriptFilePath(String pythonScriptFilePath) { - this.pythonScriptFilePath = pythonScriptFilePath; - return this; - } - - /** - * Get the pythonInterpreterPath property: The path to the Python interpreter. The property can be specified only if - * the pythonScriptFilePath is specified. - * - * @return the pythonInterpreterPath value. - */ - public String pythonInterpreterPath() { - return this.pythonInterpreterPath; - } - - /** - * Set the pythonInterpreterPath property: The path to the Python interpreter. The property can be specified only if - * the pythonScriptFilePath is specified. - * - * @param pythonInterpreterPath the pythonInterpreterPath value to set. - * @return the CaffeSettings object itself. - */ - public CaffeSettings withPythonInterpreterPath(String pythonInterpreterPath) { - this.pythonInterpreterPath = pythonInterpreterPath; - return this; - } - - /** - * Get the commandLineArgs property: Command line arguments that need to be passed to the Caffe job. - * - * @return the commandLineArgs value. - */ - public String commandLineArgs() { - return this.commandLineArgs; - } - - /** - * Set the commandLineArgs property: Command line arguments that need to be passed to the Caffe job. - * - * @param commandLineArgs the commandLineArgs value to set. - * @return the CaffeSettings object itself. - */ - public CaffeSettings withCommandLineArgs(String commandLineArgs) { - this.commandLineArgs = commandLineArgs; - return this; - } - - /** - * Get the processCount property: Number of processes to launch for the job execution. The default value for this - * property is equal to nodeCount property. - * - * @return the processCount value. - */ - public Integer processCount() { - return this.processCount; - } - - /** - * Set the processCount property: Number of processes to launch for the job execution. The default value for this - * property is equal to nodeCount property. - * - * @param processCount the processCount value to set. - * @return the CaffeSettings object itself. - */ - public CaffeSettings withProcessCount(Integer processCount) { - this.processCount = processCount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ChainerSettings.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ChainerSettings.java deleted file mode 100644 index 978f5ca90dd9..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ChainerSettings.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Chainer job settings. */ -@Fluent -public final class ChainerSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ChainerSettings.class); - - /* - * The python script to execute. - */ - @JsonProperty(value = "pythonScriptFilePath", required = true) - private String pythonScriptFilePath; - - /* - * The path to the Python interpreter. - */ - @JsonProperty(value = "pythonInterpreterPath") - private String pythonInterpreterPath; - - /* - * Command line arguments that need to be passed to the python script. - */ - @JsonProperty(value = "commandLineArgs") - private String commandLineArgs; - - /* - * Number of processes to launch for the job execution. The default value - * for this property is equal to nodeCount property - */ - @JsonProperty(value = "processCount") - private Integer processCount; - - /** - * Get the pythonScriptFilePath property: The python script to execute. - * - * @return the pythonScriptFilePath value. - */ - public String pythonScriptFilePath() { - return this.pythonScriptFilePath; - } - - /** - * Set the pythonScriptFilePath property: The python script to execute. - * - * @param pythonScriptFilePath the pythonScriptFilePath value to set. - * @return the ChainerSettings object itself. - */ - public ChainerSettings withPythonScriptFilePath(String pythonScriptFilePath) { - this.pythonScriptFilePath = pythonScriptFilePath; - return this; - } - - /** - * Get the pythonInterpreterPath property: The path to the Python interpreter. - * - * @return the pythonInterpreterPath value. - */ - public String pythonInterpreterPath() { - return this.pythonInterpreterPath; - } - - /** - * Set the pythonInterpreterPath property: The path to the Python interpreter. - * - * @param pythonInterpreterPath the pythonInterpreterPath value to set. - * @return the ChainerSettings object itself. - */ - public ChainerSettings withPythonInterpreterPath(String pythonInterpreterPath) { - this.pythonInterpreterPath = pythonInterpreterPath; - return this; - } - - /** - * Get the commandLineArgs property: Command line arguments that need to be passed to the python script. - * - * @return the commandLineArgs value. - */ - public String commandLineArgs() { - return this.commandLineArgs; - } - - /** - * Set the commandLineArgs property: Command line arguments that need to be passed to the python script. - * - * @param commandLineArgs the commandLineArgs value to set. - * @return the ChainerSettings object itself. - */ - public ChainerSettings withCommandLineArgs(String commandLineArgs) { - this.commandLineArgs = commandLineArgs; - return this; - } - - /** - * Get the processCount property: Number of processes to launch for the job execution. The default value for this - * property is equal to nodeCount property. - * - * @return the processCount value. - */ - public Integer processCount() { - return this.processCount; - } - - /** - * Set the processCount property: Number of processes to launch for the job execution. The default value for this - * property is equal to nodeCount property. - * - * @param processCount the processCount value to set. - * @return the ChainerSettings object itself. - */ - public ChainerSettings withProcessCount(Integer processCount) { - this.processCount = processCount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (pythonScriptFilePath() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property pythonScriptFilePath in model ChainerSettings")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Cluster.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Cluster.java deleted file mode 100644 index 22430e3e6011..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Cluster.java +++ /dev/null @@ -1,376 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batchai.fluent.models.ClusterInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of Cluster. */ -public interface Cluster { - /** - * 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 vmSize property: The size of the virtual machines in the cluster. All nodes in a cluster have the same - * VM size. - * - * @return the vmSize value. - */ - String vmSize(); - - /** - * Gets the vmPriority property: VM priority of cluster nodes. - * - * @return the vmPriority value. - */ - VmPriority vmPriority(); - - /** - * Gets the scaleSettings property: Scale settings of the cluster. - * - * @return the scaleSettings value. - */ - ScaleSettings scaleSettings(); - - /** - * Gets the virtualMachineConfiguration property: Virtual machine configuration (OS image) of the compute nodes. All - * nodes in a cluster have the same OS image configuration. - * - * @return the virtualMachineConfiguration value. - */ - VirtualMachineConfiguration virtualMachineConfiguration(); - - /** - * Gets the nodeSetup property: Setup (mount file systems, performance counters settings and custom setup task) to - * be performed on each compute node in the cluster. - * - * @return the nodeSetup value. - */ - NodeSetup nodeSetup(); - - /** - * Gets the userAccountSettings property: Administrator user account settings which can be used to SSH to compute - * nodes. - * - * @return the userAccountSettings value. - */ - UserAccountSettings userAccountSettings(); - - /** - * Gets the subnet property: Virtual network subnet resource ID the cluster nodes belong to. - * - * @return the subnet value. - */ - ResourceId subnet(); - - /** - * Gets the creationTime property: The time when the cluster was created. - * - * @return the creationTime value. - */ - OffsetDateTime creationTime(); - - /** - * Gets the provisioningState property: Provisioning state of the cluster. Possible value are: creating - Specifies - * that the cluster is being created. succeeded - Specifies that the cluster has been created successfully. failed - - * Specifies that the cluster creation has failed. deleting - Specifies that the cluster is being deleted. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the provisioningStateTransitionTime property: Time when the provisioning state was changed. - * - * @return the provisioningStateTransitionTime value. - */ - OffsetDateTime provisioningStateTransitionTime(); - - /** - * Gets the allocationState property: Allocation state of the cluster. Possible values are: steady - Indicates that - * the cluster is not resizing. There are no changes to the number of compute nodes in the cluster in progress. A - * cluster enters this state when it is created and when no operations are being performed on the cluster to change - * the number of compute nodes. resizing - Indicates that the cluster is resizing; that is, compute nodes are being - * added to or removed from the cluster. - * - * @return the allocationState value. - */ - AllocationState allocationState(); - - /** - * Gets the allocationStateTransitionTime property: The time at which the cluster entered its current allocation - * state. - * - * @return the allocationStateTransitionTime value. - */ - OffsetDateTime allocationStateTransitionTime(); - - /** - * Gets the errors property: Collection of errors encountered by various compute nodes during node setup. - * - * @return the errors value. - */ - List errors(); - - /** - * Gets the currentNodeCount property: The number of compute nodes currently assigned to the cluster. - * - * @return the currentNodeCount value. - */ - Integer currentNodeCount(); - - /** - * Gets the nodeStateCounts property: Counts of various node states on the cluster. - * - * @return the nodeStateCounts value. - */ - NodeStateCounts nodeStateCounts(); - - /** - * Gets the inner com.azure.resourcemanager.batchai.fluent.models.ClusterInner object. - * - * @return the inner object. - */ - ClusterInner innerModel(); - - /** The entirety of the Cluster definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** The Cluster definition stages. */ - interface DefinitionStages { - /** The first stage of the Cluster definition. */ - interface Blank extends WithParentResource { - } - - /** The stage of the Cluster definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of - * alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the Cluster 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.WithVmSize, DefinitionStages.WithVmPriority, - DefinitionStages.WithScaleSettings, DefinitionStages.WithVirtualMachineConfiguration, - DefinitionStages.WithNodeSetup, DefinitionStages.WithUserAccountSettings, DefinitionStages.WithSubnet { - /** - * Executes the create request. - * - * @return the created resource. - */ - Cluster create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Cluster create(Context context); - } - - /** The stage of the Cluster definition allowing to specify vmSize. */ - interface WithVmSize { - /** - * Specifies the vmSize property: The size of the virtual machines in the cluster. All nodes in a cluster - * have the same VM size. For information about available VM sizes for clusters using images from the - * Virtual Machines Marketplace see Sizes for Virtual Machines (Linux). Batch AI service supports all Azure - * VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 - * series).. - * - * @param vmSize The size of the virtual machines in the cluster. All nodes in a cluster have the same VM - * size. For information about available VM sizes for clusters using images from the Virtual Machines - * Marketplace see Sizes for Virtual Machines (Linux). Batch AI service supports all Azure VM sizes - * except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 - * series). - * @return the next definition stage. - */ - WithCreate withVmSize(String vmSize); - } - - /** The stage of the Cluster definition allowing to specify vmPriority. */ - interface WithVmPriority { - /** - * Specifies the vmPriority property: VM priority. Allowed values are: dedicated (default) and lowpriority.. - * - * @param vmPriority VM priority. Allowed values are: dedicated (default) and lowpriority. - * @return the next definition stage. - */ - WithCreate withVmPriority(VmPriority vmPriority); - } - - /** The stage of the Cluster definition allowing to specify scaleSettings. */ - interface WithScaleSettings { - /** - * Specifies the scaleSettings property: Scale settings for the cluster. Batch AI service supports manual - * and auto scale clusters.. - * - * @param scaleSettings Scale settings for the cluster. Batch AI service supports manual and auto scale - * clusters. - * @return the next definition stage. - */ - WithCreate withScaleSettings(ScaleSettings scaleSettings); - } - - /** The stage of the Cluster definition allowing to specify virtualMachineConfiguration. */ - interface WithVirtualMachineConfiguration { - /** - * Specifies the virtualMachineConfiguration property: OS image configuration for cluster nodes. All nodes - * in a cluster have the same OS image.. - * - * @param virtualMachineConfiguration OS image configuration for cluster nodes. All nodes in a cluster have - * the same OS image. - * @return the next definition stage. - */ - WithCreate withVirtualMachineConfiguration(VirtualMachineConfiguration virtualMachineConfiguration); - } - - /** The stage of the Cluster definition allowing to specify nodeSetup. */ - interface WithNodeSetup { - /** - * Specifies the nodeSetup property: Setup to be performed on each compute node in the cluster.. - * - * @param nodeSetup Setup to be performed on each compute node in the cluster. - * @return the next definition stage. - */ - WithCreate withNodeSetup(NodeSetup nodeSetup); - } - - /** The stage of the Cluster definition allowing to specify userAccountSettings. */ - interface WithUserAccountSettings { - /** - * Specifies the userAccountSettings property: Settings for an administrator user account that will be - * created on each compute node in the cluster.. - * - * @param userAccountSettings Settings for an administrator user account that will be created on each - * compute node in the cluster. - * @return the next definition stage. - */ - WithCreate withUserAccountSettings(UserAccountSettings userAccountSettings); - } - - /** The stage of the Cluster definition allowing to specify subnet. */ - interface WithSubnet { - /** - * Specifies the subnet property: Existing virtual network subnet to put the cluster nodes in. Note, if a - * File Server mount configured in node setup, the File Server's subnet will be used automatically.. - * - * @param subnet Existing virtual network subnet to put the cluster nodes in. Note, if a File Server mount - * configured in node setup, the File Server's subnet will be used automatically. - * @return the next definition stage. - */ - WithCreate withSubnet(ResourceId subnet); - } - } - - /** - * Begins update for the Cluster resource. - * - * @return the stage of resource update. - */ - Cluster.Update update(); - - /** The template for Cluster update. */ - interface Update extends UpdateStages.WithScaleSettings { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Cluster apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Cluster apply(Context context); - } - - /** The Cluster update stages. */ - interface UpdateStages { - /** The stage of the Cluster update allowing to specify scaleSettings. */ - interface WithScaleSettings { - /** - * Specifies the scaleSettings property: Desired scale settings for the cluster. Batch AI service supports - * manual and auto scale clusters.. - * - * @param scaleSettings Desired scale settings for the cluster. Batch AI service supports manual and auto - * scale clusters. - * @return the next definition stage. - */ - Update withScaleSettings(ScaleSettings scaleSettings); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Cluster refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Cluster refresh(Context context); - - /** - * Get the IP address, port of all the compute nodes 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 the IP address, port of all the compute nodes in the Cluster. - */ - PagedIterable listRemoteLoginInformation(); - - /** - * Get the IP address, port of all the compute nodes 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 the IP address, port of all the compute nodes in the Cluster. - */ - PagedIterable listRemoteLoginInformation(Context context); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ClusterCreateParameters.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ClusterCreateParameters.java deleted file mode 100644 index 91d6f3bcdea7..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ClusterCreateParameters.java +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Cluster creation operation. */ -@JsonFlatten -@Fluent -public class ClusterCreateParameters { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ClusterCreateParameters.class); - - /* - * The size of the virtual machines in the cluster. All nodes in a cluster - * have the same VM size. For information about available VM sizes for - * clusters using images from the Virtual Machines Marketplace see Sizes - * for Virtual Machines (Linux). Batch AI service supports all Azure VM - * sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, - * STANDARD_DS, and STANDARD_DSV2 series). - */ - @JsonProperty(value = "properties.vmSize") - private String vmSize; - - /* - * VM priority. Allowed values are: dedicated (default) and lowpriority. - */ - @JsonProperty(value = "properties.vmPriority") - private VmPriority vmPriority; - - /* - * Scale settings for the cluster. Batch AI service supports manual and - * auto scale clusters. - */ - @JsonProperty(value = "properties.scaleSettings") - private ScaleSettings scaleSettings; - - /* - * OS image configuration for cluster nodes. All nodes in a cluster have - * the same OS image. - */ - @JsonProperty(value = "properties.virtualMachineConfiguration") - private VirtualMachineConfiguration virtualMachineConfiguration; - - /* - * Setup to be performed on each compute node in the cluster. - */ - @JsonProperty(value = "properties.nodeSetup") - private NodeSetup nodeSetup; - - /* - * Settings for an administrator user account that will be created on each - * compute node in the cluster. - */ - @JsonProperty(value = "properties.userAccountSettings") - private UserAccountSettings userAccountSettings; - - /* - * Existing virtual network subnet to put the cluster nodes in. Note, if a - * File Server mount configured in node setup, the File Server's subnet - * will be used automatically. - */ - @JsonProperty(value = "properties.subnet") - private ResourceId subnet; - - /** - * Get the vmSize property: The size of the virtual machines in the cluster. All nodes in a cluster have the same VM - * size. For information about available VM sizes for clusters using images from the Virtual Machines Marketplace - * see Sizes for Virtual Machines (Linux). Batch AI service supports all Azure VM sizes except STANDARD_A0 and those - * with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: The size of the virtual machines in the cluster. All nodes in a cluster have the same VM - * size. For information about available VM sizes for clusters using images from the Virtual Machines Marketplace - * see Sizes for Virtual Machines (Linux). Batch AI service supports all Azure VM sizes except STANDARD_A0 and those - * with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). - * - * @param vmSize the vmSize value to set. - * @return the ClusterCreateParameters object itself. - */ - public ClusterCreateParameters withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the vmPriority property: VM priority. Allowed values are: dedicated (default) and lowpriority. - * - * @return the vmPriority value. - */ - public VmPriority vmPriority() { - return this.vmPriority; - } - - /** - * Set the vmPriority property: VM priority. Allowed values are: dedicated (default) and lowpriority. - * - * @param vmPriority the vmPriority value to set. - * @return the ClusterCreateParameters object itself. - */ - public ClusterCreateParameters withVmPriority(VmPriority vmPriority) { - this.vmPriority = vmPriority; - return this; - } - - /** - * Get the scaleSettings property: Scale settings for the cluster. Batch AI service supports manual and auto scale - * clusters. - * - * @return the scaleSettings value. - */ - public ScaleSettings scaleSettings() { - return this.scaleSettings; - } - - /** - * Set the scaleSettings property: Scale settings for the cluster. Batch AI service supports manual and auto scale - * clusters. - * - * @param scaleSettings the scaleSettings value to set. - * @return the ClusterCreateParameters object itself. - */ - public ClusterCreateParameters withScaleSettings(ScaleSettings scaleSettings) { - this.scaleSettings = scaleSettings; - return this; - } - - /** - * Get the virtualMachineConfiguration property: OS image configuration for cluster nodes. All nodes in a cluster - * have the same OS image. - * - * @return the virtualMachineConfiguration value. - */ - public VirtualMachineConfiguration virtualMachineConfiguration() { - return this.virtualMachineConfiguration; - } - - /** - * Set the virtualMachineConfiguration property: OS image configuration for cluster nodes. All nodes in a cluster - * have the same OS image. - * - * @param virtualMachineConfiguration the virtualMachineConfiguration value to set. - * @return the ClusterCreateParameters object itself. - */ - public ClusterCreateParameters - withVirtualMachineConfiguration(VirtualMachineConfiguration virtualMachineConfiguration) { - this.virtualMachineConfiguration = virtualMachineConfiguration; - return this; - } - - /** - * Get the nodeSetup property: Setup to be performed on each compute node in the cluster. - * - * @return the nodeSetup value. - */ - public NodeSetup nodeSetup() { - return this.nodeSetup; - } - - /** - * Set the nodeSetup property: Setup to be performed on each compute node in the cluster. - * - * @param nodeSetup the nodeSetup value to set. - * @return the ClusterCreateParameters object itself. - */ - public ClusterCreateParameters withNodeSetup(NodeSetup nodeSetup) { - this.nodeSetup = nodeSetup; - return this; - } - - /** - * Get the userAccountSettings property: Settings for an administrator user account that will be created on each - * compute node in the cluster. - * - * @return the userAccountSettings value. - */ - public UserAccountSettings userAccountSettings() { - return this.userAccountSettings; - } - - /** - * Set the userAccountSettings property: Settings for an administrator user account that will be created on each - * compute node in the cluster. - * - * @param userAccountSettings the userAccountSettings value to set. - * @return the ClusterCreateParameters object itself. - */ - public ClusterCreateParameters withUserAccountSettings(UserAccountSettings userAccountSettings) { - this.userAccountSettings = userAccountSettings; - return this; - } - - /** - * Get the subnet property: Existing virtual network subnet to put the cluster nodes in. Note, if a File Server - * mount configured in node setup, the File Server's subnet will be used automatically. - * - * @return the subnet value. - */ - public ResourceId subnet() { - return this.subnet; - } - - /** - * Set the subnet property: Existing virtual network subnet to put the cluster nodes in. Note, if a File Server - * mount configured in node setup, the File Server's subnet will be used automatically. - * - * @param subnet the subnet value to set. - * @return the ClusterCreateParameters object itself. - */ - public ClusterCreateParameters withSubnet(ResourceId subnet) { - this.subnet = subnet; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scaleSettings() != null) { - scaleSettings().validate(); - } - if (virtualMachineConfiguration() != null) { - virtualMachineConfiguration().validate(); - } - if (nodeSetup() != null) { - nodeSetup().validate(); - } - if (userAccountSettings() != null) { - userAccountSettings().validate(); - } - if (subnet() != null) { - subnet().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ClusterListResult.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ClusterListResult.java deleted file mode 100644 index df5e3f2b64a7..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ClusterListResult.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.fluent.models.ClusterInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Values returned by the List Clusters operation. */ -@Immutable -public final class ClusterListResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ClusterListResult.class); - - /* - * The collection of returned Clusters. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The continuation token. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: The collection of returned Clusters. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The continuation token. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ClusterUpdateParameters.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ClusterUpdateParameters.java deleted file mode 100644 index 52eaf905800d..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ClusterUpdateParameters.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Cluster update parameters. */ -@JsonFlatten -@Fluent -public class ClusterUpdateParameters { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ClusterUpdateParameters.class); - - /* - * Desired scale settings for the cluster. Batch AI service supports manual - * and auto scale clusters. - */ - @JsonProperty(value = "properties.scaleSettings") - private ScaleSettings scaleSettings; - - /** - * Get the scaleSettings property: Desired scale settings for the cluster. Batch AI service supports manual and auto - * scale clusters. - * - * @return the scaleSettings value. - */ - public ScaleSettings scaleSettings() { - return this.scaleSettings; - } - - /** - * Set the scaleSettings property: Desired scale settings for the cluster. Batch AI service supports manual and auto - * scale clusters. - * - * @param scaleSettings the scaleSettings value to set. - * @return the ClusterUpdateParameters object itself. - */ - public ClusterUpdateParameters withScaleSettings(ScaleSettings scaleSettings) { - this.scaleSettings = scaleSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scaleSettings() != null) { - scaleSettings().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Clusters.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Clusters.java deleted file mode 100644 index b1349e1bcba7..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Clusters.java +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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 Clusters. */ -public interface Clusters { - /** - * Deletes a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String clusterName); - - /** - * Deletes a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String clusterName, Context context); - - /** - * Gets information about a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Cluster. - */ - Cluster get(String resourceGroupName, String workspaceName, String clusterName); - - /** - * Gets information about a Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Cluster. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String clusterName, - Context context); - - /** - * Get the IP address, port of all the compute nodes in the Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP address, port of all the compute nodes in the Cluster. - */ - PagedIterable listRemoteLoginInformation(String resourceGroupName, String workspaceName, - String clusterName); - - /** - * Get the IP address, port of all the compute nodes in the Cluster. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a - * combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 - * through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the IP address, port of all the compute nodes in the Cluster. - */ - PagedIterable listRemoteLoginInformation(String resourceGroupName, String workspaceName, - String clusterName, Context context); - - /** - * Gets information about Clusters associated with the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Clusters associated with the given Workspace. - */ - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); - - /** - * Gets information about Clusters associated with the given Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Clusters associated with the given Workspace. - */ - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Integer maxResults, - Context context); - - /** - * Gets information about a 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. - * @return information about a Cluster. - */ - Cluster getById(String id); - - /** - * Gets information about a Cluster. - * - * @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 information about a Cluster. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a 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 a Cluster. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Cluster resource. - * - * @param name resource name. - * @return the first stage of the new Cluster definition. - */ - Cluster.DefinitionStages.Blank define(String name); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/CntKsettings.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/CntKsettings.java deleted file mode 100644 index 5faa4f01a106..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/CntKsettings.java +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** CNTK (aka Microsoft Cognitive Toolkit) job settings. */ -@Fluent -public final class CntKsettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(CntKsettings.class); - - /* - * The language to use for launching CNTK (aka Microsoft Cognitive Toolkit) - * job. Valid values are 'BrainScript' or 'Python'. - */ - @JsonProperty(value = "languageType") - private String languageType; - - /* - * Specifies the path of the BrainScript config file. This property can be - * specified only if the languageType is 'BrainScript'. - */ - @JsonProperty(value = "configFilePath") - private String configFilePath; - - /* - * Python script to execute. This property can be specified only if the - * languageType is 'Python'. - */ - @JsonProperty(value = "pythonScriptFilePath") - private String pythonScriptFilePath; - - /* - * The path to the Python interpreter. This property can be specified only - * if the languageType is 'Python'. - */ - @JsonProperty(value = "pythonInterpreterPath") - private String pythonInterpreterPath; - - /* - * Command line arguments that need to be passed to the python script or - * cntk executable. - */ - @JsonProperty(value = "commandLineArgs") - private String commandLineArgs; - - /* - * Number of processes to launch for the job execution. The default value - * for this property is equal to nodeCount property - */ - @JsonProperty(value = "processCount") - private Integer processCount; - - /** - * Get the languageType property: The language to use for launching CNTK (aka Microsoft Cognitive Toolkit) job. - * Valid values are 'BrainScript' or 'Python'. - * - * @return the languageType value. - */ - public String languageType() { - return this.languageType; - } - - /** - * Set the languageType property: The language to use for launching CNTK (aka Microsoft Cognitive Toolkit) job. - * Valid values are 'BrainScript' or 'Python'. - * - * @param languageType the languageType value to set. - * @return the CntKsettings object itself. - */ - public CntKsettings withLanguageType(String languageType) { - this.languageType = languageType; - return this; - } - - /** - * Get the configFilePath property: Specifies the path of the BrainScript config file. This property can be - * specified only if the languageType is 'BrainScript'. - * - * @return the configFilePath value. - */ - public String configFilePath() { - return this.configFilePath; - } - - /** - * Set the configFilePath property: Specifies the path of the BrainScript config file. This property can be - * specified only if the languageType is 'BrainScript'. - * - * @param configFilePath the configFilePath value to set. - * @return the CntKsettings object itself. - */ - public CntKsettings withConfigFilePath(String configFilePath) { - this.configFilePath = configFilePath; - return this; - } - - /** - * Get the pythonScriptFilePath property: Python script to execute. This property can be specified only if the - * languageType is 'Python'. - * - * @return the pythonScriptFilePath value. - */ - public String pythonScriptFilePath() { - return this.pythonScriptFilePath; - } - - /** - * Set the pythonScriptFilePath property: Python script to execute. This property can be specified only if the - * languageType is 'Python'. - * - * @param pythonScriptFilePath the pythonScriptFilePath value to set. - * @return the CntKsettings object itself. - */ - public CntKsettings withPythonScriptFilePath(String pythonScriptFilePath) { - this.pythonScriptFilePath = pythonScriptFilePath; - return this; - } - - /** - * Get the pythonInterpreterPath property: The path to the Python interpreter. This property can be specified only - * if the languageType is 'Python'. - * - * @return the pythonInterpreterPath value. - */ - public String pythonInterpreterPath() { - return this.pythonInterpreterPath; - } - - /** - * Set the pythonInterpreterPath property: The path to the Python interpreter. This property can be specified only - * if the languageType is 'Python'. - * - * @param pythonInterpreterPath the pythonInterpreterPath value to set. - * @return the CntKsettings object itself. - */ - public CntKsettings withPythonInterpreterPath(String pythonInterpreterPath) { - this.pythonInterpreterPath = pythonInterpreterPath; - return this; - } - - /** - * Get the commandLineArgs property: Command line arguments that need to be passed to the python script or cntk - * executable. - * - * @return the commandLineArgs value. - */ - public String commandLineArgs() { - return this.commandLineArgs; - } - - /** - * Set the commandLineArgs property: Command line arguments that need to be passed to the python script or cntk - * executable. - * - * @param commandLineArgs the commandLineArgs value to set. - * @return the CntKsettings object itself. - */ - public CntKsettings withCommandLineArgs(String commandLineArgs) { - this.commandLineArgs = commandLineArgs; - return this; - } - - /** - * Get the processCount property: Number of processes to launch for the job execution. The default value for this - * property is equal to nodeCount property. - * - * @return the processCount value. - */ - public Integer processCount() { - return this.processCount; - } - - /** - * Set the processCount property: Number of processes to launch for the job execution. The default value for this - * property is equal to nodeCount property. - * - * @param processCount the processCount value to set. - * @return the CntKsettings object itself. - */ - public CntKsettings withProcessCount(Integer processCount) { - this.processCount = processCount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ContainerSettings.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ContainerSettings.java deleted file mode 100644 index e16173fea6b4..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ContainerSettings.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Docker container settings. */ -@Fluent -public final class ContainerSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ContainerSettings.class); - - /* - * Information about docker image and docker registry to download the - * container from. - */ - @JsonProperty(value = "imageSourceRegistry", required = true) - private ImageSourceRegistry imageSourceRegistry; - - /* - * Size of /dev/shm. Please refer to docker documentation for supported - * argument formats. - */ - @JsonProperty(value = "shmSize") - private String shmSize; - - /** - * Get the imageSourceRegistry property: Information about docker image and docker registry to download the - * container from. - * - * @return the imageSourceRegistry value. - */ - public ImageSourceRegistry imageSourceRegistry() { - return this.imageSourceRegistry; - } - - /** - * Set the imageSourceRegistry property: Information about docker image and docker registry to download the - * container from. - * - * @param imageSourceRegistry the imageSourceRegistry value to set. - * @return the ContainerSettings object itself. - */ - public ContainerSettings withImageSourceRegistry(ImageSourceRegistry imageSourceRegistry) { - this.imageSourceRegistry = imageSourceRegistry; - return this; - } - - /** - * Get the shmSize property: Size of /dev/shm. Please refer to docker documentation for supported argument formats. - * - * @return the shmSize value. - */ - public String shmSize() { - return this.shmSize; - } - - /** - * Set the shmSize property: Size of /dev/shm. Please refer to docker documentation for supported argument formats. - * - * @param shmSize the shmSize value to set. - * @return the ContainerSettings object itself. - */ - public ContainerSettings withShmSize(String shmSize) { - this.shmSize = shmSize; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (imageSourceRegistry() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property imageSourceRegistry in model ContainerSettings")); - } else { - imageSourceRegistry().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/CustomMpiSettings.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/CustomMpiSettings.java deleted file mode 100644 index 6aca71146447..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/CustomMpiSettings.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Custom MPI job settings. */ -@Fluent -public final class CustomMpiSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(CustomMpiSettings.class); - - /* - * The command line to be executed by mpi runtime on each compute node. - */ - @JsonProperty(value = "commandLine", required = true) - private String commandLine; - - /* - * Number of processes to launch for the job execution. The default value - * for this property is equal to nodeCount property - */ - @JsonProperty(value = "processCount") - private Integer processCount; - - /** - * Get the commandLine property: The command line to be executed by mpi runtime on each compute node. - * - * @return the commandLine value. - */ - public String commandLine() { - return this.commandLine; - } - - /** - * Set the commandLine property: The command line to be executed by mpi runtime on each compute node. - * - * @param commandLine the commandLine value to set. - * @return the CustomMpiSettings object itself. - */ - public CustomMpiSettings withCommandLine(String commandLine) { - this.commandLine = commandLine; - return this; - } - - /** - * Get the processCount property: Number of processes to launch for the job execution. The default value for this - * property is equal to nodeCount property. - * - * @return the processCount value. - */ - public Integer processCount() { - return this.processCount; - } - - /** - * Set the processCount property: Number of processes to launch for the job execution. The default value for this - * property is equal to nodeCount property. - * - * @param processCount the processCount value to set. - * @return the CustomMpiSettings object itself. - */ - public CustomMpiSettings withProcessCount(Integer processCount) { - this.processCount = processCount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (commandLine() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property commandLine in model CustomMpiSettings")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/CustomToolkitSettings.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/CustomToolkitSettings.java deleted file mode 100644 index 3f82eb29ae69..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/CustomToolkitSettings.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Custom tool kit job settings. */ -@Fluent -public final class CustomToolkitSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(CustomToolkitSettings.class); - - /* - * The command line to execute on the master node. - */ - @JsonProperty(value = "commandLine") - private String commandLine; - - /** - * Get the commandLine property: The command line to execute on the master node. - * - * @return the commandLine value. - */ - public String commandLine() { - return this.commandLine; - } - - /** - * Set the commandLine property: The command line to execute on the master node. - * - * @param commandLine the commandLine value to set. - * @return the CustomToolkitSettings object itself. - */ - public CustomToolkitSettings withCommandLine(String commandLine) { - this.commandLine = commandLine; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/DataDisks.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/DataDisks.java deleted file mode 100644 index b77c210033b4..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/DataDisks.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Data disks settings. */ -@Fluent -public final class DataDisks { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(DataDisks.class); - - /* - * Disk size in GB for the blank data disks. - */ - @JsonProperty(value = "diskSizeInGB", required = true) - private int diskSizeInGB; - - /* - * Caching type for the disks. Available values are none (default), - * readonly, readwrite. Caching type can be set only for VM sizes - * supporting premium storage. - */ - @JsonProperty(value = "cachingType") - private CachingType cachingType; - - /* - * Number of data disks attached to the File Server. If multiple disks - * attached, they will be configured in RAID level 0. - */ - @JsonProperty(value = "diskCount", required = true) - private int diskCount; - - /* - * Type of storage account to be used on the disk. Possible values are: - * Standard_LRS or Premium_LRS. Premium storage account type can only be - * used with VM sizes supporting premium storage. - */ - @JsonProperty(value = "storageAccountType", required = true) - private StorageAccountType storageAccountType; - - /** - * Get the diskSizeInGB property: Disk size in GB for the blank data disks. - * - * @return the diskSizeInGB value. - */ - public int diskSizeInGB() { - return this.diskSizeInGB; - } - - /** - * Set the diskSizeInGB property: Disk size in GB for the blank data disks. - * - * @param diskSizeInGB the diskSizeInGB value to set. - * @return the DataDisks object itself. - */ - public DataDisks withDiskSizeInGB(int diskSizeInGB) { - this.diskSizeInGB = diskSizeInGB; - return this; - } - - /** - * Get the cachingType property: Caching type for the disks. Available values are none (default), readonly, - * readwrite. Caching type can be set only for VM sizes supporting premium storage. - * - * @return the cachingType value. - */ - public CachingType cachingType() { - return this.cachingType; - } - - /** - * Set the cachingType property: Caching type for the disks. Available values are none (default), readonly, - * readwrite. Caching type can be set only for VM sizes supporting premium storage. - * - * @param cachingType the cachingType value to set. - * @return the DataDisks object itself. - */ - public DataDisks withCachingType(CachingType cachingType) { - this.cachingType = cachingType; - return this; - } - - /** - * Get the diskCount property: Number of data disks attached to the File Server. If multiple disks attached, they - * will be configured in RAID level 0. - * - * @return the diskCount value. - */ - public int diskCount() { - return this.diskCount; - } - - /** - * Set the diskCount property: Number of data disks attached to the File Server. If multiple disks attached, they - * will be configured in RAID level 0. - * - * @param diskCount the diskCount value to set. - * @return the DataDisks object itself. - */ - public DataDisks withDiskCount(int diskCount) { - this.diskCount = diskCount; - return this; - } - - /** - * Get the storageAccountType property: Type of storage account to be used on the disk. Possible values are: - * Standard_LRS or Premium_LRS. Premium storage account type can only be used with VM sizes supporting premium - * storage. - * - * @return the storageAccountType value. - */ - public StorageAccountType storageAccountType() { - return this.storageAccountType; - } - - /** - * Set the storageAccountType property: Type of storage account to be used on the disk. Possible values are: - * Standard_LRS or Premium_LRS. Premium storage account type can only be used with VM sizes supporting premium - * storage. - * - * @param storageAccountType the storageAccountType value to set. - * @return the DataDisks object itself. - */ - public DataDisks withStorageAccountType(StorageAccountType storageAccountType) { - this.storageAccountType = storageAccountType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storageAccountType() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property storageAccountType in model DataDisks")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/DeallocationOption.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/DeallocationOption.java deleted file mode 100644 index 2e558f44e809..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/DeallocationOption.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DeallocationOption. */ -public final class DeallocationOption extends ExpandableStringEnum { - /** Static value requeue for DeallocationOption. */ - public static final DeallocationOption REQUEUE = fromString("requeue"); - - /** Static value terminate for DeallocationOption. */ - public static final DeallocationOption TERMINATE = fromString("terminate"); - - /** Static value waitforjobcompletion for DeallocationOption. */ - public static final DeallocationOption WAITFORJOBCOMPLETION = fromString("waitforjobcompletion"); - - /** - * Creates or finds a DeallocationOption from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeallocationOption. - */ - @JsonCreator - public static DeallocationOption fromString(String name) { - return fromString(name, DeallocationOption.class); - } - - /** @return known DeallocationOption values. */ - public static Collection values() { - return values(DeallocationOption.class); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/EnvironmentVariable.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/EnvironmentVariable.java deleted file mode 100644 index fc99d4a8db3f..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/EnvironmentVariable.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** An environment variable definition. */ -@Fluent -public final class EnvironmentVariable { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(EnvironmentVariable.class); - - /* - * The name of the environment variable. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * The value of the environment variable. - */ - @JsonProperty(value = "value", required = true) - private String value; - - /** - * Get the name property: The name of the environment variable. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the environment variable. - * - * @param name the name value to set. - * @return the EnvironmentVariable object itself. - */ - public EnvironmentVariable withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: The value of the environment variable. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: The value of the environment variable. - * - * @param value the value value to set. - * @return the EnvironmentVariable object itself. - */ - public EnvironmentVariable withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property name in model EnvironmentVariable")); - } - if (value() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model EnvironmentVariable")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/EnvironmentVariableWithSecretValue.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/EnvironmentVariableWithSecretValue.java deleted file mode 100644 index 879e80ba71ff..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/EnvironmentVariableWithSecretValue.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** An environment variable with secret value definition. */ -@Fluent -public final class EnvironmentVariableWithSecretValue { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(EnvironmentVariableWithSecretValue.class); - - /* - * The name of the environment variable to store the secret value. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * The value of the environment variable. This value will never be reported - * back by Batch AI. - */ - @JsonProperty(value = "value") - private String value; - - /* - * KeyVault store and secret which contains the value for the environment - * variable. One of value or valueSecretReference must be provided. - */ - @JsonProperty(value = "valueSecretReference") - private KeyVaultSecretReference valueSecretReference; - - /** - * Get the name property: The name of the environment variable to store the secret value. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the environment variable to store the secret value. - * - * @param name the name value to set. - * @return the EnvironmentVariableWithSecretValue object itself. - */ - public EnvironmentVariableWithSecretValue withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: The value of the environment variable. This value will never be reported back by Batch - * AI. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: The value of the environment variable. This value will never be reported back by Batch - * AI. - * - * @param value the value value to set. - * @return the EnvironmentVariableWithSecretValue object itself. - */ - public EnvironmentVariableWithSecretValue withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the valueSecretReference property: KeyVault store and secret which contains the value for the environment - * variable. One of value or valueSecretReference must be provided. - * - * @return the valueSecretReference value. - */ - public KeyVaultSecretReference valueSecretReference() { - return this.valueSecretReference; - } - - /** - * Set the valueSecretReference property: KeyVault store and secret which contains the value for the environment - * variable. One of value or valueSecretReference must be provided. - * - * @param valueSecretReference the valueSecretReference value to set. - * @return the EnvironmentVariableWithSecretValue object itself. - */ - public EnvironmentVariableWithSecretValue withValueSecretReference(KeyVaultSecretReference valueSecretReference) { - this.valueSecretReference = valueSecretReference; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property name in model EnvironmentVariableWithSecretValue")); - } - if (valueSecretReference() != null) { - valueSecretReference().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ExecutionState.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ExecutionState.java deleted file mode 100644 index 08aa8a4cc08b..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ExecutionState.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ExecutionState. */ -public final class ExecutionState extends ExpandableStringEnum { - /** Static value queued for ExecutionState. */ - public static final ExecutionState QUEUED = fromString("queued"); - - /** Static value running for ExecutionState. */ - public static final ExecutionState RUNNING = fromString("running"); - - /** Static value terminating for ExecutionState. */ - public static final ExecutionState TERMINATING = fromString("terminating"); - - /** Static value succeeded for ExecutionState. */ - public static final ExecutionState SUCCEEDED = fromString("succeeded"); - - /** Static value failed for ExecutionState. */ - public static final ExecutionState FAILED = fromString("failed"); - - /** - * Creates or finds a ExecutionState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ExecutionState. - */ - @JsonCreator - public static ExecutionState fromString(String name) { - return fromString(name, ExecutionState.class); - } - - /** @return known ExecutionState values. */ - public static Collection values() { - return values(ExecutionState.class); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Experiment.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Experiment.java deleted file mode 100644 index 96bd7b54f26c..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Experiment.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.resourcemanager.batchai.fluent.models.ExperimentInner; -import java.time.OffsetDateTime; - -/** An immutable client-side representation of Experiment. */ -public interface Experiment { - /** - * 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 creationTime property: Time when the Experiment was created. - * - * @return the creationTime value. - */ - OffsetDateTime creationTime(); - - /** - * Gets the provisioningState property: The provisioned state of the experiment. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the provisioningStateTransitionTime property: The time at which the experiment entered its current - * provisioning state. - * - * @return the provisioningStateTransitionTime value. - */ - OffsetDateTime provisioningStateTransitionTime(); - - /** - * Gets the inner com.azure.resourcemanager.batchai.fluent.models.ExperimentInner object. - * - * @return the inner object. - */ - ExperimentInner innerModel(); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ExperimentListResult.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ExperimentListResult.java deleted file mode 100644 index 56d3561aea8a..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ExperimentListResult.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.fluent.models.ExperimentInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Values returned by the List operation. */ -@Immutable -public final class ExperimentListResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ExperimentListResult.class); - - /* - * The collection of experiments. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The continuation token. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: The collection of experiments. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The continuation token. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Experiments.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Experiments.java deleted file mode 100644 index 591cf510c483..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Experiments.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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 Experiments. */ -public interface Experiments { - /** - * Gets a list of Experiments within the specified Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments within the specified Workspace. - */ - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); - - /** - * Gets a list of Experiments within the specified Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Experiments within the specified Workspace. - */ - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Integer maxResults, - Context context); - - /** - * Creates an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return experiment information. - */ - Experiment create(String resourceGroupName, String workspaceName, String experimentName); - - /** - * Creates an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return experiment information. - */ - Experiment create(String resourceGroupName, String workspaceName, String experimentName, Context context); - - /** - * Deletes an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String experimentName); - - /** - * Deletes an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String experimentName, Context context); - - /** - * Gets information about an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 an Experiment. - */ - Experiment get(String resourceGroupName, String workspaceName, String experimentName); - - /** - * Gets information about an Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 an Experiment. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String experimentName, - Context context); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/File.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/File.java deleted file mode 100644 index 67e5bfe4c788..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/File.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.resourcemanager.batchai.fluent.models.FileInner; -import java.time.OffsetDateTime; - -/** An immutable client-side representation of File. */ -public interface File { - /** - * Gets the name property: Name of the file. - * - * @return the name value. - */ - String name(); - - /** - * Gets the fileType property: Type of the file. Possible values are file and directory. - * - * @return the fileType value. - */ - FileType fileType(); - - /** - * Gets the downloadUrl property: URL to download the corresponding file. The downloadUrl is not returned for - * directories. - * - * @return the downloadUrl value. - */ - String downloadUrl(); - - /** - * Gets the lastModified property: The time at which the file was last modified. - * - * @return the lastModified value. - */ - OffsetDateTime lastModified(); - - /** - * Gets the contentLength property: The file of the size. - * - * @return the contentLength value. - */ - Long contentLength(); - - /** - * Gets the inner com.azure.resourcemanager.batchai.fluent.models.FileInner object. - * - * @return the inner object. - */ - FileInner innerModel(); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileListResult.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileListResult.java deleted file mode 100644 index 90ce56fbab6a..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileListResult.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.fluent.models.FileInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Values returned by the List operation. */ -@Immutable -public final class FileListResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(FileListResult.class); - - /* - * The collection of returned job directories and files. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The continuation token. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: The collection of returned job directories and files. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The continuation token. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServer.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServer.java deleted file mode 100644 index 232c6e4eadd9..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServer.java +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.batchai.fluent.models.FileServerInner; -import java.time.OffsetDateTime; - -/** An immutable client-side representation of FileServer. */ -public interface FileServer { - /** - * 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 vmSize property: VM size of the File Server. - * - * @return the vmSize value. - */ - String vmSize(); - - /** - * Gets the sshConfiguration property: SSH configuration for accessing the File Server node. - * - * @return the sshConfiguration value. - */ - SshConfiguration sshConfiguration(); - - /** - * Gets the dataDisks property: Information about disks attached to File Server VM. - * - * @return the dataDisks value. - */ - DataDisks dataDisks(); - - /** - * Gets the subnet property: File Server virtual network subnet resource ID. - * - * @return the subnet value. - */ - ResourceId subnet(); - - /** - * Gets the mountSettings property: File Server mount settings. - * - * @return the mountSettings value. - */ - MountSettings mountSettings(); - - /** - * Gets the provisioningStateTransitionTime property: Time when the provisioning state was changed. - * - * @return the provisioningStateTransitionTime value. - */ - OffsetDateTime provisioningStateTransitionTime(); - - /** - * Gets the creationTime property: Time when the FileServer was created. - * - * @return the creationTime value. - */ - OffsetDateTime creationTime(); - - /** - * Gets the provisioningState property: Provisioning state of the File Server. Possible values: creating - The File - * Server is getting created; updating - The File Server creation has been accepted and it is getting updated; - * deleting - The user has requested that the File Server be deleted, and it is in the process of being deleted; - * failed - The File Server creation has failed with the specified error code. Details about the error code are - * specified in the message field; succeeded - The File Server creation has succeeded. - * - * @return the provisioningState value. - */ - FileServerProvisioningState provisioningState(); - - /** - * Gets the inner com.azure.resourcemanager.batchai.fluent.models.FileServerInner object. - * - * @return the inner object. - */ - FileServerInner innerModel(); - - /** The entirety of the FileServer definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** The FileServer definition stages. */ - interface DefinitionStages { - /** The first stage of the FileServer definition. */ - interface Blank extends WithParentResource { - } - - /** The stage of the FileServer definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of - * alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the FileServer 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.WithVmSize, DefinitionStages.WithSshConfiguration, - DefinitionStages.WithDataDisks, DefinitionStages.WithSubnet { - /** - * Executes the create request. - * - * @return the created resource. - */ - FileServer create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - FileServer create(Context context); - } - - /** The stage of the FileServer definition allowing to specify vmSize. */ - interface WithVmSize { - /** - * Specifies the vmSize property: The size of the virtual machine for the File Server. For information about - * available VM sizes from the Virtual Machines Marketplace, see Sizes for Virtual Machines (Linux).. - * - * @param vmSize The size of the virtual machine for the File Server. For information about available VM - * sizes from the Virtual Machines Marketplace, see Sizes for Virtual Machines (Linux). - * @return the next definition stage. - */ - WithCreate withVmSize(String vmSize); - } - - /** The stage of the FileServer definition allowing to specify sshConfiguration. */ - interface WithSshConfiguration { - /** - * Specifies the sshConfiguration property: SSH configuration for the File Server node.. - * - * @param sshConfiguration SSH configuration for the File Server node. - * @return the next definition stage. - */ - WithCreate withSshConfiguration(SshConfiguration sshConfiguration); - } - - /** The stage of the FileServer definition allowing to specify dataDisks. */ - interface WithDataDisks { - /** - * Specifies the dataDisks property: Settings for the data disks which will be created for the File Server.. - * - * @param dataDisks Settings for the data disks which will be created for the File Server. - * @return the next definition stage. - */ - WithCreate withDataDisks(DataDisks dataDisks); - } - - /** The stage of the FileServer definition allowing to specify subnet. */ - interface WithSubnet { - /** - * Specifies the subnet property: Identifier of an existing virtual network subnet to put the File Server - * in. If not provided, a new virtual network and subnet will be created.. - * - * @param subnet Identifier of an existing virtual network subnet to put the File Server in. If not - * provided, a new virtual network and subnet will be created. - * @return the next definition stage. - */ - WithCreate withSubnet(ResourceId subnet); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - FileServer refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - FileServer refresh(Context context); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServerCreateParameters.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServerCreateParameters.java deleted file mode 100644 index 0135dd84ee7b..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServerCreateParameters.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** File Server creation parameters. */ -@JsonFlatten -@Fluent -public class FileServerCreateParameters { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(FileServerCreateParameters.class); - - /* - * The size of the virtual machine for the File Server. For information - * about available VM sizes from the Virtual Machines Marketplace, see - * Sizes for Virtual Machines (Linux). - */ - @JsonProperty(value = "properties.vmSize") - private String vmSize; - - /* - * SSH configuration for the File Server node. - */ - @JsonProperty(value = "properties.sshConfiguration") - private SshConfiguration sshConfiguration; - - /* - * Settings for the data disks which will be created for the File Server. - */ - @JsonProperty(value = "properties.dataDisks") - private DataDisks dataDisks; - - /* - * Identifier of an existing virtual network subnet to put the File Server - * in. If not provided, a new virtual network and subnet will be created. - */ - @JsonProperty(value = "properties.subnet") - private ResourceId subnet; - - /** - * Get the vmSize property: The size of the virtual machine for the File Server. For information about available VM - * sizes from the Virtual Machines Marketplace, see Sizes for Virtual Machines (Linux). - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: The size of the virtual machine for the File Server. For information about available VM - * sizes from the Virtual Machines Marketplace, see Sizes for Virtual Machines (Linux). - * - * @param vmSize the vmSize value to set. - * @return the FileServerCreateParameters object itself. - */ - public FileServerCreateParameters withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the sshConfiguration property: SSH configuration for the File Server node. - * - * @return the sshConfiguration value. - */ - public SshConfiguration sshConfiguration() { - return this.sshConfiguration; - } - - /** - * Set the sshConfiguration property: SSH configuration for the File Server node. - * - * @param sshConfiguration the sshConfiguration value to set. - * @return the FileServerCreateParameters object itself. - */ - public FileServerCreateParameters withSshConfiguration(SshConfiguration sshConfiguration) { - this.sshConfiguration = sshConfiguration; - return this; - } - - /** - * Get the dataDisks property: Settings for the data disks which will be created for the File Server. - * - * @return the dataDisks value. - */ - public DataDisks dataDisks() { - return this.dataDisks; - } - - /** - * Set the dataDisks property: Settings for the data disks which will be created for the File Server. - * - * @param dataDisks the dataDisks value to set. - * @return the FileServerCreateParameters object itself. - */ - public FileServerCreateParameters withDataDisks(DataDisks dataDisks) { - this.dataDisks = dataDisks; - return this; - } - - /** - * Get the subnet property: Identifier of an existing virtual network subnet to put the File Server in. If not - * provided, a new virtual network and subnet will be created. - * - * @return the subnet value. - */ - public ResourceId subnet() { - return this.subnet; - } - - /** - * Set the subnet property: Identifier of an existing virtual network subnet to put the File Server in. If not - * provided, a new virtual network and subnet will be created. - * - * @param subnet the subnet value to set. - * @return the FileServerCreateParameters object itself. - */ - public FileServerCreateParameters withSubnet(ResourceId subnet) { - this.subnet = subnet; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sshConfiguration() != null) { - sshConfiguration().validate(); - } - if (dataDisks() != null) { - dataDisks().validate(); - } - if (subnet() != null) { - subnet().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServerListResult.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServerListResult.java deleted file mode 100644 index 8fc058a7436b..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServerListResult.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.fluent.models.FileServerInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Values returned by the File Server List operation. */ -@Fluent -public final class FileServerListResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(FileServerListResult.class); - - /* - * The collection of File Servers. - */ - @JsonProperty(value = "value") - private List value; - - /* - * The continuation token. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: The collection of File Servers. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The collection of File Servers. - * - * @param value the value value to set. - * @return the FileServerListResult object itself. - */ - public FileServerListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServerProvisioningState.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServerProvisioningState.java deleted file mode 100644 index 397ab1b6745e..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServerProvisioningState.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for FileServerProvisioningState. */ -public final class FileServerProvisioningState extends ExpandableStringEnum { - /** Static value creating for FileServerProvisioningState. */ - public static final FileServerProvisioningState CREATING = fromString("creating"); - - /** Static value updating for FileServerProvisioningState. */ - public static final FileServerProvisioningState UPDATING = fromString("updating"); - - /** Static value deleting for FileServerProvisioningState. */ - public static final FileServerProvisioningState DELETING = fromString("deleting"); - - /** Static value succeeded for FileServerProvisioningState. */ - public static final FileServerProvisioningState SUCCEEDED = fromString("succeeded"); - - /** Static value failed for FileServerProvisioningState. */ - public static final FileServerProvisioningState FAILED = fromString("failed"); - - /** - * Creates or finds a FileServerProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding FileServerProvisioningState. - */ - @JsonCreator - public static FileServerProvisioningState fromString(String name) { - return fromString(name, FileServerProvisioningState.class); - } - - /** @return known FileServerProvisioningState values. */ - public static Collection values() { - return values(FileServerProvisioningState.class); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServerReference.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServerReference.java deleted file mode 100644 index ec8237ad0532..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServerReference.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** File Server mounting configuration. */ -@Fluent -public final class FileServerReference { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(FileServerReference.class); - - /* - * Resource ID of the existing File Server to be mounted. - */ - @JsonProperty(value = "fileServer", required = true) - private ResourceId fileServer; - - /* - * File Server directory that needs to be mounted. If this property is not - * specified, the entire File Server will be mounted. - */ - @JsonProperty(value = "sourceDirectory") - private String sourceDirectory; - - /* - * The relative path on the compute node where the File Server will be - * mounted. Note that all cluster level file servers will be mounted under - * $AZ_BATCHAI_MOUNT_ROOT location and all job level file servers will be - * mounted under $AZ_BATCHAI_JOB_MOUNT_ROOT. - */ - @JsonProperty(value = "relativeMountPath", required = true) - private String relativeMountPath; - - /* - * Mount options to be passed to mount command. - */ - @JsonProperty(value = "mountOptions") - private String mountOptions; - - /** - * Get the fileServer property: Resource ID of the existing File Server to be mounted. - * - * @return the fileServer value. - */ - public ResourceId fileServer() { - return this.fileServer; - } - - /** - * Set the fileServer property: Resource ID of the existing File Server to be mounted. - * - * @param fileServer the fileServer value to set. - * @return the FileServerReference object itself. - */ - public FileServerReference withFileServer(ResourceId fileServer) { - this.fileServer = fileServer; - return this; - } - - /** - * Get the sourceDirectory property: File Server directory that needs to be mounted. If this property is not - * specified, the entire File Server will be mounted. - * - * @return the sourceDirectory value. - */ - public String sourceDirectory() { - return this.sourceDirectory; - } - - /** - * Set the sourceDirectory property: File Server directory that needs to be mounted. If this property is not - * specified, the entire File Server will be mounted. - * - * @param sourceDirectory the sourceDirectory value to set. - * @return the FileServerReference object itself. - */ - public FileServerReference withSourceDirectory(String sourceDirectory) { - this.sourceDirectory = sourceDirectory; - return this; - } - - /** - * Get the relativeMountPath property: The relative path on the compute node where the File Server will be mounted. - * Note that all cluster level file servers will be mounted under $AZ_BATCHAI_MOUNT_ROOT location and all job level - * file servers will be mounted under $AZ_BATCHAI_JOB_MOUNT_ROOT. - * - * @return the relativeMountPath value. - */ - public String relativeMountPath() { - return this.relativeMountPath; - } - - /** - * Set the relativeMountPath property: The relative path on the compute node where the File Server will be mounted. - * Note that all cluster level file servers will be mounted under $AZ_BATCHAI_MOUNT_ROOT location and all job level - * file servers will be mounted under $AZ_BATCHAI_JOB_MOUNT_ROOT. - * - * @param relativeMountPath the relativeMountPath value to set. - * @return the FileServerReference object itself. - */ - public FileServerReference withRelativeMountPath(String relativeMountPath) { - this.relativeMountPath = relativeMountPath; - return this; - } - - /** - * Get the mountOptions property: Mount options to be passed to mount command. - * - * @return the mountOptions value. - */ - public String mountOptions() { - return this.mountOptions; - } - - /** - * Set the mountOptions property: Mount options to be passed to mount command. - * - * @param mountOptions the mountOptions value to set. - * @return the FileServerReference object itself. - */ - public FileServerReference withMountOptions(String mountOptions) { - this.mountOptions = mountOptions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (fileServer() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property fileServer in model FileServerReference")); - } else { - fileServer().validate(); - } - if (relativeMountPath() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property relativeMountPath in model FileServerReference")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServers.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServers.java deleted file mode 100644 index 13f18cfe4b30..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileServers.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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 FileServers. */ -public interface FileServers { - /** - * Deletes a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String fileServerName); - - /** - * Deletes a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String fileServerName, Context context); - - /** - * Gets information about a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a File Server. - */ - FileServer get(String resourceGroupName, String workspaceName, String fileServerName); - - /** - * Gets information about a File Server. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param fileServerName The name of the file server within the specified resource group. File server names can only - * contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be - * from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a File Server. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String fileServerName, - Context context); - - /** - * Gets a list of File Servers associated with the specified workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of File Servers associated with the specified workspace. - */ - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); - - /** - * Gets a list of File Servers associated with the specified workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of File Servers associated with the specified workspace. - */ - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Integer maxResults, - Context context); - - /** - * Gets information about a File Server. - * - * @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 information about a File Server. - */ - FileServer getById(String id); - - /** - * Gets information about a File Server. - * - * @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 information about a File Server. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a File Server. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a File Server. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new FileServer resource. - * - * @param name resource name. - * @return the first stage of the new FileServer definition. - */ - FileServer.DefinitionStages.Blank define(String name); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileType.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileType.java deleted file mode 100644 index af49c33418e4..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/FileType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for FileType. */ -public final class FileType extends ExpandableStringEnum { - /** Static value file for FileType. */ - public static final FileType FILE = fromString("file"); - - /** Static value directory for FileType. */ - public static final FileType DIRECTORY = fromString("directory"); - - /** - * Creates or finds a FileType from its string representation. - * - * @param name a name to look for. - * @return the corresponding FileType. - */ - @JsonCreator - public static FileType fromString(String name) { - return fromString(name, FileType.class); - } - - /** @return known FileType values. */ - public static Collection values() { - return values(FileType.class); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/HorovodSettings.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/HorovodSettings.java deleted file mode 100644 index a9692f2a4012..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/HorovodSettings.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Specifies the settings for Horovod job. */ -@Fluent -public final class HorovodSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(HorovodSettings.class); - - /* - * The python script to execute. - */ - @JsonProperty(value = "pythonScriptFilePath", required = true) - private String pythonScriptFilePath; - - /* - * The path to the Python interpreter. - */ - @JsonProperty(value = "pythonInterpreterPath") - private String pythonInterpreterPath; - - /* - * Command line arguments that need to be passed to the python script. - */ - @JsonProperty(value = "commandLineArgs") - private String commandLineArgs; - - /* - * Number of processes to launch for the job execution. The default value - * for this property is equal to nodeCount property - */ - @JsonProperty(value = "processCount") - private Integer processCount; - - /** - * Get the pythonScriptFilePath property: The python script to execute. - * - * @return the pythonScriptFilePath value. - */ - public String pythonScriptFilePath() { - return this.pythonScriptFilePath; - } - - /** - * Set the pythonScriptFilePath property: The python script to execute. - * - * @param pythonScriptFilePath the pythonScriptFilePath value to set. - * @return the HorovodSettings object itself. - */ - public HorovodSettings withPythonScriptFilePath(String pythonScriptFilePath) { - this.pythonScriptFilePath = pythonScriptFilePath; - return this; - } - - /** - * Get the pythonInterpreterPath property: The path to the Python interpreter. - * - * @return the pythonInterpreterPath value. - */ - public String pythonInterpreterPath() { - return this.pythonInterpreterPath; - } - - /** - * Set the pythonInterpreterPath property: The path to the Python interpreter. - * - * @param pythonInterpreterPath the pythonInterpreterPath value to set. - * @return the HorovodSettings object itself. - */ - public HorovodSettings withPythonInterpreterPath(String pythonInterpreterPath) { - this.pythonInterpreterPath = pythonInterpreterPath; - return this; - } - - /** - * Get the commandLineArgs property: Command line arguments that need to be passed to the python script. - * - * @return the commandLineArgs value. - */ - public String commandLineArgs() { - return this.commandLineArgs; - } - - /** - * Set the commandLineArgs property: Command line arguments that need to be passed to the python script. - * - * @param commandLineArgs the commandLineArgs value to set. - * @return the HorovodSettings object itself. - */ - public HorovodSettings withCommandLineArgs(String commandLineArgs) { - this.commandLineArgs = commandLineArgs; - return this; - } - - /** - * Get the processCount property: Number of processes to launch for the job execution. The default value for this - * property is equal to nodeCount property. - * - * @return the processCount value. - */ - public Integer processCount() { - return this.processCount; - } - - /** - * Set the processCount property: Number of processes to launch for the job execution. The default value for this - * property is equal to nodeCount property. - * - * @param processCount the processCount value to set. - * @return the HorovodSettings object itself. - */ - public HorovodSettings withProcessCount(Integer processCount) { - this.processCount = processCount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (pythonScriptFilePath() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property pythonScriptFilePath in model HorovodSettings")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ImageReference.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ImageReference.java deleted file mode 100644 index ffdd5f5d1e14..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ImageReference.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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 OS image reference. */ -@Fluent -public final class ImageReference { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ImageReference.class); - - /* - * Publisher of the image. - */ - @JsonProperty(value = "publisher", required = true) - private String publisher; - - /* - * Offer of the image. - */ - @JsonProperty(value = "offer", required = true) - private String offer; - - /* - * SKU of the image. - */ - @JsonProperty(value = "sku", required = true) - private String sku; - - /* - * Version of the image. - */ - @JsonProperty(value = "version") - private String version; - - /* - * The ARM resource identifier of the virtual machine image for the compute - * nodes. This is of the form - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}. - * The virtual machine image must be in the same region and subscription as - * the cluster. For information about the firewall settings for the Batch - * node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * Note, you need to provide publisher, offer and sku of the base OS image - * of which the custom image has been derived from. - */ - @JsonProperty(value = "virtualMachineImageId") - private String virtualMachineImageId; - - /** - * Get the publisher property: Publisher of the image. - * - * @return the publisher value. - */ - public String publisher() { - return this.publisher; - } - - /** - * Set the publisher property: Publisher of the image. - * - * @param publisher the publisher value to set. - * @return the ImageReference object itself. - */ - public ImageReference withPublisher(String publisher) { - this.publisher = publisher; - return this; - } - - /** - * Get the offer property: Offer of the image. - * - * @return the offer value. - */ - public String offer() { - return this.offer; - } - - /** - * Set the offer property: Offer of the image. - * - * @param offer the offer value to set. - * @return the ImageReference object itself. - */ - public ImageReference withOffer(String offer) { - this.offer = offer; - return this; - } - - /** - * Get the sku property: SKU of the image. - * - * @return the sku value. - */ - public String sku() { - return this.sku; - } - - /** - * Set the sku property: SKU of the image. - * - * @param sku the sku value to set. - * @return the ImageReference object itself. - */ - public ImageReference withSku(String sku) { - this.sku = sku; - return this; - } - - /** - * Get the version property: Version of the image. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Version of the image. - * - * @param version the version value to set. - * @return the ImageReference object itself. - */ - public ImageReference withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the virtualMachineImageId property: The ARM resource identifier of the virtual machine image for the compute - * nodes. This is of the form - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}. - * The virtual machine image must be in the same region and subscription as the cluster. For information about the - * firewall settings for the Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * Note, you need to provide publisher, offer and sku of the base OS image of which the custom image has been - * derived from. - * - * @return the virtualMachineImageId value. - */ - public String virtualMachineImageId() { - return this.virtualMachineImageId; - } - - /** - * Set the virtualMachineImageId property: The ARM resource identifier of the virtual machine image for the compute - * nodes. This is of the form - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}. - * The virtual machine image must be in the same region and subscription as the cluster. For information about the - * firewall settings for the Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. - * Note, you need to provide publisher, offer and sku of the base OS image of which the custom image has been - * derived from. - * - * @param virtualMachineImageId the virtualMachineImageId value to set. - * @return the ImageReference object itself. - */ - public ImageReference withVirtualMachineImageId(String virtualMachineImageId) { - this.virtualMachineImageId = virtualMachineImageId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (publisher() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property publisher in model ImageReference")); - } - if (offer() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property offer in model ImageReference")); - } - if (sku() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property sku in model ImageReference")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ImageSourceRegistry.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ImageSourceRegistry.java deleted file mode 100644 index 814daab30922..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ImageSourceRegistry.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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 docker image for the job. */ -@Fluent -public final class ImageSourceRegistry { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ImageSourceRegistry.class); - - /* - * URL for image repository. - */ - @JsonProperty(value = "serverUrl") - private String serverUrl; - - /* - * The name of the image in the image repository. - */ - @JsonProperty(value = "image", required = true) - private String image; - - /* - * Credentials to access the private docker repository. - */ - @JsonProperty(value = "credentials") - private PrivateRegistryCredentials credentials; - - /** - * Get the serverUrl property: URL for image repository. - * - * @return the serverUrl value. - */ - public String serverUrl() { - return this.serverUrl; - } - - /** - * Set the serverUrl property: URL for image repository. - * - * @param serverUrl the serverUrl value to set. - * @return the ImageSourceRegistry object itself. - */ - public ImageSourceRegistry withServerUrl(String serverUrl) { - this.serverUrl = serverUrl; - return this; - } - - /** - * Get the image property: The name of the image in the image repository. - * - * @return the image value. - */ - public String image() { - return this.image; - } - - /** - * Set the image property: The name of the image in the image repository. - * - * @param image the image value to set. - * @return the ImageSourceRegistry object itself. - */ - public ImageSourceRegistry withImage(String image) { - this.image = image; - return this; - } - - /** - * Get the credentials property: Credentials to access the private docker repository. - * - * @return the credentials value. - */ - public PrivateRegistryCredentials credentials() { - return this.credentials; - } - - /** - * Set the credentials property: Credentials to access the private docker repository. - * - * @param credentials the credentials value to set. - * @return the ImageSourceRegistry object itself. - */ - public ImageSourceRegistry withCredentials(PrivateRegistryCredentials credentials) { - this.credentials = credentials; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (image() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property image in model ImageSourceRegistry")); - } - if (credentials() != null) { - credentials().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/InputDirectory.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/InputDirectory.java deleted file mode 100644 index 2de0522b7348..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/InputDirectory.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Input directory for the job. */ -@Fluent -public final class InputDirectory { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(InputDirectory.class); - - /* - * The ID for the input directory. The job can use AZ_BATCHAI_INPUT_ - * environment variable to find the directory path, where is the value - * of id attribute. - */ - @JsonProperty(value = "id", required = true) - private String id; - - /* - * The path to the input directory. - */ - @JsonProperty(value = "path", required = true) - private String path; - - /** - * Get the id property: The ID for the input directory. The job can use AZ_BATCHAI_INPUT_<id> environment - * variable to find the directory path, where <id> is the value of id attribute. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The ID for the input directory. The job can use AZ_BATCHAI_INPUT_<id> environment - * variable to find the directory path, where <id> is the value of id attribute. - * - * @param id the id value to set. - * @return the InputDirectory object itself. - */ - public InputDirectory withId(String id) { - this.id = id; - return this; - } - - /** - * Get the path property: The path to the input directory. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: The path to the input directory. - * - * @param path the path value to set. - * @return the InputDirectory object itself. - */ - public InputDirectory withPath(String path) { - this.path = path; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property id in model InputDirectory")); - } - if (path() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property path in model InputDirectory")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Job.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Job.java deleted file mode 100644 index 94606500d874..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Job.java +++ /dev/null @@ -1,625 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batchai.fluent.models.JobInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of Job. */ -public interface Job { - /** - * 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 schedulingPriority property: Scheduling priority associated with the job. - * - * @return the schedulingPriority value. - */ - JobPriority schedulingPriority(); - - /** - * Gets the cluster property: Resource ID of the cluster associated with the job. - * - * @return the cluster value. - */ - ResourceId cluster(); - - /** - * Gets the mountVolumes property: Collection of mount volumes available to the job during execution. These volumes - * are mounted before the job execution and unmounted after the job completion. The volumes are mounted at location - * specified by $AZ_BATCHAI_JOB_MOUNT_ROOT environment variable. - * - * @return the mountVolumes value. - */ - MountVolumes mountVolumes(); - - /** - * Gets the nodeCount property: The job will be gang scheduled on that many compute nodes. - * - * @return the nodeCount value. - */ - Integer nodeCount(); - - /** - * Gets the containerSettings property: If the container was downloaded as part of cluster setup then the same - * container image will be used. If not provided, the job will run on the VM. - * - * @return the containerSettings value. - */ - ContainerSettings containerSettings(); - - /** - * Gets the toolType property: Possible values are: cntk, tensorflow, caffe, caffe2, chainer, pytorch, custom, - * custommpi, horovod. - * - * @return the toolType value. - */ - ToolType toolType(); - - /** - * Gets the cntkSettings property: CNTK (aka Microsoft Cognitive Toolkit) job settings. - * - * @return the cntkSettings value. - */ - CntKsettings cntkSettings(); - - /** - * Gets the pyTorchSettings property: pyTorch job settings. - * - * @return the pyTorchSettings value. - */ - PyTorchSettings pyTorchSettings(); - - /** - * Gets the tensorFlowSettings property: TensorFlow job settings. - * - * @return the tensorFlowSettings value. - */ - TensorFlowSettings tensorFlowSettings(); - - /** - * Gets the caffeSettings property: Caffe job settings. - * - * @return the caffeSettings value. - */ - CaffeSettings caffeSettings(); - - /** - * Gets the caffe2Settings property: Caffe2 job settings. - * - * @return the caffe2Settings value. - */ - Caffe2Settings caffe2Settings(); - - /** - * Gets the chainerSettings property: Chainer job settings. - * - * @return the chainerSettings value. - */ - ChainerSettings chainerSettings(); - - /** - * Gets the customToolkitSettings property: Custom tool kit job settings. - * - * @return the customToolkitSettings value. - */ - CustomToolkitSettings customToolkitSettings(); - - /** - * Gets the customMpiSettings property: Custom MPI job settings. - * - * @return the customMpiSettings value. - */ - CustomMpiSettings customMpiSettings(); - - /** - * Gets the horovodSettings property: Specifies the settings for Horovod job. - * - * @return the horovodSettings value. - */ - HorovodSettings horovodSettings(); - - /** - * Gets the jobPreparation property: The specified actions will run on all the nodes that are part of the job. - * - * @return the jobPreparation value. - */ - JobPreparation jobPreparation(); - - /** - * Gets the jobOutputDirectoryPathSegment property: A segment of job's output directories path created by Batch AI. - * Batch AI creates job's output directories under an unique path to avoid conflicts between jobs. This value - * contains a path segment generated by Batch AI to make the path unique and can be used to find the output - * directory on the node or mounted filesystem. - * - * @return the jobOutputDirectoryPathSegment value. - */ - String jobOutputDirectoryPathSegment(); - - /** - * Gets the stdOutErrPathPrefix property: The path where the Batch AI service stores stdout, stderror and execution - * log of the job. - * - * @return the stdOutErrPathPrefix value. - */ - String stdOutErrPathPrefix(); - - /** - * Gets the inputDirectories property: A list of input directories for the job. - * - * @return the inputDirectories value. - */ - List inputDirectories(); - - /** - * Gets the outputDirectories property: A list of output directories for the job. - * - * @return the outputDirectories value. - */ - List outputDirectories(); - - /** - * Gets the environmentVariables property: A collection of user defined environment variables to be setup for the - * job. - * - * @return the environmentVariables value. - */ - List environmentVariables(); - - /** - * Gets the secrets property: A collection of user defined environment variables with secret values to be setup for - * the job. Server will never report values of these variables back. - * - * @return the secrets value. - */ - List secrets(); - - /** - * Gets the constraints property: Constraints associated with the Job. - * - * @return the constraints value. - */ - JobPropertiesConstraints constraints(); - - /** - * Gets the creationTime property: The creation time of the job. - * - * @return the creationTime value. - */ - OffsetDateTime creationTime(); - - /** - * Gets the provisioningState property: The provisioned state of the Batch AI job. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the provisioningStateTransitionTime property: The time at which the job entered its current provisioning - * state. - * - * @return the provisioningStateTransitionTime value. - */ - OffsetDateTime provisioningStateTransitionTime(); - - /** - * Gets the executionState property: The current state of the job. Possible values are: queued - The job is queued - * and able to run. A job enters this state when it is created, or when it is awaiting a retry after a failed run. - * running - The job is running on a compute cluster. This includes job-level preparation such as downloading - * resource files or set up container specified on the job - it does not necessarily mean that the job command line - * has started executing. terminating - The job is terminated by the user, the terminate operation is in progress. - * succeeded - The job has completed running successfully and exited with exit code 0. failed - The job has finished - * unsuccessfully (failed with a non-zero exit code) and has exhausted its retry limit. A job is also marked as - * failed if an error occurred launching the job. - * - * @return the executionState value. - */ - ExecutionState executionState(); - - /** - * Gets the executionStateTransitionTime property: The time at which the job entered its current execution state. - * - * @return the executionStateTransitionTime value. - */ - OffsetDateTime executionStateTransitionTime(); - - /** - * Gets the executionInfo property: Information about the execution of a job. - * - * @return the executionInfo value. - */ - JobPropertiesExecutionInfo executionInfo(); - - /** - * Gets the inner com.azure.resourcemanager.batchai.fluent.models.JobInner object. - * - * @return the inner object. - */ - JobInner innerModel(); - - /** The entirety of the Job definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** The Job definition stages. */ - interface DefinitionStages { - /** The first stage of the Job definition. */ - interface Blank extends WithParentResource { - } - - /** The stage of the Job definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, experimentName. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of - * alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of - * alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @return the next definition stage. - */ - WithCreate withExistingExperiment(String resourceGroupName, String workspaceName, String experimentName); - } - - /** - * The stage of the Job 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.WithSchedulingPriority, DefinitionStages.WithCluster, - DefinitionStages.WithMountVolumes, DefinitionStages.WithNodeCount, DefinitionStages.WithContainerSettings, - DefinitionStages.WithCntkSettings, DefinitionStages.WithPyTorchSettings, - DefinitionStages.WithTensorFlowSettings, DefinitionStages.WithCaffeSettings, - DefinitionStages.WithCaffe2Settings, DefinitionStages.WithChainerSettings, - DefinitionStages.WithCustomToolkitSettings, DefinitionStages.WithCustomMpiSettings, - DefinitionStages.WithHorovodSettings, DefinitionStages.WithJobPreparation, - DefinitionStages.WithStdOutErrPathPrefix, DefinitionStages.WithInputDirectories, - DefinitionStages.WithOutputDirectories, DefinitionStages.WithEnvironmentVariables, - DefinitionStages.WithSecrets, DefinitionStages.WithConstraints { - /** - * Executes the create request. - * - * @return the created resource. - */ - Job create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Job create(Context context); - } - - /** The stage of the Job definition allowing to specify schedulingPriority. */ - interface WithSchedulingPriority { - /** - * Specifies the schedulingPriority property: Scheduling priority associated with the job. Possible values: - * low, normal, high.. - * - * @param schedulingPriority Scheduling priority associated with the job. Possible values: low, normal, - * high. - * @return the next definition stage. - */ - WithCreate withSchedulingPriority(JobPriority schedulingPriority); - } - - /** The stage of the Job definition allowing to specify cluster. */ - interface WithCluster { - /** - * Specifies the cluster property: Resource ID of the cluster on which this job will run.. - * - * @param cluster Resource ID of the cluster on which this job will run. - * @return the next definition stage. - */ - WithCreate withCluster(ResourceId cluster); - } - - /** The stage of the Job definition allowing to specify mountVolumes. */ - interface WithMountVolumes { - /** - * Specifies the mountVolumes property: Information on mount volumes to be used by the job. These volumes - * will be mounted before the job execution and will be unmounted after the job completion. The volumes will - * be mounted at location specified by $AZ_BATCHAI_JOB_MOUNT_ROOT environment variable.. - * - * @param mountVolumes Information on mount volumes to be used by the job. These volumes will be mounted - * before the job execution and will be unmounted after the job completion. The volumes will be mounted - * at location specified by $AZ_BATCHAI_JOB_MOUNT_ROOT environment variable. - * @return the next definition stage. - */ - WithCreate withMountVolumes(MountVolumes mountVolumes); - } - - /** The stage of the Job definition allowing to specify nodeCount. */ - interface WithNodeCount { - /** - * Specifies the nodeCount property: Number of compute nodes to run the job on. The job will be gang - * scheduled on that many compute nodes.. - * - * @param nodeCount Number of compute nodes to run the job on. The job will be gang scheduled on that many - * compute nodes. - * @return the next definition stage. - */ - WithCreate withNodeCount(Integer nodeCount); - } - - /** The stage of the Job definition allowing to specify containerSettings. */ - interface WithContainerSettings { - /** - * Specifies the containerSettings property: Docker container settings for the job. If not provided, the job - * will run directly on the node.. - * - * @param containerSettings Docker container settings for the job. If not provided, the job will run - * directly on the node. - * @return the next definition stage. - */ - WithCreate withContainerSettings(ContainerSettings containerSettings); - } - - /** The stage of the Job definition allowing to specify cntkSettings. */ - interface WithCntkSettings { - /** - * Specifies the cntkSettings property: Settings for CNTK (aka Microsoft Cognitive Toolkit) job.. - * - * @param cntkSettings Settings for CNTK (aka Microsoft Cognitive Toolkit) job. - * @return the next definition stage. - */ - WithCreate withCntkSettings(CntKsettings cntkSettings); - } - - /** The stage of the Job definition allowing to specify pyTorchSettings. */ - interface WithPyTorchSettings { - /** - * Specifies the pyTorchSettings property: Settings for pyTorch job.. - * - * @param pyTorchSettings Settings for pyTorch job. - * @return the next definition stage. - */ - WithCreate withPyTorchSettings(PyTorchSettings pyTorchSettings); - } - - /** The stage of the Job definition allowing to specify tensorFlowSettings. */ - interface WithTensorFlowSettings { - /** - * Specifies the tensorFlowSettings property: Settings for Tensor Flow job.. - * - * @param tensorFlowSettings Settings for Tensor Flow job. - * @return the next definition stage. - */ - WithCreate withTensorFlowSettings(TensorFlowSettings tensorFlowSettings); - } - - /** The stage of the Job definition allowing to specify caffeSettings. */ - interface WithCaffeSettings { - /** - * Specifies the caffeSettings property: Settings for Caffe job.. - * - * @param caffeSettings Settings for Caffe job. - * @return the next definition stage. - */ - WithCreate withCaffeSettings(CaffeSettings caffeSettings); - } - - /** The stage of the Job definition allowing to specify caffe2Settings. */ - interface WithCaffe2Settings { - /** - * Specifies the caffe2Settings property: Settings for Caffe2 job.. - * - * @param caffe2Settings Settings for Caffe2 job. - * @return the next definition stage. - */ - WithCreate withCaffe2Settings(Caffe2Settings caffe2Settings); - } - - /** The stage of the Job definition allowing to specify chainerSettings. */ - interface WithChainerSettings { - /** - * Specifies the chainerSettings property: Settings for Chainer job.. - * - * @param chainerSettings Settings for Chainer job. - * @return the next definition stage. - */ - WithCreate withChainerSettings(ChainerSettings chainerSettings); - } - - /** The stage of the Job definition allowing to specify customToolkitSettings. */ - interface WithCustomToolkitSettings { - /** - * Specifies the customToolkitSettings property: Settings for custom tool kit job.. - * - * @param customToolkitSettings Settings for custom tool kit job. - * @return the next definition stage. - */ - WithCreate withCustomToolkitSettings(CustomToolkitSettings customToolkitSettings); - } - - /** The stage of the Job definition allowing to specify customMpiSettings. */ - interface WithCustomMpiSettings { - /** - * Specifies the customMpiSettings property: Settings for custom MPI job.. - * - * @param customMpiSettings Settings for custom MPI job. - * @return the next definition stage. - */ - WithCreate withCustomMpiSettings(CustomMpiSettings customMpiSettings); - } - - /** The stage of the Job definition allowing to specify horovodSettings. */ - interface WithHorovodSettings { - /** - * Specifies the horovodSettings property: Settings for Horovod job.. - * - * @param horovodSettings Settings for Horovod job. - * @return the next definition stage. - */ - WithCreate withHorovodSettings(HorovodSettings horovodSettings); - } - - /** The stage of the Job definition allowing to specify jobPreparation. */ - interface WithJobPreparation { - /** - * Specifies the jobPreparation property: A command line to be executed on each node allocated for the job - * before tool kit is launched.. - * - * @param jobPreparation A command line to be executed on each node allocated for the job before tool kit is - * launched. - * @return the next definition stage. - */ - WithCreate withJobPreparation(JobPreparation jobPreparation); - } - - /** The stage of the Job definition allowing to specify stdOutErrPathPrefix. */ - interface WithStdOutErrPathPrefix { - /** - * Specifies the stdOutErrPathPrefix property: The path where the Batch AI service will store stdout, - * stderror and execution log of the job.. - * - * @param stdOutErrPathPrefix The path where the Batch AI service will store stdout, stderror and execution - * log of the job. - * @return the next definition stage. - */ - WithCreate withStdOutErrPathPrefix(String stdOutErrPathPrefix); - } - - /** The stage of the Job definition allowing to specify inputDirectories. */ - interface WithInputDirectories { - /** - * Specifies the inputDirectories property: A list of input directories for the job.. - * - * @param inputDirectories A list of input directories for the job. - * @return the next definition stage. - */ - WithCreate withInputDirectories(List inputDirectories); - } - - /** The stage of the Job definition allowing to specify outputDirectories. */ - interface WithOutputDirectories { - /** - * Specifies the outputDirectories property: A list of output directories for the job.. - * - * @param outputDirectories A list of output directories for the job. - * @return the next definition stage. - */ - WithCreate withOutputDirectories(List outputDirectories); - } - - /** The stage of the Job definition allowing to specify environmentVariables. */ - interface WithEnvironmentVariables { - /** - * Specifies the environmentVariables property: A list of user defined environment variables which will be - * setup for the job.. - * - * @param environmentVariables A list of user defined environment variables which will be setup for the job. - * @return the next definition stage. - */ - WithCreate withEnvironmentVariables(List environmentVariables); - } - - /** The stage of the Job definition allowing to specify secrets. */ - interface WithSecrets { - /** - * Specifies the secrets property: A list of user defined environment variables with secret values which - * will be setup for the job. Server will never report values of these variables back.. - * - * @param secrets A list of user defined environment variables with secret values which will be setup for - * the job. Server will never report values of these variables back. - * @return the next definition stage. - */ - WithCreate withSecrets(List secrets); - } - - /** The stage of the Job definition allowing to specify constraints. */ - interface WithConstraints { - /** - * Specifies the constraints property: Constraints associated with the Job.. - * - * @param constraints Constraints associated with the Job. - * @return the next definition stage. - */ - WithCreate withConstraints(JobBasePropertiesConstraints constraints); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Job refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Job refresh(Context context); - - /** - * Gets a list of currently existing nodes which were used for the Job execution. The returned information contains - * the node ID, its public IP and SSH port. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of currently existing nodes which were used for the Job execution. - */ - PagedIterable listRemoteLoginInformation(); - - /** - * Gets a list of currently existing nodes which were used for the Job execution. The returned information contains - * the node ID, its public IP and SSH port. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of currently existing nodes which were used for the Job execution. - */ - PagedIterable listRemoteLoginInformation(Context context); - - /** - * Terminates a job. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void terminate(); - - /** - * Terminates a job. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void terminate(Context context); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobBasePropertiesConstraints.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobBasePropertiesConstraints.java deleted file mode 100644 index 3d23cee7a2a6..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobBasePropertiesConstraints.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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.time.Duration; - -/** Constraints associated with the Job. */ -@Fluent -public final class JobBasePropertiesConstraints { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(JobBasePropertiesConstraints.class); - - /* - * Max time the job can run. Default value: 1 week. - */ - @JsonProperty(value = "maxWallClockTime") - private Duration maxWallClockTime; - - /** - * Get the maxWallClockTime property: Max time the job can run. Default value: 1 week. - * - * @return the maxWallClockTime value. - */ - public Duration maxWallClockTime() { - return this.maxWallClockTime; - } - - /** - * Set the maxWallClockTime property: Max time the job can run. Default value: 1 week. - * - * @param maxWallClockTime the maxWallClockTime value to set. - * @return the JobBasePropertiesConstraints object itself. - */ - public JobBasePropertiesConstraints withMaxWallClockTime(Duration maxWallClockTime) { - this.maxWallClockTime = maxWallClockTime; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobCreateParameters.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobCreateParameters.java deleted file mode 100644 index 46b811aac11d..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobCreateParameters.java +++ /dev/null @@ -1,657 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Job creation parameters. */ -@JsonFlatten -@Fluent -public class JobCreateParameters { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(JobCreateParameters.class); - - /* - * Scheduling priority associated with the job. Possible values: low, - * normal, high. - */ - @JsonProperty(value = "properties.schedulingPriority") - private JobPriority schedulingPriority; - - /* - * Resource ID of the cluster on which this job will run. - */ - @JsonProperty(value = "properties.cluster") - private ResourceId cluster; - - /* - * Information on mount volumes to be used by the job. These volumes will - * be mounted before the job execution and will be unmounted after the job - * completion. The volumes will be mounted at location specified by - * $AZ_BATCHAI_JOB_MOUNT_ROOT environment variable. - */ - @JsonProperty(value = "properties.mountVolumes") - private MountVolumes mountVolumes; - - /* - * Number of compute nodes to run the job on. The job will be gang - * scheduled on that many compute nodes. - */ - @JsonProperty(value = "properties.nodeCount") - private Integer nodeCount; - - /* - * Docker container settings for the job. If not provided, the job will run - * directly on the node. - */ - @JsonProperty(value = "properties.containerSettings") - private ContainerSettings containerSettings; - - /* - * Settings for CNTK (aka Microsoft Cognitive Toolkit) job. - */ - @JsonProperty(value = "properties.cntkSettings") - private CntKsettings cntkSettings; - - /* - * Settings for pyTorch job. - */ - @JsonProperty(value = "properties.pyTorchSettings") - private PyTorchSettings pyTorchSettings; - - /* - * Settings for Tensor Flow job. - */ - @JsonProperty(value = "properties.tensorFlowSettings") - private TensorFlowSettings tensorFlowSettings; - - /* - * Settings for Caffe job. - */ - @JsonProperty(value = "properties.caffeSettings") - private CaffeSettings caffeSettings; - - /* - * Settings for Caffe2 job. - */ - @JsonProperty(value = "properties.caffe2Settings") - private Caffe2Settings caffe2Settings; - - /* - * Settings for Chainer job. - */ - @JsonProperty(value = "properties.chainerSettings") - private ChainerSettings chainerSettings; - - /* - * Settings for custom tool kit job. - */ - @JsonProperty(value = "properties.customToolkitSettings") - private CustomToolkitSettings customToolkitSettings; - - /* - * Settings for custom MPI job. - */ - @JsonProperty(value = "properties.customMpiSettings") - private CustomMpiSettings customMpiSettings; - - /* - * Settings for Horovod job. - */ - @JsonProperty(value = "properties.horovodSettings") - private HorovodSettings horovodSettings; - - /* - * A command line to be executed on each node allocated for the job before - * tool kit is launched. - */ - @JsonProperty(value = "properties.jobPreparation") - private JobPreparation jobPreparation; - - /* - * The path where the Batch AI service will store stdout, stderror and - * execution log of the job. - */ - @JsonProperty(value = "properties.stdOutErrPathPrefix") - private String stdOutErrPathPrefix; - - /* - * A list of input directories for the job. - */ - @JsonProperty(value = "properties.inputDirectories") - private List inputDirectories; - - /* - * A list of output directories for the job. - */ - @JsonProperty(value = "properties.outputDirectories") - private List outputDirectories; - - /* - * A list of user defined environment variables which will be setup for the - * job. - */ - @JsonProperty(value = "properties.environmentVariables") - private List environmentVariables; - - /* - * A list of user defined environment variables with secret values which - * will be setup for the job. Server will never report values of these - * variables back. - */ - @JsonProperty(value = "properties.secrets") - private List secrets; - - /* - * Constraints associated with the Job. - */ - @JsonProperty(value = "properties.constraints") - private JobBasePropertiesConstraints constraints; - - /** - * Get the schedulingPriority property: Scheduling priority associated with the job. Possible values: low, normal, - * high. - * - * @return the schedulingPriority value. - */ - public JobPriority schedulingPriority() { - return this.schedulingPriority; - } - - /** - * Set the schedulingPriority property: Scheduling priority associated with the job. Possible values: low, normal, - * high. - * - * @param schedulingPriority the schedulingPriority value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withSchedulingPriority(JobPriority schedulingPriority) { - this.schedulingPriority = schedulingPriority; - return this; - } - - /** - * Get the cluster property: Resource ID of the cluster on which this job will run. - * - * @return the cluster value. - */ - public ResourceId cluster() { - return this.cluster; - } - - /** - * Set the cluster property: Resource ID of the cluster on which this job will run. - * - * @param cluster the cluster value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withCluster(ResourceId cluster) { - this.cluster = cluster; - return this; - } - - /** - * Get the mountVolumes property: Information on mount volumes to be used by the job. These volumes will be mounted - * before the job execution and will be unmounted after the job completion. The volumes will be mounted at location - * specified by $AZ_BATCHAI_JOB_MOUNT_ROOT environment variable. - * - * @return the mountVolumes value. - */ - public MountVolumes mountVolumes() { - return this.mountVolumes; - } - - /** - * Set the mountVolumes property: Information on mount volumes to be used by the job. These volumes will be mounted - * before the job execution and will be unmounted after the job completion. The volumes will be mounted at location - * specified by $AZ_BATCHAI_JOB_MOUNT_ROOT environment variable. - * - * @param mountVolumes the mountVolumes value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withMountVolumes(MountVolumes mountVolumes) { - this.mountVolumes = mountVolumes; - return this; - } - - /** - * Get the nodeCount property: Number of compute nodes to run the job on. The job will be gang scheduled on that - * many compute nodes. - * - * @return the nodeCount value. - */ - public Integer nodeCount() { - return this.nodeCount; - } - - /** - * Set the nodeCount property: Number of compute nodes to run the job on. The job will be gang scheduled on that - * many compute nodes. - * - * @param nodeCount the nodeCount value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withNodeCount(Integer nodeCount) { - this.nodeCount = nodeCount; - return this; - } - - /** - * Get the containerSettings property: Docker container settings for the job. If not provided, the job will run - * directly on the node. - * - * @return the containerSettings value. - */ - public ContainerSettings containerSettings() { - return this.containerSettings; - } - - /** - * Set the containerSettings property: Docker container settings for the job. If not provided, the job will run - * directly on the node. - * - * @param containerSettings the containerSettings value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withContainerSettings(ContainerSettings containerSettings) { - this.containerSettings = containerSettings; - return this; - } - - /** - * Get the cntkSettings property: Settings for CNTK (aka Microsoft Cognitive Toolkit) job. - * - * @return the cntkSettings value. - */ - public CntKsettings cntkSettings() { - return this.cntkSettings; - } - - /** - * Set the cntkSettings property: Settings for CNTK (aka Microsoft Cognitive Toolkit) job. - * - * @param cntkSettings the cntkSettings value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withCntkSettings(CntKsettings cntkSettings) { - this.cntkSettings = cntkSettings; - return this; - } - - /** - * Get the pyTorchSettings property: Settings for pyTorch job. - * - * @return the pyTorchSettings value. - */ - public PyTorchSettings pyTorchSettings() { - return this.pyTorchSettings; - } - - /** - * Set the pyTorchSettings property: Settings for pyTorch job. - * - * @param pyTorchSettings the pyTorchSettings value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withPyTorchSettings(PyTorchSettings pyTorchSettings) { - this.pyTorchSettings = pyTorchSettings; - return this; - } - - /** - * Get the tensorFlowSettings property: Settings for Tensor Flow job. - * - * @return the tensorFlowSettings value. - */ - public TensorFlowSettings tensorFlowSettings() { - return this.tensorFlowSettings; - } - - /** - * Set the tensorFlowSettings property: Settings for Tensor Flow job. - * - * @param tensorFlowSettings the tensorFlowSettings value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withTensorFlowSettings(TensorFlowSettings tensorFlowSettings) { - this.tensorFlowSettings = tensorFlowSettings; - return this; - } - - /** - * Get the caffeSettings property: Settings for Caffe job. - * - * @return the caffeSettings value. - */ - public CaffeSettings caffeSettings() { - return this.caffeSettings; - } - - /** - * Set the caffeSettings property: Settings for Caffe job. - * - * @param caffeSettings the caffeSettings value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withCaffeSettings(CaffeSettings caffeSettings) { - this.caffeSettings = caffeSettings; - return this; - } - - /** - * Get the caffe2Settings property: Settings for Caffe2 job. - * - * @return the caffe2Settings value. - */ - public Caffe2Settings caffe2Settings() { - return this.caffe2Settings; - } - - /** - * Set the caffe2Settings property: Settings for Caffe2 job. - * - * @param caffe2Settings the caffe2Settings value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withCaffe2Settings(Caffe2Settings caffe2Settings) { - this.caffe2Settings = caffe2Settings; - return this; - } - - /** - * Get the chainerSettings property: Settings for Chainer job. - * - * @return the chainerSettings value. - */ - public ChainerSettings chainerSettings() { - return this.chainerSettings; - } - - /** - * Set the chainerSettings property: Settings for Chainer job. - * - * @param chainerSettings the chainerSettings value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withChainerSettings(ChainerSettings chainerSettings) { - this.chainerSettings = chainerSettings; - return this; - } - - /** - * Get the customToolkitSettings property: Settings for custom tool kit job. - * - * @return the customToolkitSettings value. - */ - public CustomToolkitSettings customToolkitSettings() { - return this.customToolkitSettings; - } - - /** - * Set the customToolkitSettings property: Settings for custom tool kit job. - * - * @param customToolkitSettings the customToolkitSettings value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withCustomToolkitSettings(CustomToolkitSettings customToolkitSettings) { - this.customToolkitSettings = customToolkitSettings; - return this; - } - - /** - * Get the customMpiSettings property: Settings for custom MPI job. - * - * @return the customMpiSettings value. - */ - public CustomMpiSettings customMpiSettings() { - return this.customMpiSettings; - } - - /** - * Set the customMpiSettings property: Settings for custom MPI job. - * - * @param customMpiSettings the customMpiSettings value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withCustomMpiSettings(CustomMpiSettings customMpiSettings) { - this.customMpiSettings = customMpiSettings; - return this; - } - - /** - * Get the horovodSettings property: Settings for Horovod job. - * - * @return the horovodSettings value. - */ - public HorovodSettings horovodSettings() { - return this.horovodSettings; - } - - /** - * Set the horovodSettings property: Settings for Horovod job. - * - * @param horovodSettings the horovodSettings value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withHorovodSettings(HorovodSettings horovodSettings) { - this.horovodSettings = horovodSettings; - return this; - } - - /** - * Get the jobPreparation property: A command line to be executed on each node allocated for the job before tool kit - * is launched. - * - * @return the jobPreparation value. - */ - public JobPreparation jobPreparation() { - return this.jobPreparation; - } - - /** - * Set the jobPreparation property: A command line to be executed on each node allocated for the job before tool kit - * is launched. - * - * @param jobPreparation the jobPreparation value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withJobPreparation(JobPreparation jobPreparation) { - this.jobPreparation = jobPreparation; - return this; - } - - /** - * Get the stdOutErrPathPrefix property: The path where the Batch AI service will store stdout, stderror and - * execution log of the job. - * - * @return the stdOutErrPathPrefix value. - */ - public String stdOutErrPathPrefix() { - return this.stdOutErrPathPrefix; - } - - /** - * Set the stdOutErrPathPrefix property: The path where the Batch AI service will store stdout, stderror and - * execution log of the job. - * - * @param stdOutErrPathPrefix the stdOutErrPathPrefix value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withStdOutErrPathPrefix(String stdOutErrPathPrefix) { - this.stdOutErrPathPrefix = stdOutErrPathPrefix; - return this; - } - - /** - * Get the inputDirectories property: A list of input directories for the job. - * - * @return the inputDirectories value. - */ - public List inputDirectories() { - return this.inputDirectories; - } - - /** - * Set the inputDirectories property: A list of input directories for the job. - * - * @param inputDirectories the inputDirectories value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withInputDirectories(List inputDirectories) { - this.inputDirectories = inputDirectories; - return this; - } - - /** - * Get the outputDirectories property: A list of output directories for the job. - * - * @return the outputDirectories value. - */ - public List outputDirectories() { - return this.outputDirectories; - } - - /** - * Set the outputDirectories property: A list of output directories for the job. - * - * @param outputDirectories the outputDirectories value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withOutputDirectories(List outputDirectories) { - this.outputDirectories = outputDirectories; - return this; - } - - /** - * Get the environmentVariables property: A list of user defined environment variables which will be setup for the - * job. - * - * @return the environmentVariables value. - */ - public List environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: A list of user defined environment variables which will be setup for the - * job. - * - * @param environmentVariables the environmentVariables value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withEnvironmentVariables(List environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * Get the secrets property: A list of user defined environment variables with secret values which will be setup for - * the job. Server will never report values of these variables back. - * - * @return the secrets value. - */ - public List secrets() { - return this.secrets; - } - - /** - * Set the secrets property: A list of user defined environment variables with secret values which will be setup for - * the job. Server will never report values of these variables back. - * - * @param secrets the secrets value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withSecrets(List secrets) { - this.secrets = secrets; - return this; - } - - /** - * Get the constraints property: Constraints associated with the Job. - * - * @return the constraints value. - */ - public JobBasePropertiesConstraints constraints() { - return this.constraints; - } - - /** - * Set the constraints property: Constraints associated with the Job. - * - * @param constraints the constraints value to set. - * @return the JobCreateParameters object itself. - */ - public JobCreateParameters withConstraints(JobBasePropertiesConstraints constraints) { - this.constraints = constraints; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (cluster() != null) { - cluster().validate(); - } - if (mountVolumes() != null) { - mountVolumes().validate(); - } - if (containerSettings() != null) { - containerSettings().validate(); - } - if (cntkSettings() != null) { - cntkSettings().validate(); - } - if (pyTorchSettings() != null) { - pyTorchSettings().validate(); - } - if (tensorFlowSettings() != null) { - tensorFlowSettings().validate(); - } - if (caffeSettings() != null) { - caffeSettings().validate(); - } - if (caffe2Settings() != null) { - caffe2Settings().validate(); - } - if (chainerSettings() != null) { - chainerSettings().validate(); - } - if (customToolkitSettings() != null) { - customToolkitSettings().validate(); - } - if (customMpiSettings() != null) { - customMpiSettings().validate(); - } - if (horovodSettings() != null) { - horovodSettings().validate(); - } - if (jobPreparation() != null) { - jobPreparation().validate(); - } - if (inputDirectories() != null) { - inputDirectories().forEach(e -> e.validate()); - } - if (outputDirectories() != null) { - outputDirectories().forEach(e -> e.validate()); - } - if (environmentVariables() != null) { - environmentVariables().forEach(e -> e.validate()); - } - if (secrets() != null) { - secrets().forEach(e -> e.validate()); - } - if (constraints() != null) { - constraints().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobListResult.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobListResult.java deleted file mode 100644 index b103225f3417..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobListResult.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.fluent.models.JobInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Values returned by the List operation. */ -@Immutable -public final class JobListResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(JobListResult.class); - - /* - * The collection of jobs. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The continuation token. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: The collection of jobs. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The continuation token. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobPreparation.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobPreparation.java deleted file mode 100644 index 3dd85baa43f7..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobPreparation.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Job preparation settings. */ -@Fluent -public final class JobPreparation { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(JobPreparation.class); - - /* - * The command line to execute. If containerSettings is specified on the - * job, this commandLine will be executed in the same container as job. - * Otherwise it will be executed on the node. - */ - @JsonProperty(value = "commandLine", required = true) - private String commandLine; - - /** - * Get the commandLine property: The command line to execute. If containerSettings is specified on the job, this - * commandLine will be executed in the same container as job. Otherwise it will be executed on the node. - * - * @return the commandLine value. - */ - public String commandLine() { - return this.commandLine; - } - - /** - * Set the commandLine property: The command line to execute. If containerSettings is specified on the job, this - * commandLine will be executed in the same container as job. Otherwise it will be executed on the node. - * - * @param commandLine the commandLine value to set. - * @return the JobPreparation object itself. - */ - public JobPreparation withCommandLine(String commandLine) { - this.commandLine = commandLine; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (commandLine() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property commandLine in model JobPreparation")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobPriority.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobPriority.java deleted file mode 100644 index a2a218ad1294..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobPriority.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for JobPriority. */ -public final class JobPriority extends ExpandableStringEnum { - /** Static value low for JobPriority. */ - public static final JobPriority LOW = fromString("low"); - - /** Static value normal for JobPriority. */ - public static final JobPriority NORMAL = fromString("normal"); - - /** Static value high for JobPriority. */ - public static final JobPriority HIGH = fromString("high"); - - /** - * Creates or finds a JobPriority from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobPriority. - */ - @JsonCreator - public static JobPriority fromString(String name) { - return fromString(name, JobPriority.class); - } - - /** @return known JobPriority values. */ - public static Collection values() { - return values(JobPriority.class); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobPropertiesConstraints.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobPropertiesConstraints.java deleted file mode 100644 index d0c754f924d8..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobPropertiesConstraints.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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.time.Duration; - -/** Constraints associated with the Job. */ -@Fluent -public final class JobPropertiesConstraints { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(JobPropertiesConstraints.class); - - /* - * Max time the job can run. Default value: 1 week. - */ - @JsonProperty(value = "maxWallClockTime") - private Duration maxWallClockTime; - - /** - * Get the maxWallClockTime property: Max time the job can run. Default value: 1 week. - * - * @return the maxWallClockTime value. - */ - public Duration maxWallClockTime() { - return this.maxWallClockTime; - } - - /** - * Set the maxWallClockTime property: Max time the job can run. Default value: 1 week. - * - * @param maxWallClockTime the maxWallClockTime value to set. - * @return the JobPropertiesConstraints object itself. - */ - public JobPropertiesConstraints withMaxWallClockTime(Duration maxWallClockTime) { - this.maxWallClockTime = maxWallClockTime; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobPropertiesExecutionInfo.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobPropertiesExecutionInfo.java deleted file mode 100644 index 1e09a1f4dd8f..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/JobPropertiesExecutionInfo.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; -import java.time.OffsetDateTime; -import java.util.List; - -/** Information about the execution of a job. */ -@Immutable -public final class JobPropertiesExecutionInfo { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(JobPropertiesExecutionInfo.class); - - /* - * The time at which the job started running. 'Running' corresponds to the - * running state. If the job has been restarted or retried, this is the - * most recent time at which the job started running. This property is - * present only for job that are in the running or completed state. - */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startTime; - - /* - * The time at which the job completed. This property is only returned if - * the job is in completed state. - */ - @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endTime; - - /* - * The exit code of the job. This property is only returned if the job is - * in completed state. - */ - @JsonProperty(value = "exitCode", access = JsonProperty.Access.WRITE_ONLY) - private Integer exitCode; - - /* - * A collection of errors encountered by the service during job execution. - */ - @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) - private List errors; - - /** - * Get the startTime property: The time at which the job started running. 'Running' corresponds to the running - * state. If the job has been restarted or retried, this is the most recent time at which the job started running. - * This property is present only for job that are in the running or completed state. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the endTime property: The time at which the job completed. This property is only returned if the job is in - * completed state. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Get the exitCode property: The exit code of the job. This property is only returned if the job is in completed - * state. - * - * @return the exitCode value. - */ - public Integer exitCode() { - return this.exitCode; - } - - /** - * Get the errors property: A collection of errors encountered by the service during job execution. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (errors() != null) { - errors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Jobs.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Jobs.java deleted file mode 100644 index ae6699f23eab..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Jobs.java +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Jobs. */ -public interface Jobs { - /** - * Gets a list of Jobs within the specified Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Jobs within the specified Experiment. - */ - PagedIterable listByExperiment(String resourceGroupName, String workspaceName, String experimentName); - - /** - * Gets a list of Jobs within the specified Experiment. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Jobs within the specified Experiment. - */ - PagedIterable listByExperiment(String resourceGroupName, String workspaceName, String experimentName, - Integer maxResults, Context context); - - /** - * Deletes a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String experimentName, String jobName); - - /** - * Deletes a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String experimentName, String jobName, Context context); - - /** - * Gets information about a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Job. - */ - Job get(String resourceGroupName, String workspaceName, String experimentName, String jobName); - - /** - * Gets information about a Job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Job. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String experimentName, String jobName, - Context context); - - /** - * List all directories and files inside the given directory of the Job's output directory (if the output directory - * is on Azure File Share or Azure Storage Container). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param outputdirectoryid Id of the job output directory. This is the OutputDirectory-->id parameter that is - * given by the user during Create Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. - */ - PagedIterable listOutputFiles(String resourceGroupName, String workspaceName, String experimentName, - String jobName, String outputdirectoryid); - - /** - * List all directories and files inside the given directory of the Job's output directory (if the output directory - * is on Azure File Share or Azure Storage Container). - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param outputdirectoryid Id of the job output directory. This is the OutputDirectory-->id parameter that is - * given by the user during Create Job. - * @param directory The path to the directory. - * @param linkexpiryinminutes The number of minutes after which the download link will expire. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. - */ - PagedIterable listOutputFiles(String resourceGroupName, String workspaceName, String experimentName, - String jobName, String outputdirectoryid, String directory, Integer linkexpiryinminutes, Integer maxResults, - Context context); - - /** - * Gets a list of currently existing nodes which were used for the Job execution. The returned information contains - * the node ID, its public IP and SSH port. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of currently existing nodes which were used for the Job execution. - */ - PagedIterable listRemoteLoginInformation(String resourceGroupName, String workspaceName, - String experimentName, String jobName); - - /** - * Gets a list of currently existing nodes which were used for the Job execution. The returned information contains - * the node ID, its public IP and SSH port. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of currently existing nodes which were used for the Job execution. - */ - PagedIterable listRemoteLoginInformation(String resourceGroupName, String workspaceName, - String experimentName, String jobName, Context context); - - /** - * Terminates a job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 terminate(String resourceGroupName, String workspaceName, String experimentName, String jobName); - - /** - * Terminates a job. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param experimentName The name of the experiment. Experiment names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param jobName The name of the job within the specified resource group. Job names can only contain a combination - * of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 - * characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 terminate(String resourceGroupName, String workspaceName, String experimentName, String jobName, - Context context); - - /** - * Gets information about a Job. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a Job. - */ - Job getById(String id); - - /** - * Gets information about a Job. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a Job. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a Job. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a Job. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Job resource. - * - * @param name resource name. - * @return the first stage of the new Job definition. - */ - Job.DefinitionStages.Blank define(String name); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/KeyVaultSecretReference.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/KeyVaultSecretReference.java deleted file mode 100644 index 3a06992bea17..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/KeyVaultSecretReference.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Key Vault Secret reference. */ -@Fluent -public final class KeyVaultSecretReference { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(KeyVaultSecretReference.class); - - /* - * Fully qualified resource identifier of the Key Vault. - */ - @JsonProperty(value = "sourceVault", required = true) - private ResourceId sourceVault; - - /* - * The URL referencing a secret in the Key Vault. - */ - @JsonProperty(value = "secretUrl", required = true) - private String secretUrl; - - /** - * Get the sourceVault property: Fully qualified resource identifier of the Key Vault. - * - * @return the sourceVault value. - */ - public ResourceId sourceVault() { - return this.sourceVault; - } - - /** - * Set the sourceVault property: Fully qualified resource identifier of the Key Vault. - * - * @param sourceVault the sourceVault value to set. - * @return the KeyVaultSecretReference object itself. - */ - public KeyVaultSecretReference withSourceVault(ResourceId sourceVault) { - this.sourceVault = sourceVault; - return this; - } - - /** - * Get the secretUrl property: The URL referencing a secret in the Key Vault. - * - * @return the secretUrl value. - */ - public String secretUrl() { - return this.secretUrl; - } - - /** - * Set the secretUrl property: The URL referencing a secret in the Key Vault. - * - * @param secretUrl the secretUrl value to set. - * @return the KeyVaultSecretReference object itself. - */ - public KeyVaultSecretReference withSecretUrl(String secretUrl) { - this.secretUrl = secretUrl; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceVault() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property sourceVault in model KeyVaultSecretReference")); - } else { - sourceVault().validate(); - } - if (secretUrl() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property secretUrl in model KeyVaultSecretReference")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ListUsagesResult.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ListUsagesResult.java deleted file mode 100644 index 8d90b7cdbdf8..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ListUsagesResult.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.fluent.models.UsageInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The List Usages operation response. */ -@Immutable -public final class ListUsagesResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ListUsagesResult.class); - - /* - * The list of compute resource usages. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The URI to fetch the next page of compute resource usage information. - * Call ListNext() with this to fetch the next page of compute resource - * usage information. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: The list of compute resource usages. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI to fetch the next page of compute resource usage information. Call ListNext() - * with this to fetch the next page of compute resource usage information. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ManualScaleSettings.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ManualScaleSettings.java deleted file mode 100644 index c478244df083..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ManualScaleSettings.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Manual scale settings for the cluster. */ -@Fluent -public final class ManualScaleSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ManualScaleSettings.class); - - /* - * The desired number of compute nodes in the Cluster. Default is 0. - */ - @JsonProperty(value = "targetNodeCount", required = true) - private int targetNodeCount; - - /* - * An action to be performed when the cluster size is decreasing. The - * default value is requeue. - */ - @JsonProperty(value = "nodeDeallocationOption") - private DeallocationOption nodeDeallocationOption; - - /** - * Get the targetNodeCount property: The desired number of compute nodes in the Cluster. Default is 0. - * - * @return the targetNodeCount value. - */ - public int targetNodeCount() { - return this.targetNodeCount; - } - - /** - * Set the targetNodeCount property: The desired number of compute nodes in the Cluster. Default is 0. - * - * @param targetNodeCount the targetNodeCount value to set. - * @return the ManualScaleSettings object itself. - */ - public ManualScaleSettings withTargetNodeCount(int targetNodeCount) { - this.targetNodeCount = targetNodeCount; - return this; - } - - /** - * Get the nodeDeallocationOption property: An action to be performed when the cluster size is decreasing. The - * default value is requeue. - * - * @return the nodeDeallocationOption value. - */ - public DeallocationOption nodeDeallocationOption() { - return this.nodeDeallocationOption; - } - - /** - * Set the nodeDeallocationOption property: An action to be performed when the cluster size is decreasing. The - * default value is requeue. - * - * @param nodeDeallocationOption the nodeDeallocationOption value to set. - * @return the ManualScaleSettings object itself. - */ - public ManualScaleSettings withNodeDeallocationOption(DeallocationOption nodeDeallocationOption) { - this.nodeDeallocationOption = nodeDeallocationOption; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/MountSettings.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/MountSettings.java deleted file mode 100644 index 8c75c841054a..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/MountSettings.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** File Server mount Information. */ -@Fluent -public final class MountSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MountSettings.class); - - /* - * Path where the data disks are mounted on the File Server. - */ - @JsonProperty(value = "mountPoint") - private String mountPoint; - - /* - * Public IP address of the File Server which can be used to SSH to the - * node from outside of the subnet. - */ - @JsonProperty(value = "fileServerPublicIP") - private String fileServerPublicIp; - - /* - * Internal IP address of the File Server which can be used to access the - * File Server from within the subnet. - */ - @JsonProperty(value = "fileServerInternalIP") - private String fileServerInternalIp; - - /** - * Get the mountPoint property: Path where the data disks are mounted on the File Server. - * - * @return the mountPoint value. - */ - public String mountPoint() { - return this.mountPoint; - } - - /** - * Set the mountPoint property: Path where the data disks are mounted on the File Server. - * - * @param mountPoint the mountPoint value to set. - * @return the MountSettings object itself. - */ - public MountSettings withMountPoint(String mountPoint) { - this.mountPoint = mountPoint; - return this; - } - - /** - * Get the fileServerPublicIp property: Public IP address of the File Server which can be used to SSH to the node - * from outside of the subnet. - * - * @return the fileServerPublicIp value. - */ - public String fileServerPublicIp() { - return this.fileServerPublicIp; - } - - /** - * Set the fileServerPublicIp property: Public IP address of the File Server which can be used to SSH to the node - * from outside of the subnet. - * - * @param fileServerPublicIp the fileServerPublicIp value to set. - * @return the MountSettings object itself. - */ - public MountSettings withFileServerPublicIp(String fileServerPublicIp) { - this.fileServerPublicIp = fileServerPublicIp; - return this; - } - - /** - * Get the fileServerInternalIp property: Internal IP address of the File Server which can be used to access the - * File Server from within the subnet. - * - * @return the fileServerInternalIp value. - */ - public String fileServerInternalIp() { - return this.fileServerInternalIp; - } - - /** - * Set the fileServerInternalIp property: Internal IP address of the File Server which can be used to access the - * File Server from within the subnet. - * - * @param fileServerInternalIp the fileServerInternalIp value to set. - * @return the MountSettings object itself. - */ - public MountSettings withFileServerInternalIp(String fileServerInternalIp) { - this.fileServerInternalIp = fileServerInternalIp; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/MountVolumes.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/MountVolumes.java deleted file mode 100644 index 36c248a84bbf..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/MountVolumes.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Details of volumes to mount on the cluster. */ -@Fluent -public final class MountVolumes { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MountVolumes.class); - - /* - * A collection of Azure File Shares that are to be mounted to the cluster - * nodes. - */ - @JsonProperty(value = "azureFileShares") - private List azureFileShares; - - /* - * A collection of Azure Blob Containers that are to be mounted to the - * cluster nodes. - */ - @JsonProperty(value = "azureBlobFileSystems") - private List azureBlobFileSystems; - - /* - * A collection of Batch AI File Servers that are to be mounted to the - * cluster nodes. - */ - @JsonProperty(value = "fileServers") - private List fileServers; - - /* - * A collection of unmanaged file systems that are to be mounted to the - * cluster nodes. - */ - @JsonProperty(value = "unmanagedFileSystems") - private List unmanagedFileSystems; - - /** - * Get the azureFileShares property: A collection of Azure File Shares that are to be mounted to the cluster nodes. - * - * @return the azureFileShares value. - */ - public List azureFileShares() { - return this.azureFileShares; - } - - /** - * Set the azureFileShares property: A collection of Azure File Shares that are to be mounted to the cluster nodes. - * - * @param azureFileShares the azureFileShares value to set. - * @return the MountVolumes object itself. - */ - public MountVolumes withAzureFileShares(List azureFileShares) { - this.azureFileShares = azureFileShares; - return this; - } - - /** - * Get the azureBlobFileSystems property: A collection of Azure Blob Containers that are to be mounted to the - * cluster nodes. - * - * @return the azureBlobFileSystems value. - */ - public List azureBlobFileSystems() { - return this.azureBlobFileSystems; - } - - /** - * Set the azureBlobFileSystems property: A collection of Azure Blob Containers that are to be mounted to the - * cluster nodes. - * - * @param azureBlobFileSystems the azureBlobFileSystems value to set. - * @return the MountVolumes object itself. - */ - public MountVolumes withAzureBlobFileSystems(List azureBlobFileSystems) { - this.azureBlobFileSystems = azureBlobFileSystems; - return this; - } - - /** - * Get the fileServers property: A collection of Batch AI File Servers that are to be mounted to the cluster nodes. - * - * @return the fileServers value. - */ - public List fileServers() { - return this.fileServers; - } - - /** - * Set the fileServers property: A collection of Batch AI File Servers that are to be mounted to the cluster nodes. - * - * @param fileServers the fileServers value to set. - * @return the MountVolumes object itself. - */ - public MountVolumes withFileServers(List fileServers) { - this.fileServers = fileServers; - return this; - } - - /** - * Get the unmanagedFileSystems property: A collection of unmanaged file systems that are to be mounted to the - * cluster nodes. - * - * @return the unmanagedFileSystems value. - */ - public List unmanagedFileSystems() { - return this.unmanagedFileSystems; - } - - /** - * Set the unmanagedFileSystems property: A collection of unmanaged file systems that are to be mounted to the - * cluster nodes. - * - * @param unmanagedFileSystems the unmanagedFileSystems value to set. - * @return the MountVolumes object itself. - */ - public MountVolumes withUnmanagedFileSystems(List unmanagedFileSystems) { - this.unmanagedFileSystems = unmanagedFileSystems; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (azureFileShares() != null) { - azureFileShares().forEach(e -> e.validate()); - } - if (azureBlobFileSystems() != null) { - azureBlobFileSystems().forEach(e -> e.validate()); - } - if (fileServers() != null) { - fileServers().forEach(e -> e.validate()); - } - if (unmanagedFileSystems() != null) { - unmanagedFileSystems().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/NameValuePair.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/NameValuePair.java deleted file mode 100644 index 8534fa6cacda..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/NameValuePair.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Name-value pair. */ -@Fluent -public final class NameValuePair { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(NameValuePair.class); - - /* - * The name in the name-value pair. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The value in the name-value pair. - */ - @JsonProperty(value = "value") - private String value; - - /** - * Get the name property: The name in the name-value pair. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name in the name-value pair. - * - * @param name the name value to set. - * @return the NameValuePair object itself. - */ - public NameValuePair withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: The value in the name-value pair. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: The value in the name-value pair. - * - * @param value the value value to set. - * @return the NameValuePair object itself. - */ - public NameValuePair withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/NodeSetup.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/NodeSetup.java deleted file mode 100644 index 37cf1809111f..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/NodeSetup.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Node setup settings. */ -@Fluent -public final class NodeSetup { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(NodeSetup.class); - - /* - * Setup task to run on cluster nodes when nodes got created or rebooted. - * The setup task code needs to be idempotent. Generally the setup task is - * used to download static data that is required for all jobs that run on - * the cluster VMs and/or to download/install software. - */ - @JsonProperty(value = "setupTask") - private SetupTask setupTask; - - /* - * Mount volumes to be available to setup task and all jobs executing on - * the cluster. The volumes will be mounted at location specified by - * $AZ_BATCHAI_MOUNT_ROOT environment variable. - */ - @JsonProperty(value = "mountVolumes") - private MountVolumes mountVolumes; - - /* - * Settings for performance counters collecting and uploading. - */ - @JsonProperty(value = "performanceCountersSettings") - private PerformanceCountersSettings performanceCountersSettings; - - /** - * Get the setupTask property: Setup task to run on cluster nodes when nodes got created or rebooted. The setup task - * code needs to be idempotent. Generally the setup task is used to download static data that is required for all - * jobs that run on the cluster VMs and/or to download/install software. - * - * @return the setupTask value. - */ - public SetupTask setupTask() { - return this.setupTask; - } - - /** - * Set the setupTask property: Setup task to run on cluster nodes when nodes got created or rebooted. The setup task - * code needs to be idempotent. Generally the setup task is used to download static data that is required for all - * jobs that run on the cluster VMs and/or to download/install software. - * - * @param setupTask the setupTask value to set. - * @return the NodeSetup object itself. - */ - public NodeSetup withSetupTask(SetupTask setupTask) { - this.setupTask = setupTask; - return this; - } - - /** - * Get the mountVolumes property: Mount volumes to be available to setup task and all jobs executing on the cluster. - * The volumes will be mounted at location specified by $AZ_BATCHAI_MOUNT_ROOT environment variable. - * - * @return the mountVolumes value. - */ - public MountVolumes mountVolumes() { - return this.mountVolumes; - } - - /** - * Set the mountVolumes property: Mount volumes to be available to setup task and all jobs executing on the cluster. - * The volumes will be mounted at location specified by $AZ_BATCHAI_MOUNT_ROOT environment variable. - * - * @param mountVolumes the mountVolumes value to set. - * @return the NodeSetup object itself. - */ - public NodeSetup withMountVolumes(MountVolumes mountVolumes) { - this.mountVolumes = mountVolumes; - return this; - } - - /** - * Get the performanceCountersSettings property: Settings for performance counters collecting and uploading. - * - * @return the performanceCountersSettings value. - */ - public PerformanceCountersSettings performanceCountersSettings() { - return this.performanceCountersSettings; - } - - /** - * Set the performanceCountersSettings property: Settings for performance counters collecting and uploading. - * - * @param performanceCountersSettings the performanceCountersSettings value to set. - * @return the NodeSetup object itself. - */ - public NodeSetup withPerformanceCountersSettings(PerformanceCountersSettings performanceCountersSettings) { - this.performanceCountersSettings = performanceCountersSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (setupTask() != null) { - setupTask().validate(); - } - if (mountVolumes() != null) { - mountVolumes().validate(); - } - if (performanceCountersSettings() != null) { - performanceCountersSettings().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/NodeStateCounts.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/NodeStateCounts.java deleted file mode 100644 index 2743750bae4f..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/NodeStateCounts.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Counts of various compute node states on the cluster. */ -@Immutable -public final class NodeStateCounts { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(NodeStateCounts.class); - - /* - * Number of compute nodes in idle state. - */ - @JsonProperty(value = "idleNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer idleNodeCount; - - /* - * Number of compute nodes which are running jobs. - */ - @JsonProperty(value = "runningNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer runningNodeCount; - - /* - * Number of compute nodes which are being prepared. - */ - @JsonProperty(value = "preparingNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer preparingNodeCount; - - /* - * Number of compute nodes which are in unusable state. - */ - @JsonProperty(value = "unusableNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer unusableNodeCount; - - /* - * Number of compute nodes which are leaving the cluster. - */ - @JsonProperty(value = "leavingNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer leavingNodeCount; - - /** - * Get the idleNodeCount property: Number of compute nodes in idle state. - * - * @return the idleNodeCount value. - */ - public Integer idleNodeCount() { - return this.idleNodeCount; - } - - /** - * Get the runningNodeCount property: Number of compute nodes which are running jobs. - * - * @return the runningNodeCount value. - */ - public Integer runningNodeCount() { - return this.runningNodeCount; - } - - /** - * Get the preparingNodeCount property: Number of compute nodes which are being prepared. - * - * @return the preparingNodeCount value. - */ - public Integer preparingNodeCount() { - return this.preparingNodeCount; - } - - /** - * Get the unusableNodeCount property: Number of compute nodes which are in unusable state. - * - * @return the unusableNodeCount value. - */ - public Integer unusableNodeCount() { - return this.unusableNodeCount; - } - - /** - * Get the leavingNodeCount property: Number of compute nodes which are leaving the cluster. - * - * @return the leavingNodeCount value. - */ - public Integer leavingNodeCount() { - return this.leavingNodeCount; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Operation.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Operation.java deleted file mode 100644 index 2c299e14f1ac..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Operation.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.resourcemanager.batchai.fluent.models.OperationInner; - -/** An immutable client-side representation of Operation. */ -public interface Operation { - /** - * Gets the name property: This is of the format {provider}/{resource}/{operation}. - * - * @return the name value. - */ - String name(); - - /** - * Gets the display property: The object that describes the operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the origin property: The intended executor of the operation. - * - * @return the origin value. - */ - String origin(); - - /** - * Gets the properties property: Any object. - * - * @return the properties value. - */ - Object properties(); - - /** - * Gets the inner com.azure.resourcemanager.batchai.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/OperationDisplay.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/OperationDisplay.java deleted file mode 100644 index dab7a8357d7c..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/OperationDisplay.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** The object that describes the operation. */ -@Immutable -public final class OperationDisplay { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - - /* - * Friendly name of the resource provider. - */ - @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) - private String provider; - - /* - * For example: read, write, delete, or listKeys/action - */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) - private String operation; - - /* - * The resource type on which the operation is performed. - */ - @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) - private String resource; - - /* - * The friendly name of the operation. - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /** - * Get the provider property: Friendly name of the resource provider. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Get the operation property: For example: read, write, delete, or listKeys/action. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the resource property: The resource type on which the operation is performed. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Get the description property: The friendly name of the operation. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/OperationListResult.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/OperationListResult.java deleted file mode 100644 index f99772a6f44a..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/OperationListResult.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Contains the list of all operations supported by BatchAI resource provider. */ -@Immutable -public final class OperationListResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(OperationListResult.class); - - /* - * The list of operations supported by the resource provider. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The URL to get the next set of operation list results if there are any. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: The list of operations supported by the resource provider. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URL to get the next set of operation list results if there are any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Operations.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Operations.java deleted file mode 100644 index 7bca6491343b..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Operations.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of Operations. */ -public interface Operations { - /** - * Lists available operations for the Microsoft.BatchAI provider. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the list of all operations supported by BatchAI resource provider. - */ - PagedIterable list(); - - /** - * Lists available operations for the Microsoft.BatchAI provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the list of all operations supported by BatchAI resource provider. - */ - PagedIterable list(Context context); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/OutputDirectory.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/OutputDirectory.java deleted file mode 100644 index dd5a73c370ac..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/OutputDirectory.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Output directory for the job. */ -@Fluent -public final class OutputDirectory { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(OutputDirectory.class); - - /* - * The ID of the output directory. The job can use AZ_BATCHAI_OUTPUT_ - * environment variable to find the directory path, where is the value - * of id attribute. - */ - @JsonProperty(value = "id", required = true) - private String id; - - /* - * The prefix path where the output directory will be created. Note, this - * is an absolute path to prefix. E.g. $AZ_BATCHAI_MOUNT_ROOT/MyNFS/MyLogs. - * The full path to the output directory by combining pathPrefix, - * jobOutputDirectoryPathSegment (reported by get job) and pathSuffix. - */ - @JsonProperty(value = "pathPrefix", required = true) - private String pathPrefix; - - /* - * The suffix path where the output directory will be created. E.g. models. - * You can find the full path to the output directory by combining - * pathPrefix, jobOutputDirectoryPathSegment (reported by get job) and - * pathSuffix. - */ - @JsonProperty(value = "pathSuffix") - private String pathSuffix; - - /** - * Get the id property: The ID of the output directory. The job can use AZ_BATCHAI_OUTPUT_<id> environment - * variable to find the directory path, where <id> is the value of id attribute. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The ID of the output directory. The job can use AZ_BATCHAI_OUTPUT_<id> environment - * variable to find the directory path, where <id> is the value of id attribute. - * - * @param id the id value to set. - * @return the OutputDirectory object itself. - */ - public OutputDirectory withId(String id) { - this.id = id; - return this; - } - - /** - * Get the pathPrefix property: The prefix path where the output directory will be created. Note, this is an - * absolute path to prefix. E.g. $AZ_BATCHAI_MOUNT_ROOT/MyNFS/MyLogs. The full path to the output directory by - * combining pathPrefix, jobOutputDirectoryPathSegment (reported by get job) and pathSuffix. - * - * @return the pathPrefix value. - */ - public String pathPrefix() { - return this.pathPrefix; - } - - /** - * Set the pathPrefix property: The prefix path where the output directory will be created. Note, this is an - * absolute path to prefix. E.g. $AZ_BATCHAI_MOUNT_ROOT/MyNFS/MyLogs. The full path to the output directory by - * combining pathPrefix, jobOutputDirectoryPathSegment (reported by get job) and pathSuffix. - * - * @param pathPrefix the pathPrefix value to set. - * @return the OutputDirectory object itself. - */ - public OutputDirectory withPathPrefix(String pathPrefix) { - this.pathPrefix = pathPrefix; - return this; - } - - /** - * Get the pathSuffix property: The suffix path where the output directory will be created. E.g. models. You can - * find the full path to the output directory by combining pathPrefix, jobOutputDirectoryPathSegment (reported by - * get job) and pathSuffix. - * - * @return the pathSuffix value. - */ - public String pathSuffix() { - return this.pathSuffix; - } - - /** - * Set the pathSuffix property: The suffix path where the output directory will be created. E.g. models. You can - * find the full path to the output directory by combining pathPrefix, jobOutputDirectoryPathSegment (reported by - * get job) and pathSuffix. - * - * @param pathSuffix the pathSuffix value to set. - * @return the OutputDirectory object itself. - */ - public OutputDirectory withPathSuffix(String pathSuffix) { - this.pathSuffix = pathSuffix; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property id in model OutputDirectory")); - } - if (pathPrefix() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property pathPrefix in model OutputDirectory")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/PerformanceCountersSettings.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/PerformanceCountersSettings.java deleted file mode 100644 index e96effc48786..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/PerformanceCountersSettings.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Performance counters reporting settings. */ -@Fluent -public final class PerformanceCountersSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(PerformanceCountersSettings.class); - - /* - * Azure Application Insights information for performance counters - * reporting. If provided, Batch AI will upload node performance counters - * to the corresponding Azure Application Insights account. - */ - @JsonProperty(value = "appInsightsReference", required = true) - private AppInsightsReference appInsightsReference; - - /** - * Get the appInsightsReference property: Azure Application Insights information for performance counters reporting. - * If provided, Batch AI will upload node performance counters to the corresponding Azure Application Insights - * account. - * - * @return the appInsightsReference value. - */ - public AppInsightsReference appInsightsReference() { - return this.appInsightsReference; - } - - /** - * Set the appInsightsReference property: Azure Application Insights information for performance counters reporting. - * If provided, Batch AI will upload node performance counters to the corresponding Azure Application Insights - * account. - * - * @param appInsightsReference the appInsightsReference value to set. - * @return the PerformanceCountersSettings object itself. - */ - public PerformanceCountersSettings withAppInsightsReference(AppInsightsReference appInsightsReference) { - this.appInsightsReference = appInsightsReference; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (appInsightsReference() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property appInsightsReference in model PerformanceCountersSettings")); - } else { - appInsightsReference().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/PrivateRegistryCredentials.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/PrivateRegistryCredentials.java deleted file mode 100644 index 78d987fc6e8d..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/PrivateRegistryCredentials.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Credentials to access a container image in a private repository. */ -@Fluent -public final class PrivateRegistryCredentials { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(PrivateRegistryCredentials.class); - - /* - * User name to login to the repository. - */ - @JsonProperty(value = "username", required = true) - private String username; - - /* - * User password to login to the docker repository. One of password or - * passwordSecretReference must be specified. - */ - @JsonProperty(value = "password") - private String password; - - /* - * KeyVault Secret storing the password. Users can store their secrets in - * Azure KeyVault and pass it to the Batch AI service to integrate with - * KeyVault. One of password or passwordSecretReference must be specified. - */ - @JsonProperty(value = "passwordSecretReference") - private KeyVaultSecretReference passwordSecretReference; - - /** - * Get the username property: User name to login to the repository. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: User name to login to the repository. - * - * @param username the username value to set. - * @return the PrivateRegistryCredentials object itself. - */ - public PrivateRegistryCredentials withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: User password to login to the docker repository. One of password or - * passwordSecretReference must be specified. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: User password to login to the docker repository. One of password or - * passwordSecretReference must be specified. - * - * @param password the password value to set. - * @return the PrivateRegistryCredentials object itself. - */ - public PrivateRegistryCredentials withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the passwordSecretReference property: KeyVault Secret storing the password. Users can store their secrets in - * Azure KeyVault and pass it to the Batch AI service to integrate with KeyVault. One of password or - * passwordSecretReference must be specified. - * - * @return the passwordSecretReference value. - */ - public KeyVaultSecretReference passwordSecretReference() { - return this.passwordSecretReference; - } - - /** - * Set the passwordSecretReference property: KeyVault Secret storing the password. Users can store their secrets in - * Azure KeyVault and pass it to the Batch AI service to integrate with KeyVault. One of password or - * passwordSecretReference must be specified. - * - * @param passwordSecretReference the passwordSecretReference value to set. - * @return the PrivateRegistryCredentials object itself. - */ - public PrivateRegistryCredentials withPasswordSecretReference(KeyVaultSecretReference passwordSecretReference) { - this.passwordSecretReference = passwordSecretReference; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (username() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property username in model PrivateRegistryCredentials")); - } - if (passwordSecretReference() != null) { - passwordSecretReference().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ProvisioningState.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ProvisioningState.java deleted file mode 100644 index c421f6f33f9b..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ProvisioningState.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ProvisioningState. */ -public final class ProvisioningState extends ExpandableStringEnum { - /** Static value creating for ProvisioningState. */ - public static final ProvisioningState CREATING = fromString("creating"); - - /** Static value succeeded for ProvisioningState. */ - public static final ProvisioningState SUCCEEDED = fromString("succeeded"); - - /** Static value failed for ProvisioningState. */ - public static final ProvisioningState FAILED = fromString("failed"); - - /** Static value deleting for ProvisioningState. */ - public static final ProvisioningState DELETING = fromString("deleting"); - - /** - * Creates or finds a ProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProvisioningState. - */ - @JsonCreator - public static ProvisioningState fromString(String name) { - return fromString(name, ProvisioningState.class); - } - - /** @return known ProvisioningState values. */ - public static Collection values() { - return values(ProvisioningState.class); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/PyTorchSettings.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/PyTorchSettings.java deleted file mode 100644 index e01ec4aa9130..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/PyTorchSettings.java +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** pyTorch job settings. */ -@Fluent -public final class PyTorchSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(PyTorchSettings.class); - - /* - * The python script to execute. - */ - @JsonProperty(value = "pythonScriptFilePath", required = true) - private String pythonScriptFilePath; - - /* - * The path to the Python interpreter. - */ - @JsonProperty(value = "pythonInterpreterPath") - private String pythonInterpreterPath; - - /* - * Command line arguments that need to be passed to the python script. - */ - @JsonProperty(value = "commandLineArgs") - private String commandLineArgs; - - /* - * Number of processes to launch for the job execution. The default value - * for this property is equal to nodeCount property - */ - @JsonProperty(value = "processCount") - private Integer processCount; - - /* - * Type of the communication backend for distributed jobs. Valid values are - * 'TCP', 'Gloo' or 'MPI'. Not required for non-distributed jobs. - */ - @JsonProperty(value = "communicationBackend") - private String communicationBackend; - - /** - * Get the pythonScriptFilePath property: The python script to execute. - * - * @return the pythonScriptFilePath value. - */ - public String pythonScriptFilePath() { - return this.pythonScriptFilePath; - } - - /** - * Set the pythonScriptFilePath property: The python script to execute. - * - * @param pythonScriptFilePath the pythonScriptFilePath value to set. - * @return the PyTorchSettings object itself. - */ - public PyTorchSettings withPythonScriptFilePath(String pythonScriptFilePath) { - this.pythonScriptFilePath = pythonScriptFilePath; - return this; - } - - /** - * Get the pythonInterpreterPath property: The path to the Python interpreter. - * - * @return the pythonInterpreterPath value. - */ - public String pythonInterpreterPath() { - return this.pythonInterpreterPath; - } - - /** - * Set the pythonInterpreterPath property: The path to the Python interpreter. - * - * @param pythonInterpreterPath the pythonInterpreterPath value to set. - * @return the PyTorchSettings object itself. - */ - public PyTorchSettings withPythonInterpreterPath(String pythonInterpreterPath) { - this.pythonInterpreterPath = pythonInterpreterPath; - return this; - } - - /** - * Get the commandLineArgs property: Command line arguments that need to be passed to the python script. - * - * @return the commandLineArgs value. - */ - public String commandLineArgs() { - return this.commandLineArgs; - } - - /** - * Set the commandLineArgs property: Command line arguments that need to be passed to the python script. - * - * @param commandLineArgs the commandLineArgs value to set. - * @return the PyTorchSettings object itself. - */ - public PyTorchSettings withCommandLineArgs(String commandLineArgs) { - this.commandLineArgs = commandLineArgs; - return this; - } - - /** - * Get the processCount property: Number of processes to launch for the job execution. The default value for this - * property is equal to nodeCount property. - * - * @return the processCount value. - */ - public Integer processCount() { - return this.processCount; - } - - /** - * Set the processCount property: Number of processes to launch for the job execution. The default value for this - * property is equal to nodeCount property. - * - * @param processCount the processCount value to set. - * @return the PyTorchSettings object itself. - */ - public PyTorchSettings withProcessCount(Integer processCount) { - this.processCount = processCount; - return this; - } - - /** - * Get the communicationBackend property: Type of the communication backend for distributed jobs. Valid values are - * 'TCP', 'Gloo' or 'MPI'. Not required for non-distributed jobs. - * - * @return the communicationBackend value. - */ - public String communicationBackend() { - return this.communicationBackend; - } - - /** - * Set the communicationBackend property: Type of the communication backend for distributed jobs. Valid values are - * 'TCP', 'Gloo' or 'MPI'. Not required for non-distributed jobs. - * - * @param communicationBackend the communicationBackend value to set. - * @return the PyTorchSettings object itself. - */ - public PyTorchSettings withCommunicationBackend(String communicationBackend) { - this.communicationBackend = communicationBackend; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (pythonScriptFilePath() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property pythonScriptFilePath in model PyTorchSettings")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/RemoteLoginInformation.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/RemoteLoginInformation.java deleted file mode 100644 index 915385fbc68e..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/RemoteLoginInformation.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.resourcemanager.batchai.fluent.models.RemoteLoginInformationInner; - -/** An immutable client-side representation of RemoteLoginInformation. */ -public interface RemoteLoginInformation { - /** - * Gets the nodeId property: ID of the compute node. - * - * @return the nodeId value. - */ - String nodeId(); - - /** - * Gets the ipAddress property: Public IP address of the compute node. - * - * @return the ipAddress value. - */ - String ipAddress(); - - /** - * Gets the port property: SSH port number of the node. - * - * @return the port value. - */ - Integer port(); - - /** - * Gets the inner com.azure.resourcemanager.batchai.fluent.models.RemoteLoginInformationInner object. - * - * @return the inner object. - */ - RemoteLoginInformationInner innerModel(); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/RemoteLoginInformationListResult.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/RemoteLoginInformationListResult.java deleted file mode 100644 index 0ea59bcdf2b7..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/RemoteLoginInformationListResult.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.fluent.models.RemoteLoginInformationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Values returned by the List operation. */ -@Immutable -public final class RemoteLoginInformationListResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(RemoteLoginInformationListResult.class); - - /* - * The collection of returned remote login details. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The continuation token. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: The collection of returned remote login details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The continuation token. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ResourceId.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ResourceId.java deleted file mode 100644 index 6b04c6f2e1be..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ResourceId.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet. */ -@Fluent -public final class ResourceId { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ResourceId.class); - - /* - * The ID of the resource - */ - @JsonProperty(value = "id", required = true) - private String id; - - /** - * Get the id property: The ID of the resource. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The ID of the resource. - * - * @param id the id value to set. - * @return the ResourceId object itself. - */ - public ResourceId withId(String id) { - this.id = id; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw logger - .logExceptionAsError(new IllegalArgumentException("Missing required property id in model ResourceId")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ScaleSettings.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ScaleSettings.java deleted file mode 100644 index e656a9f9f2d1..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ScaleSettings.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** - * At least one of manual or autoScale settings must be specified. Only one of manual or autoScale settings can be - * specified. If autoScale settings are specified, the system automatically scales the cluster up and down (within the - * supplied limits) based on the pending jobs on the cluster. - */ -@Fluent -public final class ScaleSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ScaleSettings.class); - - /* - * Manual scale settings for the cluster. - */ - @JsonProperty(value = "manual") - private ManualScaleSettings manual; - - /* - * Auto-scale settings for the cluster. - */ - @JsonProperty(value = "autoScale") - private AutoScaleSettings autoScale; - - /** - * Get the manual property: Manual scale settings for the cluster. - * - * @return the manual value. - */ - public ManualScaleSettings manual() { - return this.manual; - } - - /** - * Set the manual property: Manual scale settings for the cluster. - * - * @param manual the manual value to set. - * @return the ScaleSettings object itself. - */ - public ScaleSettings withManual(ManualScaleSettings manual) { - this.manual = manual; - return this; - } - - /** - * Get the autoScale property: Auto-scale settings for the cluster. - * - * @return the autoScale value. - */ - public AutoScaleSettings autoScale() { - return this.autoScale; - } - - /** - * Set the autoScale property: Auto-scale settings for the cluster. - * - * @param autoScale the autoScale value to set. - * @return the ScaleSettings object itself. - */ - public ScaleSettings withAutoScale(AutoScaleSettings autoScale) { - this.autoScale = autoScale; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (manual() != null) { - manual().validate(); - } - if (autoScale() != null) { - autoScale().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/SetupTask.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/SetupTask.java deleted file mode 100644 index 933523f75fe8..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/SetupTask.java +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Specifies a setup task which can be used to customize the compute nodes of the cluster. */ -@Fluent -public final class SetupTask { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SetupTask.class); - - /* - * The command line to be executed on each cluster's node after it being - * allocated or rebooted. The command is executed in a bash subshell as a - * root. - */ - @JsonProperty(value = "commandLine", required = true) - private String commandLine; - - /* - * A collection of user defined environment variables to be set for setup - * task. - */ - @JsonProperty(value = "environmentVariables") - private List environmentVariables; - - /* - * A collection of user defined environment variables with secret values to - * be set for the setup task. Server will never report values of these - * variables back. - */ - @JsonProperty(value = "secrets") - private List secrets; - - /* - * The prefix of a path where the Batch AI service will upload the stdout, - * stderr and execution log of the setup task. - */ - @JsonProperty(value = "stdOutErrPathPrefix", required = true) - private String stdOutErrPathPrefix; - - /* - * A path segment appended by Batch AI to stdOutErrPathPrefix to form a - * path where stdout, stderr and execution log of the setup task will be - * uploaded. Batch AI creates the setup task output directories under an - * unique path to avoid conflicts between different clusters. The full path - * can be obtained by concatenation of stdOutErrPathPrefix and - * stdOutErrPathSuffix. - */ - @JsonProperty(value = "stdOutErrPathSuffix", access = JsonProperty.Access.WRITE_ONLY) - private String stdOutErrPathSuffix; - - /** - * Get the commandLine property: The command line to be executed on each cluster's node after it being allocated or - * rebooted. The command is executed in a bash subshell as a root. - * - * @return the commandLine value. - */ - public String commandLine() { - return this.commandLine; - } - - /** - * Set the commandLine property: The command line to be executed on each cluster's node after it being allocated or - * rebooted. The command is executed in a bash subshell as a root. - * - * @param commandLine the commandLine value to set. - * @return the SetupTask object itself. - */ - public SetupTask withCommandLine(String commandLine) { - this.commandLine = commandLine; - return this; - } - - /** - * Get the environmentVariables property: A collection of user defined environment variables to be set for setup - * task. - * - * @return the environmentVariables value. - */ - public List environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: A collection of user defined environment variables to be set for setup - * task. - * - * @param environmentVariables the environmentVariables value to set. - * @return the SetupTask object itself. - */ - public SetupTask withEnvironmentVariables(List environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * Get the secrets property: A collection of user defined environment variables with secret values to be set for the - * setup task. Server will never report values of these variables back. - * - * @return the secrets value. - */ - public List secrets() { - return this.secrets; - } - - /** - * Set the secrets property: A collection of user defined environment variables with secret values to be set for the - * setup task. Server will never report values of these variables back. - * - * @param secrets the secrets value to set. - * @return the SetupTask object itself. - */ - public SetupTask withSecrets(List secrets) { - this.secrets = secrets; - return this; - } - - /** - * Get the stdOutErrPathPrefix property: The prefix of a path where the Batch AI service will upload the stdout, - * stderr and execution log of the setup task. - * - * @return the stdOutErrPathPrefix value. - */ - public String stdOutErrPathPrefix() { - return this.stdOutErrPathPrefix; - } - - /** - * Set the stdOutErrPathPrefix property: The prefix of a path where the Batch AI service will upload the stdout, - * stderr and execution log of the setup task. - * - * @param stdOutErrPathPrefix the stdOutErrPathPrefix value to set. - * @return the SetupTask object itself. - */ - public SetupTask withStdOutErrPathPrefix(String stdOutErrPathPrefix) { - this.stdOutErrPathPrefix = stdOutErrPathPrefix; - return this; - } - - /** - * Get the stdOutErrPathSuffix property: A path segment appended by Batch AI to stdOutErrPathPrefix to form a path - * where stdout, stderr and execution log of the setup task will be uploaded. Batch AI creates the setup task output - * directories under an unique path to avoid conflicts between different clusters. The full path can be obtained by - * concatenation of stdOutErrPathPrefix and stdOutErrPathSuffix. - * - * @return the stdOutErrPathSuffix value. - */ - public String stdOutErrPathSuffix() { - return this.stdOutErrPathSuffix; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (commandLine() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property commandLine in model SetupTask")); - } - if (environmentVariables() != null) { - environmentVariables().forEach(e -> e.validate()); - } - if (secrets() != null) { - secrets().forEach(e -> e.validate()); - } - if (stdOutErrPathPrefix() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property stdOutErrPathPrefix in model SetupTask")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/SshConfiguration.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/SshConfiguration.java deleted file mode 100644 index 4b7261d68d4e..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/SshConfiguration.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** SSH configuration. */ -@Fluent -public final class SshConfiguration { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SshConfiguration.class); - - /* - * List of source IP ranges to allow SSH connection from. The default value - * is '*' (all source IPs are allowed). Maximum number of IP ranges that - * can be specified is 400. - */ - @JsonProperty(value = "publicIPsToAllow") - private List publicIPsToAllow; - - /* - * Settings for administrator user account to be created on a node. The - * account can be used to establish SSH connection to the node. - */ - @JsonProperty(value = "userAccountSettings", required = true) - private UserAccountSettings userAccountSettings; - - /** - * Get the publicIPsToAllow property: List of source IP ranges to allow SSH connection from. The default value is - * '*' (all source IPs are allowed). Maximum number of IP ranges that can be specified is 400. - * - * @return the publicIPsToAllow value. - */ - public List publicIPsToAllow() { - return this.publicIPsToAllow; - } - - /** - * Set the publicIPsToAllow property: List of source IP ranges to allow SSH connection from. The default value is - * '*' (all source IPs are allowed). Maximum number of IP ranges that can be specified is 400. - * - * @param publicIPsToAllow the publicIPsToAllow value to set. - * @return the SshConfiguration object itself. - */ - public SshConfiguration withPublicIPsToAllow(List publicIPsToAllow) { - this.publicIPsToAllow = publicIPsToAllow; - return this; - } - - /** - * Get the userAccountSettings property: Settings for administrator user account to be created on a node. The - * account can be used to establish SSH connection to the node. - * - * @return the userAccountSettings value. - */ - public UserAccountSettings userAccountSettings() { - return this.userAccountSettings; - } - - /** - * Set the userAccountSettings property: Settings for administrator user account to be created on a node. The - * account can be used to establish SSH connection to the node. - * - * @param userAccountSettings the userAccountSettings value to set. - * @return the SshConfiguration object itself. - */ - public SshConfiguration withUserAccountSettings(UserAccountSettings userAccountSettings) { - this.userAccountSettings = userAccountSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userAccountSettings() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property userAccountSettings in model SshConfiguration")); - } else { - userAccountSettings().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/StorageAccountType.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/StorageAccountType.java deleted file mode 100644 index a913046bfe76..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/StorageAccountType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for StorageAccountType. */ -public final class StorageAccountType extends ExpandableStringEnum { - /** Static value Standard_LRS for StorageAccountType. */ - public static final StorageAccountType STANDARD_LRS = fromString("Standard_LRS"); - - /** Static value Premium_LRS for StorageAccountType. */ - public static final StorageAccountType PREMIUM_LRS = fromString("Premium_LRS"); - - /** - * Creates or finds a StorageAccountType from its string representation. - * - * @param name a name to look for. - * @return the corresponding StorageAccountType. - */ - @JsonCreator - public static StorageAccountType fromString(String name) { - return fromString(name, StorageAccountType.class); - } - - /** @return known StorageAccountType values. */ - public static Collection values() { - return values(StorageAccountType.class); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/TensorFlowSettings.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/TensorFlowSettings.java deleted file mode 100644 index 45df0cf26bfc..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/TensorFlowSettings.java +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** TensorFlow job settings. */ -@Fluent -public final class TensorFlowSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(TensorFlowSettings.class); - - /* - * The python script to execute. - */ - @JsonProperty(value = "pythonScriptFilePath", required = true) - private String pythonScriptFilePath; - - /* - * The path to the Python interpreter. - */ - @JsonProperty(value = "pythonInterpreterPath") - private String pythonInterpreterPath; - - /* - * Command line arguments that need to be passed to the python script for - * the master task. - */ - @JsonProperty(value = "masterCommandLineArgs") - private String masterCommandLineArgs; - - /* - * Command line arguments that need to be passed to the python script for - * the worker task. Optional for single process jobs. - */ - @JsonProperty(value = "workerCommandLineArgs") - private String workerCommandLineArgs; - - /* - * Command line arguments that need to be passed to the python script for - * the parameter server. Optional for single process jobs. - */ - @JsonProperty(value = "parameterServerCommandLineArgs") - private String parameterServerCommandLineArgs; - - /* - * The number of worker tasks. If specified, the value must be less than or - * equal to (nodeCount * numberOfGPUs per VM). If not specified, the - * default value is equal to nodeCount. This property can be specified only - * for distributed TensorFlow training. - */ - @JsonProperty(value = "workerCount") - private Integer workerCount; - - /* - * The number of parameter server tasks. If specified, the value must be - * less than or equal to nodeCount. If not specified, the default value is - * equal to 1 for distributed TensorFlow training. This property can be - * specified only for distributed TensorFlow training. - */ - @JsonProperty(value = "parameterServerCount") - private Integer parameterServerCount; - - /** - * Get the pythonScriptFilePath property: The python script to execute. - * - * @return the pythonScriptFilePath value. - */ - public String pythonScriptFilePath() { - return this.pythonScriptFilePath; - } - - /** - * Set the pythonScriptFilePath property: The python script to execute. - * - * @param pythonScriptFilePath the pythonScriptFilePath value to set. - * @return the TensorFlowSettings object itself. - */ - public TensorFlowSettings withPythonScriptFilePath(String pythonScriptFilePath) { - this.pythonScriptFilePath = pythonScriptFilePath; - return this; - } - - /** - * Get the pythonInterpreterPath property: The path to the Python interpreter. - * - * @return the pythonInterpreterPath value. - */ - public String pythonInterpreterPath() { - return this.pythonInterpreterPath; - } - - /** - * Set the pythonInterpreterPath property: The path to the Python interpreter. - * - * @param pythonInterpreterPath the pythonInterpreterPath value to set. - * @return the TensorFlowSettings object itself. - */ - public TensorFlowSettings withPythonInterpreterPath(String pythonInterpreterPath) { - this.pythonInterpreterPath = pythonInterpreterPath; - return this; - } - - /** - * Get the masterCommandLineArgs property: Command line arguments that need to be passed to the python script for - * the master task. - * - * @return the masterCommandLineArgs value. - */ - public String masterCommandLineArgs() { - return this.masterCommandLineArgs; - } - - /** - * Set the masterCommandLineArgs property: Command line arguments that need to be passed to the python script for - * the master task. - * - * @param masterCommandLineArgs the masterCommandLineArgs value to set. - * @return the TensorFlowSettings object itself. - */ - public TensorFlowSettings withMasterCommandLineArgs(String masterCommandLineArgs) { - this.masterCommandLineArgs = masterCommandLineArgs; - return this; - } - - /** - * Get the workerCommandLineArgs property: Command line arguments that need to be passed to the python script for - * the worker task. Optional for single process jobs. - * - * @return the workerCommandLineArgs value. - */ - public String workerCommandLineArgs() { - return this.workerCommandLineArgs; - } - - /** - * Set the workerCommandLineArgs property: Command line arguments that need to be passed to the python script for - * the worker task. Optional for single process jobs. - * - * @param workerCommandLineArgs the workerCommandLineArgs value to set. - * @return the TensorFlowSettings object itself. - */ - public TensorFlowSettings withWorkerCommandLineArgs(String workerCommandLineArgs) { - this.workerCommandLineArgs = workerCommandLineArgs; - return this; - } - - /** - * Get the parameterServerCommandLineArgs property: Command line arguments that need to be passed to the python - * script for the parameter server. Optional for single process jobs. - * - * @return the parameterServerCommandLineArgs value. - */ - public String parameterServerCommandLineArgs() { - return this.parameterServerCommandLineArgs; - } - - /** - * Set the parameterServerCommandLineArgs property: Command line arguments that need to be passed to the python - * script for the parameter server. Optional for single process jobs. - * - * @param parameterServerCommandLineArgs the parameterServerCommandLineArgs value to set. - * @return the TensorFlowSettings object itself. - */ - public TensorFlowSettings withParameterServerCommandLineArgs(String parameterServerCommandLineArgs) { - this.parameterServerCommandLineArgs = parameterServerCommandLineArgs; - return this; - } - - /** - * Get the workerCount property: The number of worker tasks. If specified, the value must be less than or equal to - * (nodeCount * numberOfGPUs per VM). If not specified, the default value is equal to nodeCount. This property can - * be specified only for distributed TensorFlow training. - * - * @return the workerCount value. - */ - public Integer workerCount() { - return this.workerCount; - } - - /** - * Set the workerCount property: The number of worker tasks. If specified, the value must be less than or equal to - * (nodeCount * numberOfGPUs per VM). If not specified, the default value is equal to nodeCount. This property can - * be specified only for distributed TensorFlow training. - * - * @param workerCount the workerCount value to set. - * @return the TensorFlowSettings object itself. - */ - public TensorFlowSettings withWorkerCount(Integer workerCount) { - this.workerCount = workerCount; - return this; - } - - /** - * Get the parameterServerCount property: The number of parameter server tasks. If specified, the value must be less - * than or equal to nodeCount. If not specified, the default value is equal to 1 for distributed TensorFlow - * training. This property can be specified only for distributed TensorFlow training. - * - * @return the parameterServerCount value. - */ - public Integer parameterServerCount() { - return this.parameterServerCount; - } - - /** - * Set the parameterServerCount property: The number of parameter server tasks. If specified, the value must be less - * than or equal to nodeCount. If not specified, the default value is equal to 1 for distributed TensorFlow - * training. This property can be specified only for distributed TensorFlow training. - * - * @param parameterServerCount the parameterServerCount value to set. - * @return the TensorFlowSettings object itself. - */ - public TensorFlowSettings withParameterServerCount(Integer parameterServerCount) { - this.parameterServerCount = parameterServerCount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (pythonScriptFilePath() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property pythonScriptFilePath in model TensorFlowSettings")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ToolType.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ToolType.java deleted file mode 100644 index 66d4781fe563..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/ToolType.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ToolType. */ -public final class ToolType extends ExpandableStringEnum { - /** Static value cntk for ToolType. */ - public static final ToolType CNTK = fromString("cntk"); - - /** Static value tensorflow for ToolType. */ - public static final ToolType TENSORFLOW = fromString("tensorflow"); - - /** Static value caffe for ToolType. */ - public static final ToolType CAFFE = fromString("caffe"); - - /** Static value caffe2 for ToolType. */ - public static final ToolType CAFFE2 = fromString("caffe2"); - - /** Static value chainer for ToolType. */ - public static final ToolType CHAINER = fromString("chainer"); - - /** Static value horovod for ToolType. */ - public static final ToolType HOROVOD = fromString("horovod"); - - /** Static value custommpi for ToolType. */ - public static final ToolType CUSTOMMPI = fromString("custommpi"); - - /** Static value custom for ToolType. */ - public static final ToolType CUSTOM = fromString("custom"); - - /** - * Creates or finds a ToolType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ToolType. - */ - @JsonCreator - public static ToolType fromString(String name) { - return fromString(name, ToolType.class); - } - - /** @return known ToolType values. */ - public static Collection values() { - return values(ToolType.class); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/UnmanagedFileSystemReference.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/UnmanagedFileSystemReference.java deleted file mode 100644 index b5e89a93f0a3..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/UnmanagedFileSystemReference.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Unmanaged file system mounting configuration. */ -@Fluent -public final class UnmanagedFileSystemReference { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(UnmanagedFileSystemReference.class); - - /* - * Mount command line. Note, Batch AI will append mount path to the command - * on its own. - */ - @JsonProperty(value = "mountCommand", required = true) - private String mountCommand; - - /* - * The relative path on the compute node where the unmanaged file system - * will be mounted. Note that all cluster level unmanaged file systems will - * be mounted under $AZ_BATCHAI_MOUNT_ROOT location and all job level - * unmanaged file systems will be mounted under $AZ_BATCHAI_JOB_MOUNT_ROOT. - */ - @JsonProperty(value = "relativeMountPath", required = true) - private String relativeMountPath; - - /** - * Get the mountCommand property: Mount command line. Note, Batch AI will append mount path to the command on its - * own. - * - * @return the mountCommand value. - */ - public String mountCommand() { - return this.mountCommand; - } - - /** - * Set the mountCommand property: Mount command line. Note, Batch AI will append mount path to the command on its - * own. - * - * @param mountCommand the mountCommand value to set. - * @return the UnmanagedFileSystemReference object itself. - */ - public UnmanagedFileSystemReference withMountCommand(String mountCommand) { - this.mountCommand = mountCommand; - return this; - } - - /** - * Get the relativeMountPath property: The relative path on the compute node where the unmanaged file system will be - * mounted. Note that all cluster level unmanaged file systems will be mounted under $AZ_BATCHAI_MOUNT_ROOT location - * and all job level unmanaged file systems will be mounted under $AZ_BATCHAI_JOB_MOUNT_ROOT. - * - * @return the relativeMountPath value. - */ - public String relativeMountPath() { - return this.relativeMountPath; - } - - /** - * Set the relativeMountPath property: The relative path on the compute node where the unmanaged file system will be - * mounted. Note that all cluster level unmanaged file systems will be mounted under $AZ_BATCHAI_MOUNT_ROOT location - * and all job level unmanaged file systems will be mounted under $AZ_BATCHAI_JOB_MOUNT_ROOT. - * - * @param relativeMountPath the relativeMountPath value to set. - * @return the UnmanagedFileSystemReference object itself. - */ - public UnmanagedFileSystemReference withRelativeMountPath(String relativeMountPath) { - this.relativeMountPath = relativeMountPath; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (mountCommand() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property mountCommand in model UnmanagedFileSystemReference")); - } - if (relativeMountPath() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property relativeMountPath in model UnmanagedFileSystemReference")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Usage.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Usage.java deleted file mode 100644 index 1b10e39ab5fd..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Usage.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.resourcemanager.batchai.fluent.models.UsageInner; - -/** An immutable client-side representation of Usage. */ -public interface Usage { - /** - * Gets the unit property: An enum describing the unit of usage measurement. - * - * @return the unit value. - */ - UsageUnit unit(); - - /** - * Gets the currentValue property: The current usage of the resource. - * - * @return the currentValue value. - */ - Integer currentValue(); - - /** - * Gets the limit property: The maximum permitted usage of the resource. - * - * @return the limit value. - */ - Long limit(); - - /** - * Gets the name property: The name of the type of usage. - * - * @return the name value. - */ - UsageName name(); - - /** - * Gets the inner com.azure.resourcemanager.batchai.fluent.models.UsageInner object. - * - * @return the inner object. - */ - UsageInner innerModel(); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/UsageName.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/UsageName.java deleted file mode 100644 index bf7861ec8895..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/UsageName.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** The Usage Names. */ -@Immutable -public final class UsageName { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(UsageName.class); - - /* - * The name of the resource. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private String value; - - /* - * The localized name of the resource. - */ - @JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY) - private String localizedValue; - - /** - * Get the value property: The name of the resource. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Get the localizedValue property: The localized name of the resource. - * - * @return the localizedValue value. - */ - public String localizedValue() { - return this.localizedValue; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/UsageUnit.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/UsageUnit.java deleted file mode 100644 index 3e866ebb8213..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/UsageUnit.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for UsageUnit. */ -public final class UsageUnit extends ExpandableStringEnum { - /** Static value Count for UsageUnit. */ - public static final UsageUnit COUNT = fromString("Count"); - - /** - * Creates or finds a UsageUnit from its string representation. - * - * @param name a name to look for. - * @return the corresponding UsageUnit. - */ - @JsonCreator - public static UsageUnit fromString(String name) { - return fromString(name, UsageUnit.class); - } - - /** @return known UsageUnit values. */ - public static Collection values() { - return values(UsageUnit.class); - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Usages.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Usages.java deleted file mode 100644 index eed91ce5a16a..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Usages.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of Usages. */ -public interface Usages { - /** - * Gets the current usage information as well as limits for Batch AI resources for given subscription. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for Batch AI resources for given subscription. - */ - PagedIterable list(String location); - - /** - * Gets the current usage information as well as limits for Batch AI resources for given subscription. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for Batch AI resources for given subscription. - */ - PagedIterable list(String location, Context context); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/UserAccountSettings.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/UserAccountSettings.java deleted file mode 100644 index 54af8a2f2e47..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/UserAccountSettings.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** Settings for user account that gets created on each on the nodes of a cluster. */ -@Fluent -public final class UserAccountSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(UserAccountSettings.class); - - /* - * Name of the administrator user account which can be used to SSH to - * nodes. - */ - @JsonProperty(value = "adminUserName", required = true) - private String adminUsername; - - /* - * SSH public key of the administrator user account. - */ - @JsonProperty(value = "adminUserSshPublicKey") - private String adminUserSshPublicKey; - - /* - * Password of the administrator user account. - */ - @JsonProperty(value = "adminUserPassword") - private String adminUserPassword; - - /** - * Get the adminUsername property: Name of the administrator user account which can be used to SSH to nodes. - * - * @return the adminUsername value. - */ - public String adminUsername() { - return this.adminUsername; - } - - /** - * Set the adminUsername property: Name of the administrator user account which can be used to SSH to nodes. - * - * @param adminUsername the adminUsername value to set. - * @return the UserAccountSettings object itself. - */ - public UserAccountSettings withAdminUsername(String adminUsername) { - this.adminUsername = adminUsername; - return this; - } - - /** - * Get the adminUserSshPublicKey property: SSH public key of the administrator user account. - * - * @return the adminUserSshPublicKey value. - */ - public String adminUserSshPublicKey() { - return this.adminUserSshPublicKey; - } - - /** - * Set the adminUserSshPublicKey property: SSH public key of the administrator user account. - * - * @param adminUserSshPublicKey the adminUserSshPublicKey value to set. - * @return the UserAccountSettings object itself. - */ - public UserAccountSettings withAdminUserSshPublicKey(String adminUserSshPublicKey) { - this.adminUserSshPublicKey = adminUserSshPublicKey; - return this; - } - - /** - * Get the adminUserPassword property: Password of the administrator user account. - * - * @return the adminUserPassword value. - */ - public String adminUserPassword() { - return this.adminUserPassword; - } - - /** - * Set the adminUserPassword property: Password of the administrator user account. - * - * @param adminUserPassword the adminUserPassword value to set. - * @return the UserAccountSettings object itself. - */ - public UserAccountSettings withAdminUserPassword(String adminUserPassword) { - this.adminUserPassword = adminUserPassword; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (adminUsername() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property adminUsername in model UserAccountSettings")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/VirtualMachineConfiguration.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/VirtualMachineConfiguration.java deleted file mode 100644 index 78b8e7f9a512..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/VirtualMachineConfiguration.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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; - -/** VM configuration. */ -@Fluent -public final class VirtualMachineConfiguration { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(VirtualMachineConfiguration.class); - - /* - * OS image reference for cluster nodes. - */ - @JsonProperty(value = "imageReference") - private ImageReference imageReference; - - /** - * Get the imageReference property: OS image reference for cluster nodes. - * - * @return the imageReference value. - */ - public ImageReference imageReference() { - return this.imageReference; - } - - /** - * Set the imageReference property: OS image reference for cluster nodes. - * - * @param imageReference the imageReference value to set. - * @return the VirtualMachineConfiguration object itself. - */ - public VirtualMachineConfiguration withImageReference(ImageReference imageReference) { - this.imageReference = imageReference; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (imageReference() != null) { - imageReference().validate(); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/VmPriority.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/VmPriority.java deleted file mode 100644 index 8434d821e56a..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/VmPriority.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for VmPriority. */ -public enum VmPriority { - /** Enum value dedicated. */ - DEDICATED("dedicated"), - - /** Enum value lowpriority. */ - LOWPRIORITY("lowpriority"); - - /** The actual serialized value for a VmPriority instance. */ - private final String value; - - VmPriority(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a VmPriority instance. - * - * @param value the serialized value to parse. - * @return the parsed VmPriority object, or null if unable to parse. - */ - @JsonCreator - public static VmPriority fromString(String value) { - VmPriority[] items = VmPriority.values(); - for (VmPriority item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Workspace.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Workspace.java deleted file mode 100644 index c14b19ec0b97..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Workspace.java +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batchai.fluent.models.WorkspaceInner; -import java.time.OffsetDateTime; -import java.util.Map; - -/** An immutable client-side representation of Workspace. */ -public interface Workspace { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the 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 creationTime property: Time when the Workspace was created. - * - * @return the creationTime value. - */ - OffsetDateTime creationTime(); - - /** - * Gets the provisioningState property: The provisioned state of the Workspace. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the provisioningStateTransitionTime property: The time at which the workspace entered its current - * provisioning state. - * - * @return the provisioningStateTransitionTime value. - */ - OffsetDateTime provisioningStateTransitionTime(); - - /** - * 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.batchai.fluent.models.WorkspaceInner object. - * - * @return the inner object. - */ - WorkspaceInner innerModel(); - - /** The entirety of the Workspace definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** The Workspace definition stages. */ - interface DefinitionStages { - /** The first stage of the Workspace definition. */ - interface Blank extends WithLocation { - } - - /** The stage of the Workspace definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The region in which to create the Workspace. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The region in which to create the Workspace. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** The stage of the Workspace definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the Workspace definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags { - /** - * Executes the create request. - * - * @return the created resource. - */ - Workspace create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Workspace create(Context context); - } - - /** The stage of the Workspace definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: The user specified tags associated with the Workspace.. - * - * @param tags The user specified tags associated with the Workspace. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - } - - /** - * Begins update for the Workspace resource. - * - * @return the stage of resource update. - */ - Workspace.Update update(); - - /** The template for Workspace update. */ - interface Update extends UpdateStages.WithTags { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Workspace apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Workspace apply(Context context); - } - - /** The Workspace update stages. */ - interface UpdateStages { - /** The stage of the Workspace update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: The user specified tags associated with the Workspace.. - * - * @param tags The user specified tags associated with the Workspace. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Workspace refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Workspace refresh(Context context); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/WorkspaceCreateParameters.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/WorkspaceCreateParameters.java deleted file mode 100644 index b73549a7d619..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/WorkspaceCreateParameters.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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.Map; - -/** Workspace creation parameters. */ -@Fluent -public final class WorkspaceCreateParameters { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(WorkspaceCreateParameters.class); - - /* - * The region in which to create the Workspace. - */ - @JsonProperty(value = "location", required = true) - private String location; - - /* - * The user specified tags associated with the Workspace. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * Get the location property: The region in which to create the Workspace. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The region in which to create the Workspace. - * - * @param location the location value to set. - * @return the WorkspaceCreateParameters object itself. - */ - public WorkspaceCreateParameters withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tags property: The user specified tags associated with the Workspace. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The user specified tags associated with the Workspace. - * - * @param tags the tags value to set. - * @return the WorkspaceCreateParameters object itself. - */ - public WorkspaceCreateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (location() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property location in model WorkspaceCreateParameters")); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/WorkspaceListResult.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/WorkspaceListResult.java deleted file mode 100644 index bf69c7ad2dbd..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/WorkspaceListResult.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batchai.fluent.models.WorkspaceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Values returned by the List operation. */ -@Immutable -public final class WorkspaceListResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(WorkspaceListResult.class); - - /* - * The collection of workspaces. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The continuation token. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: The collection of workspaces. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The continuation token. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/WorkspaceUpdateParameters.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/WorkspaceUpdateParameters.java deleted file mode 100644 index 9da7d224021d..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/WorkspaceUpdateParameters.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.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.Map; - -/** Workspace update parameters. */ -@Fluent -public final class WorkspaceUpdateParameters { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(WorkspaceUpdateParameters.class); - - /* - * The user specified tags associated with the Workspace. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * Get the tags property: The user specified tags associated with the Workspace. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The user specified tags associated with the Workspace. - * - * @param tags the tags value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters 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/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Workspaces.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Workspaces.java deleted file mode 100644 index 50cce8c77288..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/Workspaces.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batchai.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Workspaces. */ -public interface Workspaces { - /** - * Gets a list of Workspaces associated with the given subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces associated with the given subscription. - */ - PagedIterable list(); - - /** - * Gets a list of Workspaces associated with the given subscription. - * - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces associated with the given subscription. - */ - PagedIterable list(Integer maxResults, Context context); - - /** - * Gets a list of Workspaces within the specified resource group. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces within the specified resource group. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Gets a list of Workspaces within the specified resource group. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Workspaces within the specified resource group. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Integer maxResults, Context context); - - /** - * Deletes a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String workspaceName); - - /** - * Deletes a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets information about a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Workspace. - */ - Workspace getByResourceGroup(String resourceGroupName, String workspaceName); - - /** - * Gets information about a Workspace. - * - * @param resourceGroupName Name of the resource group to which the resource belongs. - * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric - * characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 a Workspace. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets information about a Workspace. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a Workspace. - */ - Workspace getById(String id); - - /** - * Gets information about a Workspace. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a Workspace. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a Workspace. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a Workspace. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Workspace resource. - * - * @param name resource name. - * @return the first stage of the new Workspace definition. - */ - Workspace.DefinitionStages.Blank define(String name); -} diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/package-info.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/package-info.java deleted file mode 100644 index ae977b5e267a..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/models/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the data models for BatchAI. The Azure BatchAI Management API. */ -package com.azure.resourcemanager.batchai.models; diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/package-info.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/package-info.java deleted file mode 100644 index 6f4d488850cb..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the classes for BatchAI. The Azure BatchAI Management API. */ -package com.azure.resourcemanager.batchai; diff --git a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/module-info.java b/sdk/batchai/azure-resourcemanager-batchai/src/main/java/module-info.java deleted file mode 100644 index 692657b0dda1..000000000000 --- a/sdk/batchai/azure-resourcemanager-batchai/src/main/java/module-info.java +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -module com.azure.resourcemanager.batchai { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.batchai; - exports com.azure.resourcemanager.batchai.fluent; - exports com.azure.resourcemanager.batchai.fluent.models; - exports com.azure.resourcemanager.batchai.models; - - opens com.azure.resourcemanager.batchai.fluent.models to com.azure.core, com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.batchai.models to com.azure.core, com.fasterxml.jackson.databind; -} diff --git a/sdk/batchai/ci.yml b/sdk/batchai/ci.yml deleted file mode 100644 index e88aaaa96de8..000000000000 --- a/sdk/batchai/ci.yml +++ /dev/null @@ -1,39 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - -trigger: - branches: - include: - - main - - hotfix/* - - release/* - paths: - include: - - sdk/batchai/ci.yml - - sdk/batchai/azure-resourcemanager-batchai/ - exclude: - - sdk/batchai/pom.xml - - sdk/batchai/azure-resourcemanager-batchai/pom.xml - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/batchai/ci.yml - - sdk/batchai/azure-resourcemanager-batchai/ - exclude: - - sdk/batchai/pom.xml - - sdk/batchai/azure-resourcemanager-batchai/pom.xml - -extends: - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: batchai - Artifacts: - - name: azure-resourcemanager-batchai - groupId: com.azure.resourcemanager - safeName: azureresourcemanagerbatchai diff --git a/sdk/batchai/pom.xml b/sdk/batchai/pom.xml deleted file mode 100644 index 9165352f6c12..000000000000 --- a/sdk/batchai/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - com.azure - azure-batchai-service - pom - 1.0.0 - - - azure-resourcemanager-batchai - - diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/CHANGELOG.md b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/CHANGELOG.md deleted file mode 100644 index 41c62a9ca98f..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/CHANGELOG.md +++ /dev/null @@ -1,8 +0,0 @@ -# Release History - -## 1.0.0-beta.2 (Unreleased) - - -## 1.0.0-beta.1 (2021-04-16) - -- Azure Resource Manager MachineLearningServices client library for Java. This package contains Microsoft Azure SDK for MachineLearningServices Management SDK. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-2021-04-01. 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/machinelearningservices/azure-resourcemanager-machinelearningservices/README.md b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/README.md deleted file mode 100644 index 375bc9afeb1d..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/README.md +++ /dev/null @@ -1,99 +0,0 @@ -# Azure Resource Manager MachineLearningServices client library for Java - -Azure Resource Manager MachineLearningServices client library for Java. - -This package contains Microsoft Azure SDK for MachineLearningServices Management SDK. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-2021-04-01. 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-machinelearningservices;current}) -```xml - - com.azure.resourcemanager - azure-resourcemanager-machinelearningservices - 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(); -MachineLearningServicesManager manager = MachineLearningServicesManager - .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 - -## 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://learn.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/machinelearningservices/azure-resourcemanager-machinelearningservices/pom.xml b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/pom.xml deleted file mode 100644 index 34080a2dae45..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ - - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - - - com.azure.resourcemanager - azure-resourcemanager-machinelearningservices - 1.0.0-beta.2 - jar - - Microsoft Azure SDK for MachineLearningServices Management - This package contains Microsoft Azure SDK for MachineLearningServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. These APIs allow end users to operate on Azure - Machine Learning Workspace resources. Package tag package-2021-04-01. - - 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 - - - - - - com.azure - azure-core - 1.54.1 - - - com.azure - azure-core-management - 1.15.6 - - - diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/MachineLearningServicesManager.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/MachineLearningServicesManager.java deleted file mode 100644 index f16634ab3d99..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/MachineLearningServicesManager.java +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices; - -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.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; -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.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.AzureMachineLearningWorkspaces; -import com.azure.resourcemanager.machinelearningservices.implementation.AzureMachineLearningWorkspacesBuilder; -import com.azure.resourcemanager.machinelearningservices.implementation.MachineLearningComputesImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.MachineLearningServicesImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.NotebooksImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.OperationsImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.PrivateEndpointConnectionsImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.PrivateLinkResourcesImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.QuotasImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.StorageAccountsImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.UsagesImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.VirtualMachineSizesImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.WorkspaceConnectionsImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.WorkspaceFeaturesImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.WorkspaceOperationsImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.WorkspacesImpl; -import com.azure.resourcemanager.machinelearningservices.models.MachineLearningComputes; -import com.azure.resourcemanager.machinelearningservices.models.MachineLearningServices; -import com.azure.resourcemanager.machinelearningservices.models.Notebooks; -import com.azure.resourcemanager.machinelearningservices.models.Operations; -import com.azure.resourcemanager.machinelearningservices.models.PrivateEndpointConnections; -import com.azure.resourcemanager.machinelearningservices.models.PrivateLinkResources; -import com.azure.resourcemanager.machinelearningservices.models.Quotas; -import com.azure.resourcemanager.machinelearningservices.models.StorageAccounts; -import com.azure.resourcemanager.machinelearningservices.models.Usages; -import com.azure.resourcemanager.machinelearningservices.models.VirtualMachineSizes; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceConnections; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceFeatures; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceOperations; -import com.azure.resourcemanager.machinelearningservices.models.Workspaces; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** - * Entry point to MachineLearningServicesManager. These APIs allow end users to operate on Azure Machine Learning - * Workspace resources. - */ -public final class MachineLearningServicesManager { - private Operations operations; - - private Workspaces workspaces; - - private WorkspaceFeatures workspaceFeatures; - - private Usages usages; - - private VirtualMachineSizes virtualMachineSizes; - - private Quotas quotas; - - private MachineLearningComputes machineLearningComputes; - - private WorkspaceOperations workspaceOperations; - - private PrivateEndpointConnections privateEndpointConnections; - - private PrivateLinkResources privateLinkResources; - - private MachineLearningServices machineLearningServices; - - private Notebooks notebooks; - - private StorageAccounts storageAccounts; - - private WorkspaceConnections workspaceConnections; - - private final AzureMachineLearningWorkspaces clientObject; - - private MachineLearningServicesManager(HttpPipeline httpPipeline, AzureProfile profile, - Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new AzureMachineLearningWorkspacesBuilder().pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of MachineLearningServices service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the MachineLearningServices service API instance. - */ - public static MachineLearningServicesManager 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 MachineLearningServicesManager with optional - * configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new MachineLearningServicesManager.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 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; - } - - /** - * 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 MachineLearningServices service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the MachineLearningServices service API instance. - */ - public MachineLearningServicesManager 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.machinelearningservices") - .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 (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new RequestIdPolicy()); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new BearerTokenAuthenticationPolicy(credential, - profile.getEnvironment().getManagementEndpoint() + "/.default")); - policies.addAll(this.policies); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new MachineLearningServicesManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** @return Resource collection API of Operations. */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** @return Resource collection API of Workspaces. */ - public Workspaces workspaces() { - if (this.workspaces == null) { - this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this); - } - return workspaces; - } - - /** @return Resource collection API of WorkspaceFeatures. */ - public WorkspaceFeatures workspaceFeatures() { - if (this.workspaceFeatures == null) { - this.workspaceFeatures = new WorkspaceFeaturesImpl(clientObject.getWorkspaceFeatures(), this); - } - return workspaceFeatures; - } - - /** @return Resource collection API of Usages. */ - public Usages usages() { - if (this.usages == null) { - this.usages = new UsagesImpl(clientObject.getUsages(), this); - } - return usages; - } - - /** @return Resource collection API of VirtualMachineSizes. */ - public VirtualMachineSizes virtualMachineSizes() { - if (this.virtualMachineSizes == null) { - this.virtualMachineSizes = new VirtualMachineSizesImpl(clientObject.getVirtualMachineSizes(), this); - } - return virtualMachineSizes; - } - - /** @return Resource collection API of Quotas. */ - public Quotas quotas() { - if (this.quotas == null) { - this.quotas = new QuotasImpl(clientObject.getQuotas(), this); - } - return quotas; - } - - /** @return Resource collection API of MachineLearningComputes. */ - public MachineLearningComputes machineLearningComputes() { - if (this.machineLearningComputes == null) { - this.machineLearningComputes - = new MachineLearningComputesImpl(clientObject.getMachineLearningComputes(), this); - } - return machineLearningComputes; - } - - /** @return Resource collection API of WorkspaceOperations. */ - public WorkspaceOperations workspaceOperations() { - if (this.workspaceOperations == null) { - this.workspaceOperations = new WorkspaceOperationsImpl(clientObject.getWorkspaceOperations(), this); - } - return workspaceOperations; - } - - /** @return Resource collection API of PrivateEndpointConnections. */ - public PrivateEndpointConnections privateEndpointConnections() { - if (this.privateEndpointConnections == null) { - this.privateEndpointConnections - = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); - } - return privateEndpointConnections; - } - - /** @return Resource collection API of PrivateLinkResources. */ - public PrivateLinkResources privateLinkResources() { - if (this.privateLinkResources == null) { - this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); - } - return privateLinkResources; - } - - /** @return Resource collection API of MachineLearningServices. */ - public MachineLearningServices machineLearningServices() { - if (this.machineLearningServices == null) { - this.machineLearningServices - = new MachineLearningServicesImpl(clientObject.getMachineLearningServices(), this); - } - return machineLearningServices; - } - - /** @return Resource collection API of Notebooks. */ - public Notebooks notebooks() { - if (this.notebooks == null) { - this.notebooks = new NotebooksImpl(clientObject.getNotebooks(), this); - } - return notebooks; - } - - /** @return Resource collection API of StorageAccounts. */ - public StorageAccounts storageAccounts() { - if (this.storageAccounts == null) { - this.storageAccounts = new StorageAccountsImpl(clientObject.getStorageAccounts(), this); - } - return storageAccounts; - } - - /** @return Resource collection API of WorkspaceConnections. */ - public WorkspaceConnections workspaceConnections() { - if (this.workspaceConnections == null) { - this.workspaceConnections = new WorkspaceConnectionsImpl(clientObject.getWorkspaceConnections(), this); - } - return workspaceConnections; - } - - /** - * @return Wrapped service client AzureMachineLearningWorkspaces providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. - */ - public AzureMachineLearningWorkspaces serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/AzureMachineLearningWorkspaces.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/AzureMachineLearningWorkspaces.java deleted file mode 100644 index af14f5759361..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/AzureMachineLearningWorkspaces.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** The interface for AzureMachineLearningWorkspaces class. */ -public interface AzureMachineLearningWorkspaces { - /** - * Gets Azure subscription identifier. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the WorkspacesClient object to access its operations. - * - * @return the WorkspacesClient object. - */ - WorkspacesClient getWorkspaces(); - - /** - * Gets the WorkspaceFeaturesClient object to access its operations. - * - * @return the WorkspaceFeaturesClient object. - */ - WorkspaceFeaturesClient getWorkspaceFeatures(); - - /** - * Gets the UsagesClient object to access its operations. - * - * @return the UsagesClient object. - */ - UsagesClient getUsages(); - - /** - * Gets the VirtualMachineSizesClient object to access its operations. - * - * @return the VirtualMachineSizesClient object. - */ - VirtualMachineSizesClient getVirtualMachineSizes(); - - /** - * Gets the QuotasClient object to access its operations. - * - * @return the QuotasClient object. - */ - QuotasClient getQuotas(); - - /** - * Gets the MachineLearningComputesClient object to access its operations. - * - * @return the MachineLearningComputesClient object. - */ - MachineLearningComputesClient getMachineLearningComputes(); - - /** - * Gets the WorkspaceOperationsClient object to access its operations. - * - * @return the WorkspaceOperationsClient object. - */ - WorkspaceOperationsClient getWorkspaceOperations(); - - /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. - * - * @return the PrivateEndpointConnectionsClient object. - */ - PrivateEndpointConnectionsClient getPrivateEndpointConnections(); - - /** - * Gets the PrivateLinkResourcesClient object to access its operations. - * - * @return the PrivateLinkResourcesClient object. - */ - PrivateLinkResourcesClient getPrivateLinkResources(); - - /** - * Gets the MachineLearningServicesClient object to access its operations. - * - * @return the MachineLearningServicesClient object. - */ - MachineLearningServicesClient getMachineLearningServices(); - - /** - * Gets the NotebooksClient object to access its operations. - * - * @return the NotebooksClient object. - */ - NotebooksClient getNotebooks(); - - /** - * Gets the StorageAccountsClient object to access its operations. - * - * @return the StorageAccountsClient object. - */ - StorageAccountsClient getStorageAccounts(); - - /** - * Gets the WorkspaceConnectionsClient object to access its operations. - * - * @return the WorkspaceConnectionsClient object. - */ - WorkspaceConnectionsClient getWorkspaceConnections(); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/MachineLearningComputesClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/MachineLearningComputesClient.java deleted file mode 100644 index b3d099a16a10..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/MachineLearningComputesClient.java +++ /dev/null @@ -1,494 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.ComputeResourceInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeSecretsInner; -import com.azure.resourcemanager.machinelearningservices.models.AmlComputeNodeInformation; -import com.azure.resourcemanager.machinelearningservices.models.ClusterUpdateParameters; -import com.azure.resourcemanager.machinelearningservices.models.UnderlyingResourceAction; - -/** An instance of this class provides access to all the operations defined in MachineLearningComputesClient. */ -public interface MachineLearningComputesClient { - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, String skip, - Context context); - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner get(String resourceGroupName, String workspaceName, String computeName); - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String computeName, - Context context); - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ComputeResourceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String computeName, ComputeResourceInner parameters); - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ComputeResourceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String computeName, ComputeResourceInner parameters, Context context); - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String computeName, - ComputeResourceInner parameters); - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String computeName, - ComputeResourceInner parameters, Context context); - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ComputeResourceInner> beginUpdate(String resourceGroupName, - String workspaceName, String computeName, ClusterUpdateParameters parameters); - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ComputeResourceInner> beginUpdate(String resourceGroupName, - String workspaceName, String computeName, ClusterUpdateParameters parameters, Context context); - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner update(String resourceGroupName, String workspaceName, String computeName, - ClusterUpdateParameters parameters); - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner update(String resourceGroupName, String workspaceName, String computeName, - ClusterUpdateParameters parameters, Context context); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction, Context context); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction, Context context); - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName); - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName, Context context); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeSecretsInner listKeys(String resourceGroupName, String workspaceName, String computeName); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse(String resourceGroupName, String workspaceName, - String computeName, Context context); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginStart(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginStart(String resourceGroupName, String workspaceName, String computeName, - Context context); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void start(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void start(String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginStop(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginStop(String resourceGroupName, String workspaceName, String computeName, - Context context); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void restart(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response restartWithResponse(String resourceGroupName, String workspaceName, String computeName, - Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/MachineLearningServicesClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/MachineLearningServicesClient.java deleted file mode 100644 index f0faeeb65916..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/MachineLearningServicesClient.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.ServiceResourceInner; -import com.azure.resourcemanager.machinelearningservices.models.CreateServiceRequest; -import com.azure.resourcemanager.machinelearningservices.models.OrderString; - -/** An instance of this class provides access to all the operations defined in MachineLearningServicesClient. */ -public interface MachineLearningServicesClient { - /** - * Gets services in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); - - /** - * Gets services in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param modelId The Model Id. - * @param modelName The Model name. - * @param tag The object tag. - * @param tags A set of tags with which to filter the returned services. It is a comma separated string of tags key - * or tags key=value Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned services. It is a comma separated string - * of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param runId runId for model associated with service. - * @param expand Set to True to include Model details. - * @param orderby The option to order the response. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, String skip, - String modelId, String modelName, String tag, String tags, String properties, String runId, Boolean expand, - OrderString orderby, Context context); - - /** - * Get a Service by name. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServiceResourceInner get(String resourceGroupName, String workspaceName, String serviceName); - - /** - * Get a Service by name. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param expand Set to True to include Model details. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String serviceName, - Boolean expand, Context context); - - /** - * Delete a specific Service.. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String serviceName); - - /** - * Delete a specific Service.. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String serviceName, - Context context); - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ServiceResourceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String serviceName, CreateServiceRequest properties); - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ServiceResourceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String serviceName, CreateServiceRequest properties, Context context); - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServiceResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String serviceName, - CreateServiceRequest properties); - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServiceResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String serviceName, - CreateServiceRequest properties, Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/NotebooksClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/NotebooksClient.java deleted file mode 100644 index 0cf507478547..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/NotebooksClient.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -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.machinelearningservices.fluent.models.ListNotebookKeysResultInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookResourceInfoInner; - -/** An instance of this class provides access to all the operations defined in NotebooksClient. */ -public interface NotebooksClient { - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, NotebookResourceInfoInner> beginPrepare(String resourceGroupName, - String workspaceName); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, NotebookResourceInfoInner> beginPrepare(String resourceGroupName, - String workspaceName, Context context); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NotebookResourceInfoInner prepare(String resourceGroupName, String workspaceName); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NotebookResourceInfoInner prepare(String resourceGroupName, String workspaceName, Context context); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ListNotebookKeysResultInner listKeys(String resourceGroupName, String workspaceName); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse(String resourceGroupName, String workspaceName, - Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/OperationsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/OperationsClient.java deleted file mode 100644 index e6a69f11283d..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/OperationsClient.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.OperationInner; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public interface OperationsClient { - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of operations supported by the resource provider. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of operations supported by the resource provider. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/PrivateEndpointConnectionsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/PrivateEndpointConnectionsClient.java deleted file mode 100644 index 01a4214ea901..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/PrivateEndpointConnectionsClient.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.PrivateEndpointConnectionInner; - -/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ -public interface PrivateEndpointConnectionsClient { - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName); - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context); - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner put(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner properties); - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response putWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner properties, Context context); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/PrivateLinkResourcesClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/PrivateLinkResourcesClient.java deleted file mode 100644 index 44ce8c7974f3..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/PrivateLinkResourcesClient.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.PrivateLinkResourceListResultInner; - -/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ -public interface PrivateLinkResourcesClient { - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceListResultInner listByWorkspace(String resourceGroupName, String workspaceName); - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listByWorkspaceWithResponse(String resourceGroupName, - String workspaceName, Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/QuotasClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/QuotasClient.java deleted file mode 100644 index 38f3d1826c9b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/QuotasClient.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ResourceQuotaInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.UpdateWorkspaceQuotasResultInner; -import com.azure.resourcemanager.machinelearningservices.models.QuotaUpdateParameters; - -/** An instance of this class provides access to all the operations defined in QuotasClient. */ -public interface QuotasClient { - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - UpdateWorkspaceQuotasResultInner update(String location, QuotaUpdateParameters parameters); - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String location, QuotaUpdateParameters parameters, - Context context); - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location); - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location, Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/StorageAccountsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/StorageAccountsClient.java deleted file mode 100644 index fa81691e2373..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/StorageAccountsClient.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.ListStorageAccountKeysResultInner; - -/** An instance of this class provides access to all the operations defined in StorageAccountsClient. */ -public interface StorageAccountsClient { - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ListStorageAccountKeysResultInner listKeys(String resourceGroupName, String workspaceName); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse(String resourceGroupName, String workspaceName, - Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/UsagesClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/UsagesClient.java deleted file mode 100644 index e76f4c9e04f8..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/UsagesClient.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.UsageInner; - -/** An instance of this class provides access to all the operations defined in UsagesClient. */ -public interface UsagesClient { - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for AML resources for given subscription and location. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location); - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for AML resources for given subscription and location. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location, Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/VirtualMachineSizesClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/VirtualMachineSizesClient.java deleted file mode 100644 index dc92a4a70f89..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/VirtualMachineSizesClient.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.VirtualMachineSizeListResultInner; - -/** An instance of this class provides access to all the operations defined in VirtualMachineSizesClient. */ -public interface VirtualMachineSizesClient { - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VirtualMachineSizeListResultInner list(String location); - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String location, Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceConnectionsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceConnectionsClient.java deleted file mode 100644 index f15173868572..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceConnectionsClient.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceConnectionInner; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceConnectionDto; - -/** An instance of this class provides access to all the operations defined in WorkspaceConnectionsClient. */ -public interface WorkspaceConnectionsClient { - /** - * List all connections under a AML workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Workspace connection objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List all connections under a AML workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Workspace connection objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String target, - String category, Context context); - - /** - * Add a new workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceConnectionInner create(String resourceGroupName, String workspaceName, String connectionName, - WorkspaceConnectionDto parameters); - - /** - * Add a new workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse(String resourceGroupName, String workspaceName, - String connectionName, WorkspaceConnectionDto parameters, Context context); - - /** - * Get the detail of a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceConnectionInner get(String resourceGroupName, String workspaceName, String connectionName); - - /** - * Get the detail of a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, - String connectionName, Context context); - - /** - * Delete a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String connectionName); - - /** - * Delete a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String connectionName, - Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceFeaturesClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceFeaturesClient.java deleted file mode 100644 index f6451157bc19..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceFeaturesClient.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.AmlUserFeatureInner; - -/** An instance of this class provides access to all the operations defined in WorkspaceFeaturesClient. */ -public interface WorkspaceFeaturesClient { - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceOperationsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceOperationsClient.java deleted file mode 100644 index 6cc8f4f46345..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceOperationsClient.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceSkuInner; - -/** An instance of this class provides access to all the operations defined in WorkspaceOperationsClient. */ -public interface WorkspaceOperationsClient { - /** - * Lists all skus with associated features. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of skus with features. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSkus(); - - /** - * Lists all skus with associated features. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of skus with features. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSkus(Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspacesClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspacesClient.java deleted file mode 100644 index 9b4b30fada65..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspacesClient.java +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.ListWorkspaceKeysResultInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookAccessTokenResultInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceUpdateParameters; - -/** An instance of this class provides access to all the operations defined in WorkspacesClient. */ -public interface WorkspacesClient { - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, - Context context); - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner parameters); - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner parameters, Context context); - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters); - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters, - Context context); - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName); - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, Context context); - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName); - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, Context context); - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters); - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters, Context context); - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName Name of the resource group in which workspace 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 result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ListWorkspaceKeysResultInner listKeys(String resourceGroupName, String workspaceName); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse(String resourceGroupName, String workspaceName, - Context context); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName, Context context); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void resyncKeys(String resourceGroupName, String workspaceName); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void resyncKeys(String resourceGroupName, String workspaceName, Context context); - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String skip, Context context); - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName); - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listNotebookAccessTokenWithResponse(String resourceGroupName, - String workspaceName, Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/AmlUserFeatureInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/AmlUserFeatureInner.java deleted file mode 100644 index 0ee35e9fd6e3..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/AmlUserFeatureInner.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.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; - -/** Features enabled for a workspace. */ -@Fluent -public final class AmlUserFeatureInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AmlUserFeatureInner.class); - - /* - * Specifies the feature ID - */ - @JsonProperty(value = "id") - private String id; - - /* - * Specifies the feature name - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * Describes the feature for user experience - */ - @JsonProperty(value = "description") - private String description; - - /** - * Get the id property: Specifies the feature ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Specifies the feature ID. - * - * @param id the id value to set. - * @return the AmlUserFeatureInner object itself. - */ - public AmlUserFeatureInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the displayName property: Specifies the feature name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Specifies the feature name. - * - * @param displayName the displayName value to set. - * @return the AmlUserFeatureInner object itself. - */ - public AmlUserFeatureInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description property: Describes the feature for user experience. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Describes the feature for user experience. - * - * @param description the description value to set. - * @return the AmlUserFeatureInner object itself. - */ - public AmlUserFeatureInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ComputeResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ComputeResourceInner.java deleted file mode 100644 index d314f54d7a4e..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ComputeResourceInner.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.models.Compute; -import com.azure.resourcemanager.machinelearningservices.models.Identity; -import com.azure.resourcemanager.machinelearningservices.models.Sku; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Machine Learning compute object wrapped into ARM resource envelope. */ -@Fluent -public final class ComputeResourceInner extends Resource { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ComputeResourceInner.class); - - /* - * Compute properties - */ - @JsonProperty(value = "properties") - private Compute properties; - - /* - * The identity of the resource. - */ - @JsonProperty(value = "identity") - private Identity identity; - - /* - * The sku of the workspace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * Read only system data - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the properties property: Compute properties. - * - * @return the properties value. - */ - public Compute properties() { - return this.properties; - } - - /** - * Set the properties property: Compute properties. - * - * @param properties the properties value to set. - * @return the ComputeResourceInner object itself. - */ - public ComputeResourceInner withProperties(Compute properties) { - this.properties = properties; - return this; - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public Identity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the ComputeResourceInner object itself. - */ - public ComputeResourceInner withIdentity(Identity identity) { - this.identity = identity; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the ComputeResourceInner object itself. - */ - public ComputeResourceInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Read only system data. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public ComputeResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComputeResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ComputeSecretsInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ComputeSecretsInner.java deleted file mode 100644 index 2d88e9a26c23..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ComputeSecretsInner.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.models.AksComputeSecrets; -import com.azure.resourcemanager.machinelearningservices.models.DatabricksComputeSecrets; -import com.azure.resourcemanager.machinelearningservices.models.VirtualMachineSecrets; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Secrets related to a Machine Learning compute. Might differ for every type of compute. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "computeType", - defaultImpl = ComputeSecretsInner.class) -@JsonTypeName("ComputeSecrets") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "AKS", value = AksComputeSecrets.class), - @JsonSubTypes.Type(name = "VirtualMachine", value = VirtualMachineSecrets.class), - @JsonSubTypes.Type(name = "Databricks", value = DatabricksComputeSecrets.class) }) -@Immutable -public class ComputeSecretsInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ComputeSecretsInner.class); - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ListNotebookKeysResultInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ListNotebookKeysResultInner.java deleted file mode 100644 index 04012f58b771..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ListNotebookKeysResultInner.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.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; - -/** The ListNotebookKeysResult model. */ -@Immutable -public final class ListNotebookKeysResultInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ListNotebookKeysResultInner.class); - - /* - * The primaryAccessKey property. - */ - @JsonProperty(value = "primaryAccessKey", access = JsonProperty.Access.WRITE_ONLY) - private String primaryAccessKey; - - /* - * The secondaryAccessKey property. - */ - @JsonProperty(value = "secondaryAccessKey", access = JsonProperty.Access.WRITE_ONLY) - private String secondaryAccessKey; - - /** - * Get the primaryAccessKey property: The primaryAccessKey property. - * - * @return the primaryAccessKey value. - */ - public String primaryAccessKey() { - return this.primaryAccessKey; - } - - /** - * Get the secondaryAccessKey property: The secondaryAccessKey property. - * - * @return the secondaryAccessKey value. - */ - public String secondaryAccessKey() { - return this.secondaryAccessKey; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ListStorageAccountKeysResultInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ListStorageAccountKeysResultInner.java deleted file mode 100644 index 7bf538abf6c3..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ListStorageAccountKeysResultInner.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.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; - -/** The ListStorageAccountKeysResult model. */ -@Immutable -public final class ListStorageAccountKeysResultInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ListStorageAccountKeysResultInner.class); - - /* - * The userStorageKey property. - */ - @JsonProperty(value = "userStorageKey", access = JsonProperty.Access.WRITE_ONLY) - private String userStorageKey; - - /** - * Get the userStorageKey property: The userStorageKey property. - * - * @return the userStorageKey value. - */ - public String userStorageKey() { - return this.userStorageKey; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ListWorkspaceKeysResultInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ListWorkspaceKeysResultInner.java deleted file mode 100644 index e2efceabbe1a..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ListWorkspaceKeysResultInner.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.models.RegistryListCredentialsResult; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ListWorkspaceKeysResult model. */ -@Immutable -public final class ListWorkspaceKeysResultInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ListWorkspaceKeysResultInner.class); - - /* - * The userStorageKey property. - */ - @JsonProperty(value = "userStorageKey", access = JsonProperty.Access.WRITE_ONLY) - private String userStorageKey; - - /* - * The userStorageResourceId property. - */ - @JsonProperty(value = "userStorageResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String userStorageResourceId; - - /* - * The appInsightsInstrumentationKey property. - */ - @JsonProperty(value = "appInsightsInstrumentationKey", access = JsonProperty.Access.WRITE_ONLY) - private String appInsightsInstrumentationKey; - - /* - * The containerRegistryCredentials property. - */ - @JsonProperty(value = "containerRegistryCredentials", access = JsonProperty.Access.WRITE_ONLY) - private RegistryListCredentialsResult containerRegistryCredentials; - - /* - * The notebookAccessKeys property. - */ - @JsonProperty(value = "notebookAccessKeys", access = JsonProperty.Access.WRITE_ONLY) - private ListNotebookKeysResultInner notebookAccessKeys; - - /** - * Get the userStorageKey property: The userStorageKey property. - * - * @return the userStorageKey value. - */ - public String userStorageKey() { - return this.userStorageKey; - } - - /** - * Get the userStorageResourceId property: The userStorageResourceId property. - * - * @return the userStorageResourceId value. - */ - public String userStorageResourceId() { - return this.userStorageResourceId; - } - - /** - * Get the appInsightsInstrumentationKey property: The appInsightsInstrumentationKey property. - * - * @return the appInsightsInstrumentationKey value. - */ - public String appInsightsInstrumentationKey() { - return this.appInsightsInstrumentationKey; - } - - /** - * Get the containerRegistryCredentials property: The containerRegistryCredentials property. - * - * @return the containerRegistryCredentials value. - */ - public RegistryListCredentialsResult containerRegistryCredentials() { - return this.containerRegistryCredentials; - } - - /** - * Get the notebookAccessKeys property: The notebookAccessKeys property. - * - * @return the notebookAccessKeys value. - */ - public ListNotebookKeysResultInner notebookAccessKeys() { - return this.notebookAccessKeys; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (containerRegistryCredentials() != null) { - containerRegistryCredentials().validate(); - } - if (notebookAccessKeys() != null) { - notebookAccessKeys().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/NotebookAccessTokenResultInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/NotebookAccessTokenResultInner.java deleted file mode 100644 index 9df4773e0117..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/NotebookAccessTokenResultInner.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.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; - -/** The NotebookAccessTokenResult model. */ -@Immutable -public final class NotebookAccessTokenResultInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(NotebookAccessTokenResultInner.class); - - /* - * The notebookResourceId property. - */ - @JsonProperty(value = "notebookResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String notebookResourceId; - - /* - * The hostName property. - */ - @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY) - private String hostname; - - /* - * The publicDns property. - */ - @JsonProperty(value = "publicDns", access = JsonProperty.Access.WRITE_ONLY) - private String publicDns; - - /* - * The accessToken property. - */ - @JsonProperty(value = "accessToken", access = JsonProperty.Access.WRITE_ONLY) - private String accessToken; - - /* - * The tokenType property. - */ - @JsonProperty(value = "tokenType", access = JsonProperty.Access.WRITE_ONLY) - private String tokenType; - - /* - * The expiresIn property. - */ - @JsonProperty(value = "expiresIn", access = JsonProperty.Access.WRITE_ONLY) - private Integer expiresIn; - - /* - * The refreshToken property. - */ - @JsonProperty(value = "refreshToken", access = JsonProperty.Access.WRITE_ONLY) - private String refreshToken; - - /* - * The scope property. - */ - @JsonProperty(value = "scope", access = JsonProperty.Access.WRITE_ONLY) - private String scope; - - /** - * Get the notebookResourceId property: The notebookResourceId property. - * - * @return the notebookResourceId value. - */ - public String notebookResourceId() { - return this.notebookResourceId; - } - - /** - * Get the hostname property: The hostName property. - * - * @return the hostname value. - */ - public String hostname() { - return this.hostname; - } - - /** - * Get the publicDns property: The publicDns property. - * - * @return the publicDns value. - */ - public String publicDns() { - return this.publicDns; - } - - /** - * Get the accessToken property: The accessToken property. - * - * @return the accessToken value. - */ - public String accessToken() { - return this.accessToken; - } - - /** - * Get the tokenType property: The tokenType property. - * - * @return the tokenType value. - */ - public String tokenType() { - return this.tokenType; - } - - /** - * Get the expiresIn property: The expiresIn property. - * - * @return the expiresIn value. - */ - public Integer expiresIn() { - return this.expiresIn; - } - - /** - * Get the refreshToken property: The refreshToken property. - * - * @return the refreshToken value. - */ - public String refreshToken() { - return this.refreshToken; - } - - /** - * Get the scope property: The scope property. - * - * @return the scope value. - */ - public String scope() { - return this.scope; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/NotebookResourceInfoInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/NotebookResourceInfoInner.java deleted file mode 100644 index e82335927ba4..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/NotebookResourceInfoInner.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.models.NotebookPreparationError; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The NotebookResourceInfo model. */ -@Fluent -public final class NotebookResourceInfoInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(NotebookResourceInfoInner.class); - - /* - * The fqdn property. - */ - @JsonProperty(value = "fqdn") - private String fqdn; - - /* - * the data plane resourceId that used to initialize notebook component - */ - @JsonProperty(value = "resourceId") - private String resourceId; - - /* - * The error that occurs when preparing notebook. - */ - @JsonProperty(value = "notebookPreparationError") - private NotebookPreparationError notebookPreparationError; - - /** - * Get the fqdn property: The fqdn property. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Set the fqdn property: The fqdn property. - * - * @param fqdn the fqdn value to set. - * @return the NotebookResourceInfoInner object itself. - */ - public NotebookResourceInfoInner withFqdn(String fqdn) { - this.fqdn = fqdn; - return this; - } - - /** - * Get the resourceId property: the data plane resourceId that used to initialize notebook component. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: the data plane resourceId that used to initialize notebook component. - * - * @param resourceId the resourceId value to set. - * @return the NotebookResourceInfoInner object itself. - */ - public NotebookResourceInfoInner withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the notebookPreparationError property: The error that occurs when preparing notebook. - * - * @return the notebookPreparationError value. - */ - public NotebookPreparationError notebookPreparationError() { - return this.notebookPreparationError; - } - - /** - * Set the notebookPreparationError property: The error that occurs when preparing notebook. - * - * @param notebookPreparationError the notebookPreparationError value to set. - * @return the NotebookResourceInfoInner object itself. - */ - public NotebookResourceInfoInner withNotebookPreparationError(NotebookPreparationError notebookPreparationError) { - this.notebookPreparationError = notebookPreparationError; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (notebookPreparationError() != null) { - notebookPreparationError().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/OperationInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/OperationInner.java deleted file mode 100644 index 0ccfd3b63fef..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/OperationInner.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.models.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Machine Learning workspace REST API operation. */ -@Fluent -public final class OperationInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(OperationInner.class); - - /* - * Operation name: {provider}/{resource}/{operation} - */ - @JsonProperty(value = "name") - private String name; - - /* - * Display name of operation - */ - @JsonProperty(value = "display") - private OperationDisplay display; - - /** - * Get the name property: Operation name: {provider}/{resource}/{operation}. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Operation name: {provider}/{resource}/{operation}. - * - * @param name the name value to set. - * @return the OperationInner object itself. - */ - public OperationInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display property: Display name of operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display property: Display name of operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - 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/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/PrivateEndpointConnectionInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/PrivateEndpointConnectionInner.java deleted file mode 100644 index 13d4ac1f6381..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/PrivateEndpointConnectionInner.java +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.models.Identity; -import com.azure.resourcemanager.machinelearningservices.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearningservices.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.machinelearningservices.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearningservices.models.Sku; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The Private Endpoint Connection resource. */ -@JsonFlatten -@Fluent -public class PrivateEndpointConnectionInner extends Resource { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class); - - /* - * The resource of private end point. - */ - @JsonProperty(value = "properties.privateEndpoint") - private PrivateEndpoint privateEndpoint; - - /* - * A collection of information about the state of the connection between - * service consumer and provider. - */ - @JsonProperty(value = "properties.privateLinkServiceConnectionState") - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; - - /* - * The provisioning state of the private endpoint connection resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private PrivateEndpointConnectionProvisioningState provisioningState; - - /* - * The identity of the resource. - */ - @JsonProperty(value = "identity") - private Identity identity; - - /* - * The sku of the workspace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * Read only system data - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the privateEndpoint property: The resource of private end point. - * - * @return the privateEndpoint value. - */ - public PrivateEndpoint privateEndpoint() { - return this.privateEndpoint; - } - - /** - * Set the privateEndpoint property: The resource of private end point. - * - * @param privateEndpoint the privateEndpoint value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.privateEndpoint = privateEndpoint; - return this; - } - - /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; - } - - /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner - withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; - return this; - } - - /** - * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @return the provisioningState value. - */ - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public Identity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner withIdentity(Identity identity) { - this.identity = identity; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Read only system data. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public PrivateEndpointConnectionInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public PrivateEndpointConnectionInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() != null) { - privateLinkServiceConnectionState().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/PrivateLinkResourceListResultInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/PrivateLinkResourceListResultInner.java deleted file mode 100644 index 7e239added89..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/PrivateLinkResourceListResultInner.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.models.PrivateLinkResource; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of private link resources. */ -@Fluent -public final class PrivateLinkResourceListResultInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(PrivateLinkResourceListResultInner.class); - - /* - * Array of private link resources - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: Array of private link resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of private link resources. - * - * @param value the value value to set. - * @return the PrivateLinkResourceListResultInner object itself. - */ - public PrivateLinkResourceListResultInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ResourceQuotaInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ResourceQuotaInner.java deleted file mode 100644 index 2824ecbb661d..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ResourceQuotaInner.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.models.QuotaUnit; -import com.azure.resourcemanager.machinelearningservices.models.ResourceName; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The quota assigned to a resource. */ -@Immutable -public final class ResourceQuotaInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ResourceQuotaInner.class); - - /* - * Specifies the resource ID. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * Region of the AML workspace in the id. - */ - @JsonProperty(value = "amlWorkspaceLocation", access = JsonProperty.Access.WRITE_ONLY) - private String amlWorkspaceLocation; - - /* - * Specifies the resource type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /* - * Name of the resource. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private ResourceName name; - - /* - * The maximum permitted quota of the resource. - */ - @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) - private Long limit; - - /* - * An enum describing the unit of quota measurement. - */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) - private QuotaUnit unit; - - /** - * Get the id property: Specifies the resource ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the amlWorkspaceLocation property: Region of the AML workspace in the id. - * - * @return the amlWorkspaceLocation value. - */ - public String amlWorkspaceLocation() { - return this.amlWorkspaceLocation; - } - - /** - * Get the type property: Specifies the resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the name property: Name of the resource. - * - * @return the name value. - */ - public ResourceName name() { - return this.name; - } - - /** - * Get the limit property: The maximum permitted quota of the resource. - * - * @return the limit value. - */ - public Long limit() { - return this.limit; - } - - /** - * Get the unit property: An enum describing the unit of quota measurement. - * - * @return the unit value. - */ - public QuotaUnit unit() { - return this.unit; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() != null) { - name().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ServiceResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ServiceResourceInner.java deleted file mode 100644 index 57f59c815488..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ServiceResourceInner.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.models.Identity; -import com.azure.resourcemanager.machinelearningservices.models.ServiceResponseBase; -import com.azure.resourcemanager.machinelearningservices.models.Sku; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Machine Learning service object wrapped into ARM resource envelope. */ -@Fluent -public final class ServiceResourceInner extends Resource { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ServiceResourceInner.class); - - /* - * Service properties - */ - @JsonProperty(value = "properties") - private ServiceResponseBase properties; - - /* - * The identity of the resource. - */ - @JsonProperty(value = "identity") - private Identity identity; - - /* - * The sku of the workspace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * Read only system data - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the properties property: Service properties. - * - * @return the properties value. - */ - public ServiceResponseBase properties() { - return this.properties; - } - - /** - * Set the properties property: Service properties. - * - * @param properties the properties value to set. - * @return the ServiceResourceInner object itself. - */ - public ServiceResourceInner withProperties(ServiceResponseBase properties) { - this.properties = properties; - return this; - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public Identity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the ServiceResourceInner object itself. - */ - public ServiceResourceInner withIdentity(Identity identity) { - this.identity = identity; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the ServiceResourceInner object itself. - */ - public ServiceResourceInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Read only system data. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public ServiceResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ServiceResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/UpdateWorkspaceQuotasResultInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/UpdateWorkspaceQuotasResultInner.java deleted file mode 100644 index 30afea9ccffb..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/UpdateWorkspaceQuotasResultInner.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.models.UpdateWorkspaceQuotas; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The result of update workspace quota. */ -@Immutable -public final class UpdateWorkspaceQuotasResultInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(UpdateWorkspaceQuotasResultInner.class); - - /* - * The list of workspace quota update result. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The URI to fetch the next page of workspace quota update result. Call - * ListNext() with this to fetch the next page of Workspace Quota update - * result. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: The list of workspace quota update result. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI to fetch the next page of workspace quota update result. Call ListNext() with - * this to fetch the next page of Workspace Quota update result. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/UsageInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/UsageInner.java deleted file mode 100644 index 829e34f3190f..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/UsageInner.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.models.UsageName; -import com.azure.resourcemanager.machinelearningservices.models.UsageUnit; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes AML Resource Usage. */ -@Immutable -public final class UsageInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(UsageInner.class); - - /* - * Specifies the resource ID. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * Region of the AML workspace in the id. - */ - @JsonProperty(value = "amlWorkspaceLocation", access = JsonProperty.Access.WRITE_ONLY) - private String amlWorkspaceLocation; - - /* - * Specifies the resource type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /* - * An enum describing the unit of usage measurement. - */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) - private UsageUnit unit; - - /* - * The current usage of the resource. - */ - @JsonProperty(value = "currentValue", access = JsonProperty.Access.WRITE_ONLY) - private Long currentValue; - - /* - * The maximum permitted usage of the resource. - */ - @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) - private Long limit; - - /* - * The name of the type of usage. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private UsageName name; - - /** - * Get the id property: Specifies the resource ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the amlWorkspaceLocation property: Region of the AML workspace in the id. - * - * @return the amlWorkspaceLocation value. - */ - public String amlWorkspaceLocation() { - return this.amlWorkspaceLocation; - } - - /** - * Get the type property: Specifies the resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the unit property: An enum describing the unit of usage measurement. - * - * @return the unit value. - */ - public UsageUnit unit() { - return this.unit; - } - - /** - * Get the currentValue property: The current usage of the resource. - * - * @return the currentValue value. - */ - public Long currentValue() { - return this.currentValue; - } - - /** - * Get the limit property: The maximum permitted usage of the resource. - * - * @return the limit value. - */ - public Long limit() { - return this.limit; - } - - /** - * Get the name property: The name of the type of usage. - * - * @return the name value. - */ - public UsageName name() { - return this.name; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() != null) { - name().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/VirtualMachineSizeListResultInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/VirtualMachineSizeListResultInner.java deleted file mode 100644 index 34133afdacc5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/VirtualMachineSizeListResultInner.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.models.VirtualMachineSize; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The List Virtual Machine size operation response. */ -@Fluent -public final class VirtualMachineSizeListResultInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(VirtualMachineSizeListResultInner.class); - - /* - * The list of virtual machine sizes supported by AmlCompute. - */ - @JsonProperty(value = "amlCompute") - private List amlCompute; - - /** - * Get the amlCompute property: The list of virtual machine sizes supported by AmlCompute. - * - * @return the amlCompute value. - */ - public List amlCompute() { - return this.amlCompute; - } - - /** - * Set the amlCompute property: The list of virtual machine sizes supported by AmlCompute. - * - * @param amlCompute the amlCompute value to set. - * @return the VirtualMachineSizeListResultInner object itself. - */ - public VirtualMachineSizeListResultInner withAmlCompute(List amlCompute) { - this.amlCompute = amlCompute; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (amlCompute() != null) { - amlCompute().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/WorkspaceConnectionInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/WorkspaceConnectionInner.java deleted file mode 100644 index 5c663a45d6e5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/WorkspaceConnectionInner.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.models.ValueFormat; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workspace connection. */ -@JsonFlatten -@Fluent -public class WorkspaceConnectionInner extends ProxyResource { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(WorkspaceConnectionInner.class); - - /* - * Category of the workspace connection. - */ - @JsonProperty(value = "properties.category") - private String category; - - /* - * Target of the workspace connection. - */ - @JsonProperty(value = "properties.target") - private String target; - - /* - * Authorization type of the workspace connection. - */ - @JsonProperty(value = "properties.authType") - private String authType; - - /* - * Value details of the workspace connection. - */ - @JsonProperty(value = "properties.value") - private String value; - - /* - * format for the workspace connection value - */ - @JsonProperty(value = "properties.valueFormat") - private ValueFormat valueFormat; - - /** - * Get the category property: Category of the workspace connection. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: Category of the workspace connection. - * - * @param category the category value to set. - * @return the WorkspaceConnectionInner object itself. - */ - public WorkspaceConnectionInner withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the target property: Target of the workspace connection. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Set the target property: Target of the workspace connection. - * - * @param target the target value to set. - * @return the WorkspaceConnectionInner object itself. - */ - public WorkspaceConnectionInner withTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the authType property: Authorization type of the workspace connection. - * - * @return the authType value. - */ - public String authType() { - return this.authType; - } - - /** - * Set the authType property: Authorization type of the workspace connection. - * - * @param authType the authType value to set. - * @return the WorkspaceConnectionInner object itself. - */ - public WorkspaceConnectionInner withAuthType(String authType) { - this.authType = authType; - return this; - } - - /** - * Get the value property: Value details of the workspace connection. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Value details of the workspace connection. - * - * @param value the value value to set. - * @return the WorkspaceConnectionInner object itself. - */ - public WorkspaceConnectionInner withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the valueFormat property: format for the workspace connection value. - * - * @return the valueFormat value. - */ - public ValueFormat valueFormat() { - return this.valueFormat; - } - - /** - * Set the valueFormat property: format for the workspace connection value. - * - * @param valueFormat the valueFormat value to set. - * @return the WorkspaceConnectionInner object itself. - */ - public WorkspaceConnectionInner withValueFormat(ValueFormat valueFormat) { - this.valueFormat = valueFormat; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/WorkspaceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/WorkspaceInner.java deleted file mode 100644 index abfea3430d58..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/WorkspaceInner.java +++ /dev/null @@ -1,636 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.models.EncryptionProperty; -import com.azure.resourcemanager.machinelearningservices.models.Identity; -import com.azure.resourcemanager.machinelearningservices.models.ProvisioningState; -import com.azure.resourcemanager.machinelearningservices.models.ServiceManagedResourcesSettings; -import com.azure.resourcemanager.machinelearningservices.models.SharedPrivateLinkResource; -import com.azure.resourcemanager.machinelearningservices.models.Sku; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** An object that represents a machine learning workspace. */ -@JsonFlatten -@Fluent -public class WorkspaceInner extends Resource { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(WorkspaceInner.class); - - /* - * The immutable id associated with this workspace. - */ - @JsonProperty(value = "properties.workspaceId", access = JsonProperty.Access.WRITE_ONLY) - private String workspaceId; - - /* - * The description of this workspace. - */ - @JsonProperty(value = "properties.description") - private String description; - - /* - * The friendly name for this workspace. This name in mutable - */ - @JsonProperty(value = "properties.friendlyName") - private String friendlyName; - - /* - * ARM id of the key vault associated with this workspace. This cannot be - * changed once the workspace has been created - */ - @JsonProperty(value = "properties.keyVault") - private String keyVault; - - /* - * ARM id of the application insights associated with this workspace. This - * cannot be changed once the workspace has been created - */ - @JsonProperty(value = "properties.applicationInsights") - private String applicationInsights; - - /* - * ARM id of the container registry associated with this workspace. This - * cannot be changed once the workspace has been created - */ - @JsonProperty(value = "properties.containerRegistry") - private String containerRegistry; - - /* - * ARM id of the storage account associated with this workspace. This - * cannot be changed once the workspace has been created - */ - @JsonProperty(value = "properties.storageAccount") - private String storageAccount; - - /* - * Url for the discovery service to identify regional endpoints for machine - * learning experimentation services - */ - @JsonProperty(value = "properties.discoveryUrl") - private String discoveryUrl; - - /* - * The current deployment state of workspace resource. The - * provisioningState is to indicate states for resource provisioning. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * The encryption settings of Azure ML workspace. - */ - @JsonProperty(value = "properties.encryption") - private EncryptionProperty encryption; - - /* - * The flag to signal HBI data in the workspace and reduce diagnostic data - * collected by the service - */ - @JsonProperty(value = "properties.hbiWorkspace") - private Boolean hbiWorkspace; - - /* - * The name of the managed resource group created by workspace RP in - * customer subscription if the workspace is CMK workspace - */ - @JsonProperty(value = "properties.serviceProvisionedResourceGroup", access = JsonProperty.Access.WRITE_ONLY) - private String serviceProvisionedResourceGroup; - - /* - * Count of private connections in the workspace - */ - @JsonProperty(value = "properties.privateLinkCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer privateLinkCount; - - /* - * The compute name for image build - */ - @JsonProperty(value = "properties.imageBuildCompute") - private String imageBuildCompute; - - /* - * The flag to indicate whether to allow public access when behind VNet. - */ - @JsonProperty(value = "properties.allowPublicAccessWhenBehindVnet") - private Boolean allowPublicAccessWhenBehindVnet; - - /* - * The list of private endpoint connections in the workspace. - */ - @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) - private List privateEndpointConnections; - - /* - * The list of shared private link resources in this workspace. - */ - @JsonProperty(value = "properties.sharedPrivateLinkResources") - private List sharedPrivateLinkResources; - - /* - * The notebook info of Azure ML workspace. - */ - @JsonProperty(value = "properties.notebookInfo", access = JsonProperty.Access.WRITE_ONLY) - private NotebookResourceInfoInner notebookInfo; - - /* - * The service managed resource settings. - */ - @JsonProperty(value = "properties.serviceManagedResourcesSettings") - private ServiceManagedResourcesSettings serviceManagedResourcesSettings; - - /* - * The user assigned identity resource id that represents the workspace - * identity. - */ - @JsonProperty(value = "properties.primaryUserAssignedIdentity") - private String primaryUserAssignedIdentity; - - /* - * The tenant id associated with this workspace. - */ - @JsonProperty(value = "properties.tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /* - * The identity of the resource. - */ - @JsonProperty(value = "identity") - private Identity identity; - - /* - * The sku of the workspace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * Read only system data - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the workspaceId property: The immutable id associated with this workspace. - * - * @return the workspaceId value. - */ - public String workspaceId() { - return this.workspaceId; - } - - /** - * Get the description property: The description of this workspace. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of this workspace. - * - * @param description the description value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @param friendlyName the friendlyName value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; - return this; - } - - /** - * Get the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @return the keyVault value. - */ - public String keyVault() { - return this.keyVault; - } - - /** - * Set the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @param keyVault the keyVault value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withKeyVault(String keyVault) { - this.keyVault = keyVault; - return this; - } - - /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. This - * cannot be changed once the workspace has been created. - * - * @return the applicationInsights value. - */ - public String applicationInsights() { - return this.applicationInsights; - } - - /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. This - * cannot be changed once the workspace has been created. - * - * @param applicationInsights the applicationInsights value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withApplicationInsights(String applicationInsights) { - this.applicationInsights = applicationInsights; - return this; - } - - /** - * Get the containerRegistry property: ARM id of the container registry associated with this workspace. This cannot - * be changed once the workspace has been created. - * - * @return the containerRegistry value. - */ - public String containerRegistry() { - return this.containerRegistry; - } - - /** - * Set the containerRegistry property: ARM id of the container registry associated with this workspace. This cannot - * be changed once the workspace has been created. - * - * @param containerRegistry the containerRegistry value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withContainerRegistry(String containerRegistry) { - this.containerRegistry = containerRegistry; - return this; - } - - /** - * Get the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @return the storageAccount value. - */ - public String storageAccount() { - return this.storageAccount; - } - - /** - * Set the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @param storageAccount the storageAccount value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withStorageAccount(String storageAccount) { - this.storageAccount = storageAccount; - return this; - } - - /** - * Get the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning - * experimentation services. - * - * @return the discoveryUrl value. - */ - public String discoveryUrl() { - return this.discoveryUrl; - } - - /** - * Set the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning - * experimentation services. - * - * @param discoveryUrl the discoveryUrl value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withDiscoveryUrl(String discoveryUrl) { - this.discoveryUrl = discoveryUrl; - return this; - } - - /** - * Get the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the encryption property: The encryption settings of Azure ML workspace. - * - * @return the encryption value. - */ - public EncryptionProperty encryption() { - return this.encryption; - } - - /** - * Set the encryption property: The encryption settings of Azure ML workspace. - * - * @param encryption the encryption value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withEncryption(EncryptionProperty encryption) { - this.encryption = encryption; - return this; - } - - /** - * Get the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. - * - * @return the hbiWorkspace value. - */ - public Boolean hbiWorkspace() { - return this.hbiWorkspace; - } - - /** - * Set the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. - * - * @param hbiWorkspace the hbiWorkspace value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withHbiWorkspace(Boolean hbiWorkspace) { - this.hbiWorkspace = hbiWorkspace; - return this; - } - - /** - * Get the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. - * - * @return the serviceProvisionedResourceGroup value. - */ - public String serviceProvisionedResourceGroup() { - return this.serviceProvisionedResourceGroup; - } - - /** - * Get the privateLinkCount property: Count of private connections in the workspace. - * - * @return the privateLinkCount value. - */ - public Integer privateLinkCount() { - return this.privateLinkCount; - } - - /** - * Get the imageBuildCompute property: The compute name for image build. - * - * @return the imageBuildCompute value. - */ - public String imageBuildCompute() { - return this.imageBuildCompute; - } - - /** - * Set the imageBuildCompute property: The compute name for image build. - * - * @param imageBuildCompute the imageBuildCompute value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withImageBuildCompute(String imageBuildCompute) { - this.imageBuildCompute = imageBuildCompute; - return this; - } - - /** - * Get the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. - * - * @return the allowPublicAccessWhenBehindVnet value. - */ - public Boolean allowPublicAccessWhenBehindVnet() { - return this.allowPublicAccessWhenBehindVnet; - } - - /** - * Set the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. - * - * @param allowPublicAccessWhenBehindVnet the allowPublicAccessWhenBehindVnet value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { - this.allowPublicAccessWhenBehindVnet = allowPublicAccessWhenBehindVnet; - return this; - } - - /** - * Get the privateEndpointConnections property: The list of private endpoint connections in the workspace. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @return the sharedPrivateLinkResources value. - */ - public List sharedPrivateLinkResources() { - return this.sharedPrivateLinkResources; - } - - /** - * Set the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @param sharedPrivateLinkResources the sharedPrivateLinkResources value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withSharedPrivateLinkResources(List sharedPrivateLinkResources) { - this.sharedPrivateLinkResources = sharedPrivateLinkResources; - return this; - } - - /** - * Get the notebookInfo property: The notebook info of Azure ML workspace. - * - * @return the notebookInfo value. - */ - public NotebookResourceInfoInner notebookInfo() { - return this.notebookInfo; - } - - /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @return the serviceManagedResourcesSettings value. - */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.serviceManagedResourcesSettings; - } - - /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { - this.serviceManagedResourcesSettings = serviceManagedResourcesSettings; - return this; - } - - /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. - */ - public String primaryUserAssignedIdentity() { - return this.primaryUserAssignedIdentity; - } - - /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; - return this; - } - - /** - * Get the tenantId property: The tenant id associated with this workspace. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public Identity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withIdentity(Identity identity) { - this.identity = identity; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Read only system data. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public WorkspaceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public WorkspaceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (encryption() != null) { - encryption().validate(); - } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - if (sharedPrivateLinkResources() != null) { - sharedPrivateLinkResources().forEach(e -> e.validate()); - } - if (notebookInfo() != null) { - notebookInfo().validate(); - } - if (serviceManagedResourcesSettings() != null) { - serviceManagedResourcesSettings().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/WorkspaceSkuInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/WorkspaceSkuInner.java deleted file mode 100644 index 34276ef95d09..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/WorkspaceSkuInner.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.models.ResourceSkuLocationInfo; -import com.azure.resourcemanager.machinelearningservices.models.Restriction; -import com.azure.resourcemanager.machinelearningservices.models.SkuCapability; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes Workspace Sku details and features. */ -@Fluent -public final class WorkspaceSkuInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(WorkspaceSkuInner.class); - - /* - * The set of locations that the SKU is available. This will be supported - * and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, - * etc.). - */ - @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY) - private List locations; - - /* - * A list of locations and availability zones in those locations where the - * SKU is available. - */ - @JsonProperty(value = "locationInfo", access = JsonProperty.Access.WRITE_ONLY) - private List locationInfo; - - /* - * Sku Tier like Basic or Enterprise - */ - @JsonProperty(value = "tier", access = JsonProperty.Access.WRITE_ONLY) - private String tier; - - /* - * The resourceType property. - */ - @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) - private String resourceType; - - /* - * The name property. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * List of features/user capabilities associated with the sku - */ - @JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY) - private List capabilities; - - /* - * The restrictions because of which SKU cannot be used. This is empty if - * there are no restrictions. - */ - @JsonProperty(value = "restrictions") - private List restrictions; - - /** - * Get the locations property: The set of locations that the SKU is available. This will be supported and registered - * Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). - * - * @return the locations value. - */ - public List locations() { - return this.locations; - } - - /** - * Get the locationInfo property: A list of locations and availability zones in those locations where the SKU is - * available. - * - * @return the locationInfo value. - */ - public List locationInfo() { - return this.locationInfo; - } - - /** - * Get the tier property: Sku Tier like Basic or Enterprise. - * - * @return the tier value. - */ - public String tier() { - return this.tier; - } - - /** - * Get the resourceType property: The resourceType property. - * - * @return the resourceType value. - */ - public String resourceType() { - return this.resourceType; - } - - /** - * Get the name property: The name property. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the capabilities property: List of features/user capabilities associated with the sku. - * - * @return the capabilities value. - */ - public List capabilities() { - return this.capabilities; - } - - /** - * Get the restrictions property: The restrictions because of which SKU cannot be used. This is empty if there are - * no restrictions. - * - * @return the restrictions value. - */ - public List restrictions() { - return this.restrictions; - } - - /** - * Set the restrictions property: The restrictions because of which SKU cannot be used. This is empty if there are - * no restrictions. - * - * @param restrictions the restrictions value to set. - * @return the WorkspaceSkuInner object itself. - */ - public WorkspaceSkuInner withRestrictions(List restrictions) { - this.restrictions = restrictions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (locationInfo() != null) { - locationInfo().forEach(e -> e.validate()); - } - if (capabilities() != null) { - capabilities().forEach(e -> e.validate()); - } - if (restrictions() != null) { - restrictions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/package-info.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/package-info.java deleted file mode 100644 index 1c182a8b3aff..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the inner data models for AzureMachineLearningWorkspaces. These APIs allow end users to operate on - * Azure Machine Learning Workspace resources. - */ -package com.azure.resourcemanager.machinelearningservices.fluent.models; diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/package-info.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/package-info.java deleted file mode 100644 index 98047b3c26fb..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the service clients for AzureMachineLearningWorkspaces. These APIs allow end users to operate on - * Azure Machine Learning Workspace resources. - */ -package com.azure.resourcemanager.machinelearningservices.fluent; diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AmlUserFeatureImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AmlUserFeatureImpl.java deleted file mode 100644 index 878f814fe41e..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AmlUserFeatureImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.AmlUserFeatureInner; -import com.azure.resourcemanager.machinelearningservices.models.AmlUserFeature; - -public final class AmlUserFeatureImpl implements AmlUserFeature { - private AmlUserFeatureInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - AmlUserFeatureImpl(AmlUserFeatureInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String displayName() { - return this.innerModel().displayName(); - } - - public String description() { - return this.innerModel().description(); - } - - public AmlUserFeatureInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AzureMachineLearningWorkspacesBuilder.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AzureMachineLearningWorkspacesBuilder.java deleted file mode 100644 index c3f41570ea49..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AzureMachineLearningWorkspacesBuilder.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 AzureMachineLearningWorkspacesImpl type. */ -@ServiceClientBuilder(serviceClients = { AzureMachineLearningWorkspacesImpl.class }) -public final class AzureMachineLearningWorkspacesBuilder { - /* - * Azure subscription identifier. - */ - private String subscriptionId; - - /** - * Sets Azure subscription identifier. - * - * @param subscriptionId the subscriptionId value. - * @return the AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of AzureMachineLearningWorkspacesImpl with the provided parameters. - * - * @return an instance of AzureMachineLearningWorkspacesImpl. - */ - public AzureMachineLearningWorkspacesImpl buildClient() { - 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(); - } - AzureMachineLearningWorkspacesImpl client = new AzureMachineLearningWorkspacesImpl(pipeline, serializerAdapter, - defaultPollInterval, environment, subscriptionId, endpoint); - return client; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AzureMachineLearningWorkspacesImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AzureMachineLearningWorkspacesImpl.java deleted file mode 100644 index 405974503ad8..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AzureMachineLearningWorkspacesImpl.java +++ /dev/null @@ -1,456 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.AzureMachineLearningWorkspaces; -import com.azure.resourcemanager.machinelearningservices.fluent.MachineLearningComputesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.MachineLearningServicesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.NotebooksClient; -import com.azure.resourcemanager.machinelearningservices.fluent.OperationsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.QuotasClient; -import com.azure.resourcemanager.machinelearningservices.fluent.StorageAccountsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.UsagesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.VirtualMachineSizesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceConnectionsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceFeaturesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceOperationsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.WorkspacesClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import java.util.Map; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** Initializes a new instance of the AzureMachineLearningWorkspacesImpl type. */ -@ServiceClient(builder = AzureMachineLearningWorkspacesBuilder.class) -public final class AzureMachineLearningWorkspacesImpl implements AzureMachineLearningWorkspaces { - private final ClientLogger logger = new ClientLogger(AzureMachineLearningWorkspacesImpl.class); - - /** Azure subscription identifier. */ - private final String subscriptionId; - - /** - * Gets Azure subscription identifier. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** server parameter. */ - private final String endpoint; - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** Api Version. */ - private final String apiVersion; - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** The HTTP pipeline to send requests through. */ - private final HttpPipeline httpPipeline; - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - public HttpPipeline getHttpPipeline() { - return this.httpPipeline; - } - - /** The serializer to serialize an object into a string. */ - private final SerializerAdapter serializerAdapter; - - /** - * Gets The serializer to serialize an object into a string. - * - * @return the serializerAdapter value. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** The default poll interval for long-running operation. */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** The OperationsClient object to access its operations. */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** The WorkspacesClient object to access its operations. */ - private final WorkspacesClient workspaces; - - /** - * Gets the WorkspacesClient object to access its operations. - * - * @return the WorkspacesClient object. - */ - public WorkspacesClient getWorkspaces() { - return this.workspaces; - } - - /** The WorkspaceFeaturesClient object to access its operations. */ - private final WorkspaceFeaturesClient workspaceFeatures; - - /** - * Gets the WorkspaceFeaturesClient object to access its operations. - * - * @return the WorkspaceFeaturesClient object. - */ - public WorkspaceFeaturesClient getWorkspaceFeatures() { - return this.workspaceFeatures; - } - - /** The UsagesClient object to access its operations. */ - private final UsagesClient usages; - - /** - * Gets the UsagesClient object to access its operations. - * - * @return the UsagesClient object. - */ - public UsagesClient getUsages() { - return this.usages; - } - - /** The VirtualMachineSizesClient object to access its operations. */ - private final VirtualMachineSizesClient virtualMachineSizes; - - /** - * Gets the VirtualMachineSizesClient object to access its operations. - * - * @return the VirtualMachineSizesClient object. - */ - public VirtualMachineSizesClient getVirtualMachineSizes() { - return this.virtualMachineSizes; - } - - /** The QuotasClient object to access its operations. */ - private final QuotasClient quotas; - - /** - * Gets the QuotasClient object to access its operations. - * - * @return the QuotasClient object. - */ - public QuotasClient getQuotas() { - return this.quotas; - } - - /** The 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; - } - - /** The WorkspaceOperationsClient object to access its operations. */ - private final WorkspaceOperationsClient workspaceOperations; - - /** - * Gets the WorkspaceOperationsClient object to access its operations. - * - * @return the WorkspaceOperationsClient object. - */ - public WorkspaceOperationsClient getWorkspaceOperations() { - return this.workspaceOperations; - } - - /** The PrivateEndpointConnectionsClient object to access its operations. */ - private final PrivateEndpointConnectionsClient privateEndpointConnections; - - /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. - * - * @return the PrivateEndpointConnectionsClient object. - */ - public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** The PrivateLinkResourcesClient object to access its operations. */ - private final PrivateLinkResourcesClient privateLinkResources; - - /** - * Gets the PrivateLinkResourcesClient object to access its operations. - * - * @return the PrivateLinkResourcesClient object. - */ - public PrivateLinkResourcesClient getPrivateLinkResources() { - return this.privateLinkResources; - } - - /** The MachineLearningServicesClient object to access its operations. */ - private final MachineLearningServicesClient machineLearningServices; - - /** - * Gets the MachineLearningServicesClient object to access its operations. - * - * @return the MachineLearningServicesClient object. - */ - public MachineLearningServicesClient getMachineLearningServices() { - return this.machineLearningServices; - } - - /** The NotebooksClient object to access its operations. */ - private final NotebooksClient notebooks; - - /** - * Gets the NotebooksClient object to access its operations. - * - * @return the NotebooksClient object. - */ - public NotebooksClient getNotebooks() { - return this.notebooks; - } - - /** The StorageAccountsClient object to access its operations. */ - private final StorageAccountsClient storageAccounts; - - /** - * Gets the StorageAccountsClient object to access its operations. - * - * @return the StorageAccountsClient object. - */ - public StorageAccountsClient getStorageAccounts() { - return this.storageAccounts; - } - - /** The WorkspaceConnectionsClient object to access its operations. */ - private final WorkspaceConnectionsClient workspaceConnections; - - /** - * Gets the WorkspaceConnectionsClient object to access its operations. - * - * @return the WorkspaceConnectionsClient object. - */ - public WorkspaceConnectionsClient getWorkspaceConnections() { - return this.workspaceConnections; - } - - /** - * Initializes an instance of AzureMachineLearningWorkspaces client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param defaultPollInterval The default poll interval for long-running operation. - * @param environment The Azure environment. - * @param subscriptionId Azure subscription identifier. - * @param endpoint server parameter. - */ - AzureMachineLearningWorkspacesImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = "2021-04-01"; - this.operations = new OperationsClientImpl(this); - this.workspaces = new WorkspacesClientImpl(this); - this.workspaceFeatures = new WorkspaceFeaturesClientImpl(this); - this.usages = new UsagesClientImpl(this); - this.virtualMachineSizes = new VirtualMachineSizesClientImpl(this); - this.quotas = new QuotasClientImpl(this); - this.machineLearningComputes = new MachineLearningComputesClientImpl(this); - this.workspaceOperations = new WorkspaceOperationsClientImpl(this); - this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); - this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); - this.machineLearningServices = new MachineLearningServicesClientImpl(this); - this.notebooks = new NotebooksClientImpl(this); - this.storageAccounts = new StorageAccountsClientImpl(this); - this.workspaceConnections = new WorkspaceConnectionsClientImpl(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/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ComputeResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ComputeResourceImpl.java deleted file mode 100644 index 1f56e85e7d58..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ComputeResourceImpl.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeResourceInner; -import com.azure.resourcemanager.machinelearningservices.models.AmlComputeNodeInformation; -import com.azure.resourcemanager.machinelearningservices.models.ClusterUpdateParameters; -import com.azure.resourcemanager.machinelearningservices.models.Compute; -import com.azure.resourcemanager.machinelearningservices.models.ComputeResource; -import com.azure.resourcemanager.machinelearningservices.models.ComputeSecrets; -import com.azure.resourcemanager.machinelearningservices.models.Identity; -import com.azure.resourcemanager.machinelearningservices.models.ScaleSettings; -import com.azure.resourcemanager.machinelearningservices.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class ComputeResourceImpl implements ComputeResource, ComputeResource.Definition, ComputeResource.Update { - private ComputeResourceInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager 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 Compute properties() { - return this.innerModel().properties(); - } - - public Identity identity() { - return this.innerModel().identity(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public ComputeResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String computeName; - - private ClusterUpdateParameters updateParameters; - - public ComputeResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public ComputeResource create() { - this.innerObject = serviceManager.serviceClient() - .getMachineLearningComputes() - .createOrUpdate(resourceGroupName, workspaceName, computeName, this.innerModel(), Context.NONE); - return this; - } - - public ComputeResource create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getMachineLearningComputes() - .createOrUpdate(resourceGroupName, workspaceName, computeName, this.innerModel(), context); - return this; - } - - ComputeResourceImpl(String name, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = new ComputeResourceInner(); - this.serviceManager = serviceManager; - this.computeName = name; - } - - public ComputeResourceImpl update() { - this.updateParameters = new ClusterUpdateParameters(); - return this; - } - - public ComputeResource apply() { - this.innerObject = serviceManager.serviceClient() - .getMachineLearningComputes() - .update(resourceGroupName, workspaceName, computeName, updateParameters, Context.NONE); - return this; - } - - public ComputeResource apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getMachineLearningComputes() - .update(resourceGroupName, workspaceName, computeName, updateParameters, context); - return this; - } - - ComputeResourceImpl(ComputeResourceInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.computeName = Utils.getValueFromIdByName(innerObject.id(), "computes"); - } - - public ComputeResource refresh() { - this.innerObject = serviceManager.serviceClient() - .getMachineLearningComputes() - .getWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE) - .getValue(); - return this; - } - - public ComputeResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getMachineLearningComputes() - .getWithResponse(resourceGroupName, workspaceName, computeName, context) - .getValue(); - return this; - } - - public PagedIterable listNodes() { - return serviceManager.machineLearningComputes().listNodes(resourceGroupName, workspaceName, computeName); - } - - public PagedIterable listNodes(Context context) { - return serviceManager.machineLearningComputes() - .listNodes(resourceGroupName, workspaceName, computeName, context); - } - - public ComputeSecrets listKeys() { - return serviceManager.machineLearningComputes().listKeys(resourceGroupName, workspaceName, computeName); - } - - public Response listKeysWithResponse(Context context) { - return serviceManager.machineLearningComputes() - .listKeysWithResponse(resourceGroupName, workspaceName, computeName, context); - } - - public void start() { - serviceManager.machineLearningComputes().start(resourceGroupName, workspaceName, computeName); - } - - public void start(Context context) { - serviceManager.machineLearningComputes().start(resourceGroupName, workspaceName, computeName, context); - } - - public void stop() { - serviceManager.machineLearningComputes().stop(resourceGroupName, workspaceName, computeName); - } - - public void stop(Context context) { - serviceManager.machineLearningComputes().stop(resourceGroupName, workspaceName, computeName, context); - } - - public void restart() { - serviceManager.machineLearningComputes().restart(resourceGroupName, workspaceName, computeName); - } - - public Response restartWithResponse(Context context) { - return serviceManager.machineLearningComputes() - .restartWithResponse(resourceGroupName, workspaceName, computeName, context); - } - - public ComputeResourceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ComputeResourceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ComputeResourceImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public ComputeResourceImpl withProperties(Compute properties) { - this.innerModel().withProperties(properties); - return this; - } - - public ComputeResourceImpl withIdentity(Identity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public ComputeResourceImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public ComputeResourceImpl withScaleSettings(ScaleSettings scaleSettings) { - this.updateParameters.withScaleSettings(scaleSettings); - return this; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ComputeSecretsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ComputeSecretsImpl.java deleted file mode 100644 index c239d3a14856..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ComputeSecretsImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeSecretsInner; -import com.azure.resourcemanager.machinelearningservices.models.ComputeSecrets; - -public final class ComputeSecretsImpl implements ComputeSecrets { - private ComputeSecretsInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - ComputeSecretsImpl(ComputeSecretsInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public ComputeSecretsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ListNotebookKeysResultImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ListNotebookKeysResultImpl.java deleted file mode 100644 index 5c5d5fcd0ae4..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ListNotebookKeysResultImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListNotebookKeysResultInner; -import com.azure.resourcemanager.machinelearningservices.models.ListNotebookKeysResult; - -public final class ListNotebookKeysResultImpl implements ListNotebookKeysResult { - private ListNotebookKeysResultInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - ListNotebookKeysResultImpl(ListNotebookKeysResultInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String primaryAccessKey() { - return this.innerModel().primaryAccessKey(); - } - - public String secondaryAccessKey() { - return this.innerModel().secondaryAccessKey(); - } - - public ListNotebookKeysResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ListStorageAccountKeysResultImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ListStorageAccountKeysResultImpl.java deleted file mode 100644 index 4c9a8040006f..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ListStorageAccountKeysResultImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListStorageAccountKeysResultInner; -import com.azure.resourcemanager.machinelearningservices.models.ListStorageAccountKeysResult; - -public final class ListStorageAccountKeysResultImpl implements ListStorageAccountKeysResult { - private ListStorageAccountKeysResultInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - ListStorageAccountKeysResultImpl(ListStorageAccountKeysResultInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String userStorageKey() { - return this.innerModel().userStorageKey(); - } - - public ListStorageAccountKeysResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ListWorkspaceKeysResultImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ListWorkspaceKeysResultImpl.java deleted file mode 100644 index 74ce072e3a7f..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ListWorkspaceKeysResultImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListNotebookKeysResultInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListWorkspaceKeysResultInner; -import com.azure.resourcemanager.machinelearningservices.models.ListNotebookKeysResult; -import com.azure.resourcemanager.machinelearningservices.models.ListWorkspaceKeysResult; -import com.azure.resourcemanager.machinelearningservices.models.RegistryListCredentialsResult; - -public final class ListWorkspaceKeysResultImpl implements ListWorkspaceKeysResult { - private ListWorkspaceKeysResultInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - ListWorkspaceKeysResultImpl(ListWorkspaceKeysResultInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String userStorageKey() { - return this.innerModel().userStorageKey(); - } - - public String userStorageResourceId() { - return this.innerModel().userStorageResourceId(); - } - - public String appInsightsInstrumentationKey() { - return this.innerModel().appInsightsInstrumentationKey(); - } - - public RegistryListCredentialsResult containerRegistryCredentials() { - return this.innerModel().containerRegistryCredentials(); - } - - public ListNotebookKeysResult notebookAccessKeys() { - ListNotebookKeysResultInner inner = this.innerModel().notebookAccessKeys(); - if (inner != null) { - return new ListNotebookKeysResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public ListWorkspaceKeysResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningComputesClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningComputesClientImpl.java deleted file mode 100644 index 6accbbc2b2f8..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningComputesClientImpl.java +++ /dev/null @@ -1,2252 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.MachineLearningComputesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeResourceInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeSecretsInner; -import com.azure.resourcemanager.machinelearningservices.models.AmlComputeNodeInformation; -import com.azure.resourcemanager.machinelearningservices.models.AmlComputeNodesInformation; -import com.azure.resourcemanager.machinelearningservices.models.ClusterUpdateParameters; -import com.azure.resourcemanager.machinelearningservices.models.PaginatedComputeResourcesList; -import com.azure.resourcemanager.machinelearningservices.models.UnderlyingResourceAction; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in 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 AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of MachineLearningComputesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - MachineLearningComputesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(MachineLearningComputesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesMachineLearningComputes to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - private interface MachineLearningComputesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspace(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ComputeResourceInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ClusterUpdateParameters parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @QueryParam("underlyingResourceAction") UnderlyingResourceAction underlyingResourceAction, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNodes(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> restart(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNodesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, - String workspaceName, String skip) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByWorkspace(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByWorkspace(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, this.client.getApiVersion(), skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName, - String skip) { - return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName, - String skip, Context context) { - return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, skip, context), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, skip)); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, - String skip, Context context) { - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, skip, context)); - } - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - computeName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String computeName) { - return getWithResponseAsync(resourceGroupName, workspaceName, computeName) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner get(String resourceGroupName, String workspaceName, String computeName) { - return getAsync(resourceGroupName, workspaceName, computeName).block(); - } - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String computeName, ComputeResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), parameters, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String computeName, ComputeResourceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ComputeResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ComputeResourceInner.class, ComputeResourceInner.class, Context.NONE); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ComputeResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ComputeResourceInner.class, ComputeResourceInner.class, context); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ComputeResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).getSyncPoller(); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ComputeResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context) - .getSyncPoller(); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String computeName, ComputeResourceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String computeName, ComputeResourceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String computeName, - ComputeResourceInner parameters) { - return createOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).block(); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String computeName, - ComputeResourceInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context).block(); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, ClusterUpdateParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, ClusterUpdateParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ComputeResourceInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ComputeResourceInner.class, ComputeResourceInner.class, Context.NONE); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ComputeResourceInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ComputeResourceInner.class, ComputeResourceInner.class, context); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ComputeResourceInner> beginUpdate(String resourceGroupName, - String workspaceName, String computeName, ClusterUpdateParameters parameters) { - return beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).getSyncPoller(); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ComputeResourceInner> beginUpdate(String resourceGroupName, - String workspaceName, String computeName, ClusterUpdateParameters parameters, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context).getSyncPoller(); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String computeName, - ClusterUpdateParameters parameters) { - return beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String computeName, - ClusterUpdateParameters parameters, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner update(String resourceGroupName, String workspaceName, String computeName, - ClusterUpdateParameters parameters) { - return updateAsync(resourceGroupName, workspaceName, computeName, parameters).block(); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner update(String resourceGroupName, String workspaceName, String computeName, - ClusterUpdateParameters parameters, Context context) { - return updateAsync(resourceGroupName, workspaceName, computeName, parameters, context).block(); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (underlyingResourceAction == null) { - return Mono.error( - new IllegalArgumentException("Parameter underlyingResourceAction is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), underlyingResourceAction, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (underlyingResourceAction == null) { - return Mono.error( - new IllegalArgumentException("Parameter underlyingResourceAction is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), underlyingResourceAction, accept, context); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - Context.NONE); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction) { - return beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction) - .getSyncPoller(); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context) - .getSyncPoller(); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction) { - return beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction) { - deleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction).block(); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction, Context context) { - deleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context).block(); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNodesSinglePageAsync(String resourceGroupName, - String workspaceName, String computeName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNodes(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().nodes(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNodesSinglePageAsync(String resourceGroupName, - String workspaceName, String computeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNodes(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - computeName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().nodes(), res.getValue().nextLink(), null)); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listNodesAsync(String resourceGroupName, String workspaceName, - String computeName) { - return new PagedFlux<>(() -> listNodesSinglePageAsync(resourceGroupName, workspaceName, computeName), - nextLink -> listNodesNextSinglePageAsync(nextLink)); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listNodesAsync(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return new PagedFlux<>(() -> listNodesSinglePageAsync(resourceGroupName, workspaceName, computeName, context), - nextLink -> listNodesNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName) { - return new PagedIterable<>(listNodesAsync(resourceGroupName, workspaceName, computeName)); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return new PagedIterable<>(listNodesAsync(resourceGroupName, workspaceName, computeName, context)); - } - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String computeName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String computeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync(String resourceGroupName, String workspaceName, - String computeName) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, computeName) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeSecretsInner listKeys(String resourceGroupName, String workspaceName, String computeName) { - return listKeysAsync(resourceGroupName, workspaceName, computeName).block(); - } - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.start(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.start(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), accept, context); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginStartAsync(String resourceGroupName, String workspaceName, - String computeName) { - Mono>> mono = startWithResponseAsync(resourceGroupName, workspaceName, computeName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - Context.NONE); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginStartAsync(String resourceGroupName, String workspaceName, - String computeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = startWithResponseAsync(resourceGroupName, workspaceName, computeName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginStart(String resourceGroupName, String workspaceName, - String computeName) { - return beginStartAsync(resourceGroupName, workspaceName, computeName).getSyncPoller(); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginStart(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return beginStartAsync(resourceGroupName, workspaceName, computeName, context).getSyncPoller(); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String workspaceName, String computeName) { - return beginStartAsync(resourceGroupName, workspaceName, computeName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String workspaceName, String computeName, Context context) { - return beginStartAsync(resourceGroupName, workspaceName, computeName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String resourceGroupName, String workspaceName, String computeName) { - startAsync(resourceGroupName, workspaceName, computeName).block(); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String resourceGroupName, String workspaceName, String computeName, Context context) { - startAsync(resourceGroupName, workspaceName, computeName, context).block(); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), accept, context); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginStopAsync(String resourceGroupName, String workspaceName, - String computeName) { - Mono>> mono = stopWithResponseAsync(resourceGroupName, workspaceName, computeName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - Context.NONE); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginStopAsync(String resourceGroupName, String workspaceName, - String computeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = stopWithResponseAsync(resourceGroupName, workspaceName, computeName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginStop(String resourceGroupName, String workspaceName, - String computeName) { - return beginStopAsync(resourceGroupName, workspaceName, computeName).getSyncPoller(); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginStop(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return beginStopAsync(resourceGroupName, workspaceName, computeName, context).getSyncPoller(); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String workspaceName, String computeName) { - return beginStopAsync(resourceGroupName, workspaceName, computeName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String workspaceName, String computeName, Context context) { - return beginStopAsync(resourceGroupName, workspaceName, computeName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceGroupName, String workspaceName, String computeName) { - stopAsync(resourceGroupName, workspaceName, computeName).block(); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceGroupName, String workspaceName, String computeName, Context context) { - stopAsync(resourceGroupName, workspaceName, computeName, context).block(); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> restartWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> restartWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.restart(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), accept, context); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restartAsync(String resourceGroupName, String workspaceName, String computeName) { - return restartWithResponseAsync(resourceGroupName, workspaceName, computeName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void restart(String resourceGroupName, String workspaceName, String computeName) { - restartAsync(resourceGroupName, workspaceName, computeName).block(); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response restartWithResponse(String resourceGroupName, String workspaceName, String computeName, - Context context) { - return restartWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Machine Learning compute objects wrapped in ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(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.listByWorkspaceNext(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 Machine Learning compute objects wrapped in ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(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.listByWorkspaceNext(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 compute node information related to a AmlCompute. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNodesNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNodesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().nodes(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The 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 compute node information related to a AmlCompute. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNodesNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNodesNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().nodes(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningComputesImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningComputesImpl.java deleted file mode 100644 index e15976b73e09..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningComputesImpl.java +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.MachineLearningComputesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeResourceInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeSecretsInner; -import com.azure.resourcemanager.machinelearningservices.models.AmlComputeNodeInformation; -import com.azure.resourcemanager.machinelearningservices.models.ComputeResource; -import com.azure.resourcemanager.machinelearningservices.models.ComputeSecrets; -import com.azure.resourcemanager.machinelearningservices.models.MachineLearningComputes; -import com.azure.resourcemanager.machinelearningservices.models.UnderlyingResourceAction; -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.machinelearningservices.MachineLearningServicesManager serviceManager; - - public MachineLearningComputesImpl(MachineLearningComputesClient innerClient, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { - PagedIterable inner - = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new ComputeResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, String skip, - Context context) { - PagedIterable inner - = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, skip, context); - return Utils.mapPage(inner, inner1 -> new ComputeResourceImpl(inner1, this.manager())); - } - - public ComputeResource get(String resourceGroupName, String workspaceName, String computeName) { - ComputeResourceInner inner = this.serviceClient().get(resourceGroupName, workspaceName, computeName); - if (inner != null) { - return new ComputeResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String computeName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, computeName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComputeResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction) { - this.serviceClient().delete(resourceGroupName, workspaceName, computeName, underlyingResourceAction); - } - - public void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context); - } - - public PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName) { - return this.serviceClient().listNodes(resourceGroupName, workspaceName, computeName); - } - - public PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return this.serviceClient().listNodes(resourceGroupName, workspaceName, computeName, context); - } - - public ComputeSecrets listKeys(String resourceGroupName, String workspaceName, String computeName) { - ComputeSecretsInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName, computeName); - if (inner != null) { - return new ComputeSecretsImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - String computeName, Context context) { - Response inner - = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, computeName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComputeSecretsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void start(String resourceGroupName, String workspaceName, String computeName) { - this.serviceClient().start(resourceGroupName, workspaceName, computeName); - } - - public void start(String resourceGroupName, String workspaceName, String computeName, Context context) { - this.serviceClient().start(resourceGroupName, workspaceName, computeName, context); - } - - public void stop(String resourceGroupName, String workspaceName, String computeName) { - this.serviceClient().stop(resourceGroupName, workspaceName, computeName); - } - - public void stop(String resourceGroupName, String workspaceName, String computeName, Context context) { - this.serviceClient().stop(resourceGroupName, workspaceName, computeName, context); - } - - public void restart(String resourceGroupName, String workspaceName, String computeName) { - this.serviceClient().restart(resourceGroupName, workspaceName, computeName); - } - - public Response restartWithResponse(String resourceGroupName, String workspaceName, String computeName, - Context context) { - return this.serviceClient().restartWithResponse(resourceGroupName, workspaceName, computeName, context); - } - - public ComputeResource getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String computeName = Utils.getValueFromIdByName(id, "computes"); - if (computeName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'computes'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String computeName = Utils.getValueFromIdByName(id, "computes"); - if (computeName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'computes'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, computeName, context); - } - - private MachineLearningComputesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } - - public ComputeResourceImpl define(String name) { - return new ComputeResourceImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningServicesClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningServicesClientImpl.java deleted file mode 100644 index d4525138f4d3..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningServicesClientImpl.java +++ /dev/null @@ -1,979 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearningservices.fluent.MachineLearningServicesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ServiceResourceInner; -import com.azure.resourcemanager.machinelearningservices.models.CreateServiceRequest; -import com.azure.resourcemanager.machinelearningservices.models.OrderString; -import com.azure.resourcemanager.machinelearningservices.models.PaginatedServiceList; -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 MachineLearningServicesClient. */ -public final class MachineLearningServicesClientImpl implements MachineLearningServicesClient { - private final ClientLogger logger = new ClientLogger(MachineLearningServicesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final MachineLearningServicesService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of MachineLearningServicesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - MachineLearningServicesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(MachineLearningServicesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesMachineLearningServices to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - private interface MachineLearningServicesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/services") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspace(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("modelId") String modelId, @QueryParam("modelName") String modelName, - @QueryParam("tag") String tag, @QueryParam("tags") String tags, @QueryParam("properties") String properties, - @QueryParam("runId") String runId, @QueryParam("expand") Boolean expand, - @QueryParam("orderby") OrderString orderby, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/services/{serviceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @PathParam("serviceName") String serviceName, - @QueryParam("expand") Boolean expand, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/services/{serviceName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @PathParam("serviceName") String serviceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/services/{serviceName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @PathParam("serviceName") String serviceName, - @BodyParam("application/json") CreateServiceRequest properties, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets services in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param modelId The Model Id. - * @param modelName The Model name. - * @param tag The object tag. - * @param tags A set of tags with which to filter the returned services. It is a comma separated string of tags key - * or tags key=value Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned services. It is a comma separated string - * of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param runId runId for model associated with service. - * @param expand Set to True to include Model details. - * @param orderby The option to order the response. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, String modelId, String modelName, String tag, String tags, String properties, - String runId, Boolean expand, OrderString orderby) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByWorkspace(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, modelId, modelName, tag, tags, - properties, runId, expand, orderby, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets services in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param modelId The Model Id. - * @param modelName The Model name. - * @param tag The object tag. - * @param tags A set of tags with which to filter the returned services. It is a comma separated string of tags key - * or tags key=value Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned services. It is a comma separated string - * of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param runId runId for model associated with service. - * @param expand Set to True to include Model details. - * @param orderby The option to order the response. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, String modelId, String modelName, String tag, String tags, String properties, - String runId, Boolean expand, OrderString orderby, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByWorkspace(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, this.client.getApiVersion(), skip, modelId, modelName, tag, tags, properties, runId, - expand, orderby, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets services in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param modelId The Model Id. - * @param modelName The Model name. - * @param tag The object tag. - * @param tags A set of tags with which to filter the returned services. It is a comma separated string of tags key - * or tags key=value Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned services. It is a comma separated string - * of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param runId runId for model associated with service. - * @param expand Set to True to include Model details. - * @param orderby The option to order the response. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName, - String skip, String modelId, String modelName, String tag, String tags, String properties, String runId, - Boolean expand, OrderString orderby) { - return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, skip, modelId, - modelName, tag, tags, properties, runId, expand, orderby), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); - } - - /** - * Gets services in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final String modelId = null; - final String modelName = null; - final String tag = null; - final String tags = null; - final String properties = null; - final String runId = null; - final Boolean expand = null; - final OrderString orderby = null; - return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, skip, modelId, - modelName, tag, tags, properties, runId, expand, orderby), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); - } - - /** - * Gets services in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param modelId The Model Id. - * @param modelName The Model name. - * @param tag The object tag. - * @param tags A set of tags with which to filter the returned services. It is a comma separated string of tags key - * or tags key=value Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned services. It is a comma separated string - * of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param runId runId for model associated with service. - * @param expand Set to True to include Model details. - * @param orderby The option to order the response. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName, - String skip, String modelId, String modelName, String tag, String tags, String properties, String runId, - Boolean expand, OrderString orderby, Context context) { - return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, skip, modelId, modelName, tag, tags, - properties, runId, expand, orderby, context), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets services in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { - final String skip = null; - final String modelId = null; - final String modelName = null; - final String tag = null; - final String tags = null; - final String properties = null; - final String runId = null; - final Boolean expand = null; - final OrderString orderby = null; - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, skip, modelId, modelName, tag, - tags, properties, runId, expand, orderby)); - } - - /** - * Gets services in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param modelId The Model Id. - * @param modelName The Model name. - * @param tag The object tag. - * @param tags A set of tags with which to filter the returned services. It is a comma separated string of tags key - * or tags key=value Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned services. It is a comma separated string - * of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param runId runId for model associated with service. - * @param expand Set to True to include Model details. - * @param orderby The option to order the response. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, - String skip, String modelId, String modelName, String tag, String tags, String properties, String runId, - Boolean expand, OrderString orderby, Context context) { - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, skip, modelId, modelName, tag, - tags, properties, runId, expand, orderby, context)); - } - - /** - * Get a Service by name. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param expand Set to True to include Model details. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String serviceName, Boolean expand) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), serviceName, expand, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a Service by name. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param expand Set to True to include Model details. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String serviceName, Boolean expand, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), serviceName, expand, accept, context); - } - - /** - * Get a Service by name. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param expand Set to True to include Model details. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String serviceName, - Boolean expand) { - return getWithResponseAsync(resourceGroupName, workspaceName, serviceName, expand) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get a Service by name. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String serviceName) { - final Boolean expand = null; - return getWithResponseAsync(resourceGroupName, workspaceName, serviceName, expand) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get a Service by name. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServiceResourceInner get(String resourceGroupName, String workspaceName, String serviceName) { - final Boolean expand = null; - return getAsync(resourceGroupName, workspaceName, serviceName, expand).block(); - } - - /** - * Get a Service by name. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param expand Set to True to include Model details. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String serviceName, Boolean expand, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, serviceName, expand, context).block(); - } - - /** - * Delete a specific Service.. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, - String serviceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), serviceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a specific Service.. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, - String serviceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, this.client.getApiVersion(), serviceName, accept, context); - } - - /** - * Delete a specific Service.. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 workspaceName, String serviceName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, serviceName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a specific Service.. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String serviceName) { - deleteAsync(resourceGroupName, workspaceName, serviceName).block(); - } - - /** - * Delete a specific Service.. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String serviceName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, serviceName, context).block(); - } - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String serviceName, CreateServiceRequest properties) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), serviceName, properties, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String serviceName, CreateServiceRequest properties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, this.client.getApiVersion(), serviceName, properties, accept, context); - } - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ServiceResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String serviceName, CreateServiceRequest properties) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, serviceName, properties); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ServiceResourceInner.class, ServiceResourceInner.class, Context.NONE); - } - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ServiceResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String serviceName, CreateServiceRequest properties, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, serviceName, properties, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ServiceResourceInner.class, ServiceResourceInner.class, context); - } - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ServiceResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String serviceName, CreateServiceRequest properties) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, serviceName, properties).getSyncPoller(); - } - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ServiceResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String serviceName, CreateServiceRequest properties, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, serviceName, properties, context) - .getSyncPoller(); - } - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String serviceName, CreateServiceRequest properties) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, serviceName, properties).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String serviceName, CreateServiceRequest properties, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, serviceName, properties, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServiceResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String serviceName, - CreateServiceRequest properties) { - return createOrUpdateAsync(resourceGroupName, workspaceName, serviceName, properties).block(); - } - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServiceResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String serviceName, - CreateServiceRequest properties, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, serviceName, properties, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Machine Learning service objects wrapped in ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(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.listByWorkspaceNext(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 Machine Learning service objects wrapped in ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(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.listByWorkspaceNext(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/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningServicesImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningServicesImpl.java deleted file mode 100644 index e554ed7851af..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningServicesImpl.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.MachineLearningServicesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ServiceResourceInner; -import com.azure.resourcemanager.machinelearningservices.models.MachineLearningServices; -import com.azure.resourcemanager.machinelearningservices.models.OrderString; -import com.azure.resourcemanager.machinelearningservices.models.ServiceResource; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class MachineLearningServicesImpl implements MachineLearningServices { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MachineLearningServicesImpl.class); - - private final MachineLearningServicesClient innerClient; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - public MachineLearningServicesImpl(MachineLearningServicesClient innerClient, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { - PagedIterable inner - = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new ServiceResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, String skip, - String modelId, String modelName, String tag, String tags, String properties, String runId, Boolean expand, - OrderString orderby, Context context) { - PagedIterable inner = this.serviceClient() - .listByWorkspace(resourceGroupName, workspaceName, skip, modelId, modelName, tag, tags, properties, runId, - expand, orderby, context); - return Utils.mapPage(inner, inner1 -> new ServiceResourceImpl(inner1, this.manager())); - } - - public ServiceResource get(String resourceGroupName, String workspaceName, String serviceName) { - ServiceResourceInner inner = this.serviceClient().get(resourceGroupName, workspaceName, serviceName); - if (inner != null) { - return new ServiceResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, String serviceName, - Boolean expand, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, serviceName, expand, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ServiceResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String serviceName) { - this.serviceClient().delete(resourceGroupName, workspaceName, serviceName); - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String serviceName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, serviceName, context); - } - - public ServiceResource getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - Boolean localExpand = null; - return this.getWithResponse(resourceGroupName, workspaceName, serviceName, localExpand, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Boolean expand, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, serviceName, expand, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, serviceName, Context.NONE).getValue(); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, serviceName, context); - } - - private MachineLearningServicesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } - - public ServiceResourceImpl define(String name) { - return new ServiceResourceImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebookAccessTokenResultImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebookAccessTokenResultImpl.java deleted file mode 100644 index d0396a67bc37..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebookAccessTokenResultImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookAccessTokenResultInner; -import com.azure.resourcemanager.machinelearningservices.models.NotebookAccessTokenResult; - -public final class NotebookAccessTokenResultImpl implements NotebookAccessTokenResult { - private NotebookAccessTokenResultInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - NotebookAccessTokenResultImpl(NotebookAccessTokenResultInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String notebookResourceId() { - return this.innerModel().notebookResourceId(); - } - - public String hostname() { - return this.innerModel().hostname(); - } - - public String publicDns() { - return this.innerModel().publicDns(); - } - - public String accessToken() { - return this.innerModel().accessToken(); - } - - public String tokenType() { - return this.innerModel().tokenType(); - } - - public Integer expiresIn() { - return this.innerModel().expiresIn(); - } - - public String refreshToken() { - return this.innerModel().refreshToken(); - } - - public String scope() { - return this.innerModel().scope(); - } - - public NotebookAccessTokenResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebookResourceInfoImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebookResourceInfoImpl.java deleted file mode 100644 index f13eada0f10a..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebookResourceInfoImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookResourceInfoInner; -import com.azure.resourcemanager.machinelearningservices.models.NotebookPreparationError; -import com.azure.resourcemanager.machinelearningservices.models.NotebookResourceInfo; - -public final class NotebookResourceInfoImpl implements NotebookResourceInfo { - private NotebookResourceInfoInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - NotebookResourceInfoImpl(NotebookResourceInfoInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String fqdn() { - return this.innerModel().fqdn(); - } - - public String resourceId() { - return this.innerModel().resourceId(); - } - - public NotebookPreparationError notebookPreparationError() { - return this.innerModel().notebookPreparationError(); - } - - public NotebookResourceInfoInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebooksClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebooksClientImpl.java deleted file mode 100644 index 38585082472b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebooksClientImpl.java +++ /dev/null @@ -1,383 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.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.machinelearningservices.fluent.NotebooksClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListNotebookKeysResultInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookResourceInfoInner; -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 NotebooksClient. */ -public final class NotebooksClientImpl implements NotebooksClient { - private final ClientLogger logger = new ClientLogger(NotebooksClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final NotebooksService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of NotebooksClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - NotebooksClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(NotebooksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesNotebooks to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - private interface NotebooksService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> prepare(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> prepareWithResponseAsync(String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.prepare(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> prepareWithResponseAsync(String resourceGroupName, String workspaceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.prepare(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, accept, context); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, NotebookResourceInfoInner> - beginPrepareAsync(String resourceGroupName, String workspaceName) { - Mono>> mono = prepareWithResponseAsync(resourceGroupName, workspaceName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NotebookResourceInfoInner.class, NotebookResourceInfoInner.class, - Context.NONE); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, NotebookResourceInfoInner> - beginPrepareAsync(String resourceGroupName, String workspaceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = prepareWithResponseAsync(resourceGroupName, workspaceName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NotebookResourceInfoInner.class, NotebookResourceInfoInner.class, context); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, NotebookResourceInfoInner> - beginPrepare(String resourceGroupName, String workspaceName) { - return beginPrepareAsync(resourceGroupName, workspaceName).getSyncPoller(); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, NotebookResourceInfoInner> - beginPrepare(String resourceGroupName, String workspaceName, Context context) { - return beginPrepareAsync(resourceGroupName, workspaceName, context).getSyncPoller(); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono prepareAsync(String resourceGroupName, String workspaceName) { - return beginPrepareAsync(resourceGroupName, workspaceName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono prepareAsync(String resourceGroupName, String workspaceName, - Context context) { - return beginPrepareAsync(resourceGroupName, workspaceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NotebookResourceInfoInner prepare(String resourceGroupName, String workspaceName) { - return prepareAsync(resourceGroupName, workspaceName).block(); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NotebookResourceInfoInner prepare(String resourceGroupName, String workspaceName, Context context) { - return prepareAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, accept, context); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync(String resourceGroupName, String workspaceName) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ListNotebookKeysResultInner listKeys(String resourceGroupName, String workspaceName) { - return listKeysAsync(resourceGroupName, workspaceName).block(); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebooksImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebooksImpl.java deleted file mode 100644 index efd6f0898b4a..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebooksImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.NotebooksClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListNotebookKeysResultInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookResourceInfoInner; -import com.azure.resourcemanager.machinelearningservices.models.ListNotebookKeysResult; -import com.azure.resourcemanager.machinelearningservices.models.NotebookResourceInfo; -import com.azure.resourcemanager.machinelearningservices.models.Notebooks; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class NotebooksImpl implements Notebooks { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(NotebooksImpl.class); - - private final NotebooksClient innerClient; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - public NotebooksImpl(NotebooksClient innerClient, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public NotebookResourceInfo prepare(String resourceGroupName, String workspaceName) { - NotebookResourceInfoInner inner = this.serviceClient().prepare(resourceGroupName, workspaceName); - if (inner != null) { - return new NotebookResourceInfoImpl(inner, this.manager()); - } else { - return null; - } - } - - public NotebookResourceInfo prepare(String resourceGroupName, String workspaceName, Context context) { - NotebookResourceInfoInner inner = this.serviceClient().prepare(resourceGroupName, workspaceName, context); - if (inner != null) { - return new NotebookResourceInfoImpl(inner, this.manager()); - } else { - return null; - } - } - - public ListNotebookKeysResult listKeys(String resourceGroupName, String workspaceName) { - ListNotebookKeysResultInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName); - if (inner != null) { - return new ListNotebookKeysResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - Context context) { - Response inner - = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ListNotebookKeysResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private NotebooksClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OperationImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OperationImpl.java deleted file mode 100644 index 78f5e500072d..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OperationImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.OperationInner; -import com.azure.resourcemanager.machinelearningservices.models.Operation; -import com.azure.resourcemanager.machinelearningservices.models.OperationDisplay; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - OperationImpl(OperationInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OperationsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OperationsClientImpl.java deleted file mode 100644 index d65b97d52dd3..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.OperationsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.OperationInner; -import com.azure.resourcemanager.machinelearningservices.models.OperationListResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final OperationsService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - private interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.MachineLearningServices/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of operations supported by the resource provider. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of operations supported by the resource provider. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); - } - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of operations supported by the resource provider. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync()); - } - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of operations supported by the resource provider. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context)); - } - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of operations supported by the resource provider. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of operations supported by the resource provider. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OperationsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OperationsImpl.java deleted file mode 100644 index 0f1e2a4ceefe..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OperationsImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.OperationsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.OperationInner; -import com.azure.resourcemanager.machinelearningservices.models.Operation; -import com.azure.resourcemanager.machinelearningservices.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class OperationsImpl implements Operations { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionImpl.java deleted file mode 100644 index 77cc3045aff1..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionImpl.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearningservices.models.Identity; -import com.azure.resourcemanager.machinelearningservices.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearningservices.models.PrivateEndpointConnection; -import com.azure.resourcemanager.machinelearningservices.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.machinelearningservices.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearningservices.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class PrivateEndpointConnectionImpl - implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update { - private PrivateEndpointConnectionInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager 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 PrivateEndpoint privateEndpoint() { - return this.innerModel().privateEndpoint(); - } - - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.innerModel().privateLinkServiceConnectionState(); - } - - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public Identity identity() { - return this.innerModel().identity(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public PrivateEndpointConnectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String privateEndpointConnectionName; - - public PrivateEndpointConnectionImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public PrivateEndpointConnection create() { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .putWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public PrivateEndpointConnection create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .putWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), - context) - .getValue(); - return this; - } - - PrivateEndpointConnectionImpl(String name, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = new PrivateEndpointConnectionInner(); - this.serviceManager = serviceManager; - this.privateEndpointConnectionName = name; - } - - public PrivateEndpointConnectionImpl update() { - return this; - } - - public PrivateEndpointConnection apply() { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .putWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public PrivateEndpointConnection apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .putWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), - context) - .getValue(); - return this; - } - - PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.privateEndpointConnectionName = Utils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); - } - - public PrivateEndpointConnection refresh() { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) - .getValue(); - return this; - } - - public PrivateEndpointConnection refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context) - .getValue(); - return this; - } - - public PrivateEndpointConnectionImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public PrivateEndpointConnectionImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public PrivateEndpointConnectionImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.innerModel().withPrivateEndpoint(privateEndpoint); - return this; - } - - public PrivateEndpointConnectionImpl - withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.innerModel().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); - return this; - } - - public PrivateEndpointConnectionImpl withIdentity(Identity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public PrivateEndpointConnectionImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionsClientImpl.java deleted file mode 100644 index b496ca9161ce..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionsClientImpl.java +++ /dev/null @@ -1,528 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.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.machinelearningservices.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.PrivateEndpointConnectionInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ -public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final PrivateEndpointConnectionsService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of PrivateEndpointConnectionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PrivateEndpointConnectionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesPrivateEndpointConnections to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - private interface PrivateEndpointConnectionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections" - + "/{privateEndpointConnectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections" - + "/{privateEndpointConnectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> put(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PrivateEndpointConnectionInner properties, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections" - + "/{privateEndpointConnectionName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - privateEndpointConnectionName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName) { - return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName) { - return getAsync(resourceGroupName, workspaceName, privateEndpointConnectionName).block(); - } - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context).block(); - } - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync(String resourceGroupName, - String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner properties) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), - properties, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync(String resourceGroupName, - String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner properties, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.put(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - privateEndpointConnectionName, this.client.getApiVersion(), properties, accept, context); - } - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono putAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner properties) { - return putWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, properties) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner put(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner properties) { - return putAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, properties).block(); - } - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response putWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner properties, Context context) { - return putWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, properties, - context).block(); - } - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context); - } - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - deleteAsync(resourceGroupName, workspaceName, privateEndpointConnectionName).block(); - } - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context) - .block(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionsImpl.java deleted file mode 100644 index 2c64f156e6f3..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionsImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearningservices.models.PrivateEndpointConnection; -import com.azure.resourcemanager.machinelearningservices.models.PrivateEndpointConnections; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsImpl.class); - - private final PrivateEndpointConnectionsClient innerClient; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient innerClient, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PrivateEndpointConnection get(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName) { - PrivateEndpointConnectionInner inner - = this.serviceClient().get(resourceGroupName, workspaceName, privateEndpointConnectionName); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - this.serviceClient().delete(resourceGroupName, workspaceName, privateEndpointConnectionName); - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); - } - - public PrivateEndpointConnection getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) - .getValue(); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); - } - - private PrivateEndpointConnectionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } - - public PrivateEndpointConnectionImpl define(String name) { - return new PrivateEndpointConnectionImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourceListResultImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourceListResultImpl.java deleted file mode 100644 index 863320d60622..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourceListResultImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.machinelearningservices.models.PrivateLinkResource; -import com.azure.resourcemanager.machinelearningservices.models.PrivateLinkResourceListResult; -import java.util.Collections; -import java.util.List; - -public final class PrivateLinkResourceListResultImpl implements PrivateLinkResourceListResult { - private PrivateLinkResourceListResultInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - PrivateLinkResourceListResultImpl(PrivateLinkResourceListResultInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public PrivateLinkResourceListResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourcesClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourcesClientImpl.java deleted file mode 100644 index fbaea5e3652d..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourcesClientImpl.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.PrivateLinkResourceListResultInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ -public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { - private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final PrivateLinkResourcesService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of PrivateLinkResourcesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PrivateLinkResourcesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(PrivateLinkResourcesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesPrivateLinkResources to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - private interface PrivateLinkResourcesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspace(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByWorkspaceWithResponseAsync(String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByWorkspace(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByWorkspaceWithResponseAsync(String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByWorkspace(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listByWorkspaceAsync(String resourceGroupName, - String workspaceName) { - return listByWorkspaceWithResponseAsync(resourceGroupName, workspaceName) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceListResultInner listByWorkspace(String resourceGroupName, String workspaceName) { - return listByWorkspaceAsync(resourceGroupName, workspaceName).block(); - } - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listByWorkspaceWithResponse(String resourceGroupName, - String workspaceName, Context context) { - return listByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourcesImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourcesImpl.java deleted file mode 100644 index 4b1bbbc74122..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourcesImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.machinelearningservices.models.PrivateLinkResourceListResult; -import com.azure.resourcemanager.machinelearningservices.models.PrivateLinkResources; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class PrivateLinkResourcesImpl implements PrivateLinkResources { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesImpl.class); - - private final PrivateLinkResourcesClient innerClient; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PrivateLinkResourceListResult listByWorkspace(String resourceGroupName, String workspaceName) { - PrivateLinkResourceListResultInner inner - = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - if (inner != null) { - return new PrivateLinkResourceListResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listByWorkspaceWithResponse(String resourceGroupName, - String workspaceName, Context context) { - Response inner - = this.serviceClient().listByWorkspaceWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateLinkResourceListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private PrivateLinkResourcesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/QuotasClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/QuotasClientImpl.java deleted file mode 100644 index bf2c0cf2caa1..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/QuotasClientImpl.java +++ /dev/null @@ -1,390 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.QuotasClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ResourceQuotaInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.UpdateWorkspaceQuotasResultInner; -import com.azure.resourcemanager.machinelearningservices.models.ListWorkspaceQuotas; -import com.azure.resourcemanager.machinelearningservices.models.QuotaUpdateParameters; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in QuotasClient. */ -public final class QuotasClientImpl implements QuotasClient { - private final ClientLogger logger = new ClientLogger(QuotasClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final QuotasService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of QuotasClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - QuotasClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(QuotasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesQuotas to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - private interface QuotasService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}" - + "/updateQuotas") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("location") String location, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") QuotaUpdateParameters parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String location, - QuotaUpdateParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String location, - QuotaUpdateParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String location, QuotaUpdateParameters parameters) { - return updateWithResponseAsync(location, parameters) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateWorkspaceQuotasResultInner update(String location, QuotaUpdateParameters parameters) { - return updateAsync(location, parameters).block(); - } - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String location, - QuotaUpdateParameters parameters, Context context) { - return updateWithResponseAsync(location, parameters, context).block(); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location) { - return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(location, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location) { - return new PagedIterable<>(listAsync(location)); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location, Context context) { - return new PagedIterable<>(listAsync(location, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List WorkspaceQuotasByVMFamily operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List WorkspaceQuotasByVMFamily operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/QuotasImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/QuotasImpl.java deleted file mode 100644 index f06635cbfb13..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/QuotasImpl.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.QuotasClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ResourceQuotaInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.UpdateWorkspaceQuotasResultInner; -import com.azure.resourcemanager.machinelearningservices.models.QuotaUpdateParameters; -import com.azure.resourcemanager.machinelearningservices.models.Quotas; -import com.azure.resourcemanager.machinelearningservices.models.ResourceQuota; -import com.azure.resourcemanager.machinelearningservices.models.UpdateWorkspaceQuotasResult; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class QuotasImpl implements Quotas { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(QuotasImpl.class); - - private final QuotasClient innerClient; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - public QuotasImpl(QuotasClient innerClient, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public UpdateWorkspaceQuotasResult update(String location, QuotaUpdateParameters parameters) { - UpdateWorkspaceQuotasResultInner inner = this.serviceClient().update(location, parameters); - if (inner != null) { - return new UpdateWorkspaceQuotasResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response updateWithResponse(String location, QuotaUpdateParameters parameters, - Context context) { - Response inner - = this.serviceClient().updateWithResponse(location, parameters, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new UpdateWorkspaceQuotasResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PagedIterable list(String location) { - PagedIterable inner = this.serviceClient().list(location); - return Utils.mapPage(inner, inner1 -> new ResourceQuotaImpl(inner1, this.manager())); - } - - public PagedIterable list(String location, Context context) { - PagedIterable inner = this.serviceClient().list(location, context); - return Utils.mapPage(inner, inner1 -> new ResourceQuotaImpl(inner1, this.manager())); - } - - private QuotasClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ResourceQuotaImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ResourceQuotaImpl.java deleted file mode 100644 index bb2cc4786ce9..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ResourceQuotaImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.ResourceQuotaInner; -import com.azure.resourcemanager.machinelearningservices.models.QuotaUnit; -import com.azure.resourcemanager.machinelearningservices.models.ResourceName; -import com.azure.resourcemanager.machinelearningservices.models.ResourceQuota; - -public final class ResourceQuotaImpl implements ResourceQuota { - private ResourceQuotaInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - ResourceQuotaImpl(ResourceQuotaInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String amlWorkspaceLocation() { - return this.innerModel().amlWorkspaceLocation(); - } - - public String type() { - return this.innerModel().type(); - } - - public ResourceName name() { - return this.innerModel().name(); - } - - public Long limit() { - return this.innerModel().limit(); - } - - public QuotaUnit unit() { - return this.innerModel().unit(); - } - - public ResourceQuotaInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ServiceResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ServiceResourceImpl.java deleted file mode 100644 index 6747124dff6a..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ServiceResourceImpl.java +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ServiceResourceInner; -import com.azure.resourcemanager.machinelearningservices.models.CreateServiceRequest; -import com.azure.resourcemanager.machinelearningservices.models.CreateServiceRequestEnvironmentImageRequest; -import com.azure.resourcemanager.machinelearningservices.models.CreateServiceRequestKeys; -import com.azure.resourcemanager.machinelearningservices.models.Identity; -import com.azure.resourcemanager.machinelearningservices.models.ServiceResource; -import com.azure.resourcemanager.machinelearningservices.models.ServiceResponseBase; -import com.azure.resourcemanager.machinelearningservices.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class ServiceResourceImpl implements ServiceResource, ServiceResource.Definition, ServiceResource.Update { - private ServiceResourceInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager 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 ServiceResponseBase properties() { - return this.innerModel().properties(); - } - - public Identity identity() { - return this.innerModel().identity(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public ServiceResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String serviceName; - - private CreateServiceRequest createProperties; - - private CreateServiceRequest updateProperties; - - public ServiceResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public ServiceResource create() { - this.innerObject = serviceManager.serviceClient() - .getMachineLearningServices() - .createOrUpdate(resourceGroupName, workspaceName, serviceName, createProperties, Context.NONE); - return this; - } - - public ServiceResource create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getMachineLearningServices() - .createOrUpdate(resourceGroupName, workspaceName, serviceName, createProperties, context); - return this; - } - - ServiceResourceImpl(String name, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = new ServiceResourceInner(); - this.serviceManager = serviceManager; - this.serviceName = name; - this.createProperties = new CreateServiceRequest(); - } - - public ServiceResourceImpl update() { - this.updateProperties = new CreateServiceRequest(); - return this; - } - - public ServiceResource apply() { - this.innerObject = serviceManager.serviceClient() - .getMachineLearningServices() - .createOrUpdate(resourceGroupName, workspaceName, serviceName, updateProperties, Context.NONE); - return this; - } - - public ServiceResource apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getMachineLearningServices() - .createOrUpdate(resourceGroupName, workspaceName, serviceName, updateProperties, context); - return this; - } - - ServiceResourceImpl(ServiceResourceInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.serviceName = Utils.getValueFromIdByName(innerObject.id(), "services"); - } - - public ServiceResource refresh() { - Boolean localExpand = null; - this.innerObject = serviceManager.serviceClient() - .getMachineLearningServices() - .getWithResponse(resourceGroupName, workspaceName, serviceName, localExpand, Context.NONE) - .getValue(); - return this; - } - - public ServiceResource refresh(Context context) { - Boolean localExpand = null; - this.innerObject = serviceManager.serviceClient() - .getMachineLearningServices() - .getWithResponse(resourceGroupName, workspaceName, serviceName, localExpand, context) - .getValue(); - return this; - } - - public ServiceResourceImpl withRegion(Region location) { - this.createProperties.withLocation(location.toString()); - return this; - } - - public ServiceResourceImpl withRegion(String location) { - this.createProperties.withLocation(location); - return this; - } - - public ServiceResourceImpl withDescription(String description) { - if (isInCreateMode()) { - this.createProperties.withDescription(description); - return this; - } else { - this.updateProperties.withDescription(description); - return this; - } - } - - public ServiceResourceImpl withKvTags(Map kvTags) { - if (isInCreateMode()) { - this.createProperties.withKvTags(kvTags); - return this; - } else { - this.updateProperties.withKvTags(kvTags); - return this; - } - } - - public ServiceResourceImpl withProperties(Map properties) { - if (isInCreateMode()) { - this.createProperties.withProperties(properties); - return this; - } else { - this.updateProperties.withProperties(properties); - return this; - } - } - - public ServiceResourceImpl withKeys(CreateServiceRequestKeys keys) { - if (isInCreateMode()) { - this.createProperties.withKeys(keys); - return this; - } else { - this.updateProperties.withKeys(keys); - return this; - } - } - - public ServiceResourceImpl - withEnvironmentImageRequest(CreateServiceRequestEnvironmentImageRequest environmentImageRequest) { - if (isInCreateMode()) { - this.createProperties.withEnvironmentImageRequest(environmentImageRequest); - return this; - } else { - this.updateProperties.withEnvironmentImageRequest(environmentImageRequest); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/StorageAccountsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/StorageAccountsClientImpl.java deleted file mode 100644 index 881836e9479e..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/StorageAccountsClientImpl.java +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.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.machinelearningservices.fluent.StorageAccountsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListStorageAccountKeysResultInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in StorageAccountsClient. */ -public final class StorageAccountsClientImpl implements StorageAccountsClient { - private final ClientLogger logger = new ClientLogger(StorageAccountsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final StorageAccountsService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of StorageAccountsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - StorageAccountsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(StorageAccountsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesStorageAccounts to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - private interface StorageAccountsService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, accept, context); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync(String resourceGroupName, String workspaceName) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ListStorageAccountKeysResultInner listKeys(String resourceGroupName, String workspaceName) { - return listKeysAsync(resourceGroupName, workspaceName).block(); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse(String resourceGroupName, - String workspaceName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/StorageAccountsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/StorageAccountsImpl.java deleted file mode 100644 index 8603e23fe8fd..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/StorageAccountsImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.StorageAccountsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListStorageAccountKeysResultInner; -import com.azure.resourcemanager.machinelearningservices.models.ListStorageAccountKeysResult; -import com.azure.resourcemanager.machinelearningservices.models.StorageAccounts; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class StorageAccountsImpl implements StorageAccounts { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(StorageAccountsImpl.class); - - private final StorageAccountsClient innerClient; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - public StorageAccountsImpl(StorageAccountsClient innerClient, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public ListStorageAccountKeysResult listKeys(String resourceGroupName, String workspaceName) { - ListStorageAccountKeysResultInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName); - if (inner != null) { - return new ListStorageAccountKeysResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - Context context) { - Response inner - = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ListStorageAccountKeysResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private StorageAccountsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/UpdateWorkspaceQuotasResultImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/UpdateWorkspaceQuotasResultImpl.java deleted file mode 100644 index 7531910b82bc..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/UpdateWorkspaceQuotasResultImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.UpdateWorkspaceQuotasResultInner; -import com.azure.resourcemanager.machinelearningservices.models.UpdateWorkspaceQuotas; -import com.azure.resourcemanager.machinelearningservices.models.UpdateWorkspaceQuotasResult; -import java.util.Collections; -import java.util.List; - -public final class UpdateWorkspaceQuotasResultImpl implements UpdateWorkspaceQuotasResult { - private UpdateWorkspaceQuotasResultInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - UpdateWorkspaceQuotasResultImpl(UpdateWorkspaceQuotasResultInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String nextLink() { - return this.innerModel().nextLink(); - } - - public UpdateWorkspaceQuotasResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/UsageImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/UsageImpl.java deleted file mode 100644 index 66f796e02d6a..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/UsageImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.UsageInner; -import com.azure.resourcemanager.machinelearningservices.models.Usage; -import com.azure.resourcemanager.machinelearningservices.models.UsageName; -import com.azure.resourcemanager.machinelearningservices.models.UsageUnit; - -public final class UsageImpl implements Usage { - private UsageInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - UsageImpl(UsageInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String amlWorkspaceLocation() { - return this.innerModel().amlWorkspaceLocation(); - } - - public String type() { - return this.innerModel().type(); - } - - public UsageUnit unit() { - return this.innerModel().unit(); - } - - public Long currentValue() { - return this.innerModel().currentValue(); - } - - public Long limit() { - return this.innerModel().limit(); - } - - public UsageName name() { - return this.innerModel().name(); - } - - public UsageInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/UsagesClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/UsagesClientImpl.java deleted file mode 100644 index c36f17872e66..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/UsagesClientImpl.java +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.UsagesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.UsageInner; -import com.azure.resourcemanager.machinelearningservices.models.ListUsagesResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in UsagesClient. */ -public final class UsagesClientImpl implements UsagesClient { - private final ClientLogger logger = new ClientLogger(UsagesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final UsagesService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of UsagesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - UsagesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(UsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesUsages to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - private interface UsagesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for AML resources for given subscription and location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for AML resources for given subscription and location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for AML resources for given subscription and location. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location) { - return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for AML resources for given subscription and location. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(location, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for AML resources for given subscription and location. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location) { - return new PagedIterable<>(listAsync(location)); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for AML resources for given subscription and location. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location, Context context) { - return new PagedIterable<>(listAsync(location, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Usages operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Usages operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/UsagesImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/UsagesImpl.java deleted file mode 100644 index 5f3033a8bf2c..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/UsagesImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.UsagesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.UsageInner; -import com.azure.resourcemanager.machinelearningservices.models.Usage; -import com.azure.resourcemanager.machinelearningservices.models.Usages; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class UsagesImpl implements Usages { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(UsagesImpl.class); - - private final UsagesClient innerClient; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - public UsagesImpl(UsagesClient innerClient, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String location) { - PagedIterable inner = this.serviceClient().list(location); - return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); - } - - public PagedIterable list(String location, Context context) { - PagedIterable inner = this.serviceClient().list(location, context); - return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); - } - - private UsagesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/Utils.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/Utils.java deleted file mode 100644 index 973dbe59a9f8..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/Utils.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/VirtualMachineSizeListResultImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/VirtualMachineSizeListResultImpl.java deleted file mode 100644 index 2c9ff6e26a66..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/VirtualMachineSizeListResultImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.VirtualMachineSizeListResultInner; -import com.azure.resourcemanager.machinelearningservices.models.VirtualMachineSize; -import com.azure.resourcemanager.machinelearningservices.models.VirtualMachineSizeListResult; -import java.util.Collections; -import java.util.List; - -public final class VirtualMachineSizeListResultImpl implements VirtualMachineSizeListResult { - private VirtualMachineSizeListResultInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - VirtualMachineSizeListResultImpl(VirtualMachineSizeListResultInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List amlCompute() { - List inner = this.innerModel().amlCompute(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public VirtualMachineSizeListResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/VirtualMachineSizesClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/VirtualMachineSizesClientImpl.java deleted file mode 100644 index 53cf5ad81434..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/VirtualMachineSizesClientImpl.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.VirtualMachineSizesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.VirtualMachineSizeListResultInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in VirtualMachineSizesClient. */ -public final class VirtualMachineSizesClientImpl implements VirtualMachineSizesClient { - private final ClientLogger logger = new ClientLogger(VirtualMachineSizesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final VirtualMachineSizesService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of VirtualMachineSizesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - VirtualMachineSizesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(VirtualMachineSizesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesVirtualMachineSizes to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - private interface VirtualMachineSizesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("location") String location, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); - } - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String location) { - return listWithResponseAsync(location).flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineSizeListResultInner list(String location) { - return listAsync(location).block(); - } - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String location, Context context) { - return listWithResponseAsync(location, context).block(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/VirtualMachineSizesImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/VirtualMachineSizesImpl.java deleted file mode 100644 index 1fc23b958acc..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/VirtualMachineSizesImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.VirtualMachineSizesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.VirtualMachineSizeListResultInner; -import com.azure.resourcemanager.machinelearningservices.models.VirtualMachineSizeListResult; -import com.azure.resourcemanager.machinelearningservices.models.VirtualMachineSizes; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class VirtualMachineSizesImpl implements VirtualMachineSizes { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(VirtualMachineSizesImpl.class); - - private final VirtualMachineSizesClient innerClient; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - public VirtualMachineSizesImpl(VirtualMachineSizesClient innerClient, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public VirtualMachineSizeListResult list(String location) { - VirtualMachineSizeListResultInner inner = this.serviceClient().list(location); - if (inner != null) { - return new VirtualMachineSizeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse(String location, Context context) { - Response inner = this.serviceClient().listWithResponse(location, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VirtualMachineSizeListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private VirtualMachineSizesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionImpl.java deleted file mode 100644 index fc1685e062e4..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionImpl.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceConnectionInner; -import com.azure.resourcemanager.machinelearningservices.models.ValueFormat; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceConnection; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceConnectionDto; - -public final class WorkspaceConnectionImpl implements WorkspaceConnection, WorkspaceConnection.Definition { - private WorkspaceConnectionInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - WorkspaceConnectionImpl(WorkspaceConnectionInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String category() { - return this.innerModel().category(); - } - - public String target() { - return this.innerModel().target(); - } - - public String authType() { - return this.innerModel().authType(); - } - - public String value() { - return this.innerModel().value(); - } - - public ValueFormat valueFormat() { - return this.innerModel().valueFormat(); - } - - public WorkspaceConnectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String connectionName; - - private WorkspaceConnectionDto createParameters; - - public WorkspaceConnectionImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public WorkspaceConnection create() { - this.innerObject = serviceManager.serviceClient() - .getWorkspaceConnections() - .createWithResponse(resourceGroupName, workspaceName, connectionName, createParameters, Context.NONE) - .getValue(); - return this; - } - - public WorkspaceConnection create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkspaceConnections() - .createWithResponse(resourceGroupName, workspaceName, connectionName, createParameters, context) - .getValue(); - return this; - } - - WorkspaceConnectionImpl(String name, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = new WorkspaceConnectionInner(); - this.serviceManager = serviceManager; - this.connectionName = name; - this.createParameters = new WorkspaceConnectionDto(); - } - - public WorkspaceConnection refresh() { - this.innerObject = serviceManager.serviceClient() - .getWorkspaceConnections() - .getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE) - .getValue(); - return this; - } - - public WorkspaceConnection refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkspaceConnections() - .getWithResponse(resourceGroupName, workspaceName, connectionName, context) - .getValue(); - return this; - } - - public WorkspaceConnectionImpl withName(String name) { - this.createParameters.withName(name); - return this; - } - - public WorkspaceConnectionImpl withCategory(String category) { - this.createParameters.withCategory(category); - return this; - } - - public WorkspaceConnectionImpl withTarget(String target) { - this.createParameters.withTarget(target); - return this; - } - - public WorkspaceConnectionImpl withAuthType(String authType) { - this.createParameters.withAuthType(authType); - return this; - } - - public WorkspaceConnectionImpl withValue(String value) { - this.createParameters.withValue(value); - return this; - } - - public WorkspaceConnectionImpl withValueFormat(ValueFormat valueFormat) { - this.createParameters.withValueFormat(valueFormat); - return this; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionsClientImpl.java deleted file mode 100644 index 777e08b4a386..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionsClientImpl.java +++ /dev/null @@ -1,697 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceConnectionsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceConnectionInner; -import com.azure.resourcemanager.machinelearningservices.models.PaginatedWorkspaceConnectionsList; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceConnectionDto; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in WorkspaceConnectionsClient. */ -public final class WorkspaceConnectionsClientImpl implements WorkspaceConnectionsClient { - private final ClientLogger logger = new ClientLogger(WorkspaceConnectionsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final WorkspaceConnectionsService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of WorkspaceConnectionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkspaceConnectionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(WorkspaceConnectionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaceConnections to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - private interface WorkspaceConnectionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("target") String target, - @QueryParam("category") String category, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkspaceConnectionDto parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List all connections under a AML workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Workspace connection objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String target, String category) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), target, category, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all connections under a AML workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Workspace connection objects. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String target, String category, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), target, category, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); - } - - /** - * List all connections under a AML workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Workspace connection objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String target, - String category) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, target, category)); - } - - /** - * List all connections under a AML workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Workspace connection objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String target = null; - final String category = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, target, category)); - } - - /** - * List all connections under a AML workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Workspace connection objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String target, - String category, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, target, category, context)); - } - - /** - * List all connections under a AML workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Workspace connection objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String target = null; - final String category = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, target, category)); - } - - /** - * List all connections under a AML workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Workspace connection objects. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String target, - String category, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, target, category, context)); - } - - /** - * Add a new workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String resourceGroupName, - String workspaceName, String connectionName, WorkspaceConnectionDto parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, connectionName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Add a new workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String resourceGroupName, - String workspaceName, String connectionName, WorkspaceConnectionDto parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, connectionName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Add a new workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String workspaceName, - String connectionName, WorkspaceConnectionDto parameters) { - return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, parameters) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Add a new workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionInner create(String resourceGroupName, String workspaceName, String connectionName, - WorkspaceConnectionDto parameters) { - return createAsync(resourceGroupName, workspaceName, connectionName, parameters).block(); - } - - /** - * Add a new workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(String resourceGroupName, String workspaceName, - String connectionName, WorkspaceConnectionDto parameters, Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, parameters, context).block(); - } - - /** - * Get the detail of a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String connectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the detail of a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String connectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - connectionName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the detail of a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, - String connectionName) { - return getWithResponseAsync(resourceGroupName, workspaceName, connectionName) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get the detail of a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionInner get(String resourceGroupName, String workspaceName, String connectionName) { - return getAsync(resourceGroupName, workspaceName, connectionName).block(); - } - - /** - * Get the detail of a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String connectionName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); - } - - /** - * Delete a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String connectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String connectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, connectionName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String connectionName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Delete a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String connectionName) { - deleteAsync(resourceGroupName, workspaceName, connectionName).block(); - } - - /** - * Delete a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String connectionName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionsImpl.java deleted file mode 100644 index 82a502246623..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionsImpl.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.WorkspaceConnectionsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceConnectionInner; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceConnection; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceConnections; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class WorkspaceConnectionsImpl implements WorkspaceConnections { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(WorkspaceConnectionsImpl.class); - - private final WorkspaceConnectionsClient innerClient; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - public WorkspaceConnectionsImpl(WorkspaceConnectionsClient innerClient, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new WorkspaceConnectionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String target, - String category, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, target, category, context); - return Utils.mapPage(inner, inner1 -> new WorkspaceConnectionImpl(inner1, this.manager())); - } - - public WorkspaceConnection get(String resourceGroupName, String workspaceName, String connectionName) { - WorkspaceConnectionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, connectionName); - if (inner != null) { - return new WorkspaceConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String workspaceName, - String connectionName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, connectionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkspaceConnectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String connectionName) { - this.serviceClient().delete(resourceGroupName, workspaceName, connectionName); - } - - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String connectionName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, connectionName, context); - } - - public WorkspaceConnection getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String connectionName = Utils.getValueFromIdByName(id, "connections"); - if (connectionName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String connectionName = Utils.getValueFromIdByName(id, "connections"); - if (connectionName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, connectionName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String connectionName = Utils.getValueFromIdByName(id, "connections"); - if (connectionName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); - } - this.deleteWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - String connectionName = Utils.getValueFromIdByName(id, "connections"); - if (connectionName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, connectionName, context); - } - - private WorkspaceConnectionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } - - public WorkspaceConnectionImpl define(String name) { - return new WorkspaceConnectionImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceFeaturesClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceFeaturesClientImpl.java deleted file mode 100644 index 081c1315f737..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceFeaturesClientImpl.java +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceFeaturesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.AmlUserFeatureInner; -import com.azure.resourcemanager.machinelearningservices.models.ListAmlUserFeatureResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in WorkspaceFeaturesClient. */ -public final class WorkspaceFeaturesClientImpl implements WorkspaceFeaturesClient { - private final ClientLogger logger = new ClientLogger(WorkspaceFeaturesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final WorkspaceFeaturesService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of WorkspaceFeaturesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkspaceFeaturesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(WorkspaceFeaturesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaceFeatures to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - private interface WorkspaceFeaturesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceFeaturesImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceFeaturesImpl.java deleted file mode 100644 index c2b0779c0272..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceFeaturesImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceFeaturesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.AmlUserFeatureInner; -import com.azure.resourcemanager.machinelearningservices.models.AmlUserFeature; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceFeatures; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class WorkspaceFeaturesImpl implements WorkspaceFeatures { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(WorkspaceFeaturesImpl.class); - - private final WorkspaceFeaturesClient innerClient; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - public WorkspaceFeaturesImpl(WorkspaceFeaturesClient innerClient, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new AmlUserFeatureImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, context); - return Utils.mapPage(inner, inner1 -> new AmlUserFeatureImpl(inner1, this.manager())); - } - - private WorkspaceFeaturesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceImpl.java deleted file mode 100644 index 6bfc61f056f5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceImpl.java +++ /dev/null @@ -1,431 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookResourceInfoInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.machinelearningservices.models.EncryptionProperty; -import com.azure.resourcemanager.machinelearningservices.models.Identity; -import com.azure.resourcemanager.machinelearningservices.models.ListWorkspaceKeysResult; -import com.azure.resourcemanager.machinelearningservices.models.NotebookAccessTokenResult; -import com.azure.resourcemanager.machinelearningservices.models.NotebookResourceInfo; -import com.azure.resourcemanager.machinelearningservices.models.PrivateEndpointConnection; -import com.azure.resourcemanager.machinelearningservices.models.ProvisioningState; -import com.azure.resourcemanager.machinelearningservices.models.ServiceManagedResourcesSettings; -import com.azure.resourcemanager.machinelearningservices.models.SharedPrivateLinkResource; -import com.azure.resourcemanager.machinelearningservices.models.Sku; -import com.azure.resourcemanager.machinelearningservices.models.Workspace; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceUpdateParameters; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -public final class WorkspaceImpl implements Workspace, Workspace.Definition, Workspace.Update { - private WorkspaceInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager 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 workspaceId() { - return this.innerModel().workspaceId(); - } - - public String description() { - return this.innerModel().description(); - } - - public String friendlyName() { - return this.innerModel().friendlyName(); - } - - public String keyVault() { - return this.innerModel().keyVault(); - } - - public String applicationInsights() { - return this.innerModel().applicationInsights(); - } - - public String containerRegistry() { - return this.innerModel().containerRegistry(); - } - - public String storageAccount() { - return this.innerModel().storageAccount(); - } - - public String discoveryUrl() { - return this.innerModel().discoveryUrl(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public EncryptionProperty encryption() { - return this.innerModel().encryption(); - } - - public Boolean hbiWorkspace() { - return this.innerModel().hbiWorkspace(); - } - - public String serviceProvisionedResourceGroup() { - return this.innerModel().serviceProvisionedResourceGroup(); - } - - public Integer privateLinkCount() { - return this.innerModel().privateLinkCount(); - } - - public String imageBuildCompute() { - return this.innerModel().imageBuildCompute(); - } - - public Boolean allowPublicAccessWhenBehindVnet() { - return this.innerModel().allowPublicAccessWhenBehindVnet(); - } - - public List privateEndpointConnections() { - List inner = this.innerModel().privateEndpointConnections(); - if (inner != null) { - return Collections.unmodifiableList(inner.stream() - .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public List sharedPrivateLinkResources() { - List inner = this.innerModel().sharedPrivateLinkResources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public NotebookResourceInfo notebookInfo() { - NotebookResourceInfoInner inner = this.innerModel().notebookInfo(); - if (inner != null) { - return new NotebookResourceInfoImpl(inner, this.manager()); - } else { - return null; - } - } - - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerModel().serviceManagedResourcesSettings(); - } - - public String primaryUserAssignedIdentity() { - return this.innerModel().primaryUserAssignedIdentity(); - } - - public String tenantId() { - return this.innerModel().tenantId(); - } - - public Identity identity() { - return this.innerModel().identity(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public WorkspaceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private WorkspaceUpdateParameters updateParameters; - - public WorkspaceImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public Workspace create() { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .createOrUpdate(resourceGroupName, workspaceName, this.innerModel(), Context.NONE); - return this; - } - - public Workspace create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .createOrUpdate(resourceGroupName, workspaceName, this.innerModel(), context); - return this; - } - - WorkspaceImpl(String name, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = new WorkspaceInner(); - this.serviceManager = serviceManager; - this.workspaceName = name; - } - - public WorkspaceImpl update() { - this.updateParameters = new WorkspaceUpdateParameters(); - return this; - } - - public Workspace apply() { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .updateWithResponse(resourceGroupName, workspaceName, updateParameters, Context.NONE) - .getValue(); - return this; - } - - public Workspace apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .updateWithResponse(resourceGroupName, workspaceName, updateParameters, context) - .getValue(); - return this; - } - - WorkspaceImpl(WorkspaceInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - } - - public Workspace refresh() { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE) - .getValue(); - return this; - } - - public Workspace refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkspaces() - .getByResourceGroupWithResponse(resourceGroupName, workspaceName, context) - .getValue(); - return this; - } - - public ListWorkspaceKeysResult listKeys() { - return serviceManager.workspaces().listKeys(resourceGroupName, workspaceName); - } - - public Response listKeysWithResponse(Context context) { - return serviceManager.workspaces().listKeysWithResponse(resourceGroupName, workspaceName, context); - } - - public void resyncKeys() { - serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName); - } - - public void resyncKeys(Context context) { - serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName, context); - } - - public NotebookAccessTokenResult listNotebookAccessToken() { - return serviceManager.workspaces().listNotebookAccessToken(resourceGroupName, workspaceName); - } - - public Response listNotebookAccessTokenWithResponse(Context context) { - return serviceManager.workspaces() - .listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, context); - } - - public WorkspaceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public WorkspaceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public WorkspaceImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateParameters.withTags(tags); - return this; - } - } - - public WorkspaceImpl withDescription(String description) { - if (isInCreateMode()) { - this.innerModel().withDescription(description); - return this; - } else { - this.updateParameters.withDescription(description); - return this; - } - } - - public WorkspaceImpl withFriendlyName(String friendlyName) { - if (isInCreateMode()) { - this.innerModel().withFriendlyName(friendlyName); - return this; - } else { - this.updateParameters.withFriendlyName(friendlyName); - return this; - } - } - - public WorkspaceImpl withKeyVault(String keyVault) { - this.innerModel().withKeyVault(keyVault); - return this; - } - - public WorkspaceImpl withApplicationInsights(String applicationInsights) { - this.innerModel().withApplicationInsights(applicationInsights); - return this; - } - - public WorkspaceImpl withContainerRegistry(String containerRegistry) { - this.innerModel().withContainerRegistry(containerRegistry); - return this; - } - - public WorkspaceImpl withStorageAccount(String storageAccount) { - this.innerModel().withStorageAccount(storageAccount); - return this; - } - - public WorkspaceImpl withDiscoveryUrl(String discoveryUrl) { - this.innerModel().withDiscoveryUrl(discoveryUrl); - return this; - } - - public WorkspaceImpl withEncryption(EncryptionProperty encryption) { - this.innerModel().withEncryption(encryption); - return this; - } - - public WorkspaceImpl withHbiWorkspace(Boolean hbiWorkspace) { - this.innerModel().withHbiWorkspace(hbiWorkspace); - return this; - } - - public WorkspaceImpl withImageBuildCompute(String imageBuildCompute) { - if (isInCreateMode()) { - this.innerModel().withImageBuildCompute(imageBuildCompute); - return this; - } else { - this.updateParameters.withImageBuildCompute(imageBuildCompute); - return this; - } - } - - public WorkspaceImpl withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { - this.innerModel().withAllowPublicAccessWhenBehindVnet(allowPublicAccessWhenBehindVnet); - return this; - } - - public WorkspaceImpl withSharedPrivateLinkResources(List sharedPrivateLinkResources) { - this.innerModel().withSharedPrivateLinkResources(sharedPrivateLinkResources); - return this; - } - - public WorkspaceImpl - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { - if (isInCreateMode()) { - this.innerModel().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); - return this; - } else { - this.updateParameters.withServiceManagedResourcesSettings(serviceManagedResourcesSettings); - return this; - } - } - - public WorkspaceImpl withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - if (isInCreateMode()) { - this.innerModel().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); - return this; - } else { - this.updateParameters.withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); - return this; - } - } - - public WorkspaceImpl withIdentity(Identity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateParameters.withIdentity(identity); - return this; - } - } - - public WorkspaceImpl withSku(Sku sku) { - if (isInCreateMode()) { - this.innerModel().withSku(sku); - return this; - } else { - this.updateParameters.withSku(sku); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceOperationsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceOperationsClientImpl.java deleted file mode 100644 index 5678a7272d2b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceOperationsClientImpl.java +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceOperationsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceSkuInner; -import com.azure.resourcemanager.machinelearningservices.models.SkuListResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in WorkspaceOperationsClient. */ -public final class WorkspaceOperationsClientImpl implements WorkspaceOperationsClient { - private final ClientLogger logger = new ClientLogger(WorkspaceOperationsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final WorkspaceOperationsService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of WorkspaceOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkspaceOperationsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(WorkspaceOperationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaceOperations to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - private interface WorkspaceOperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces/skus") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSkus(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSkusNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all skus with associated features. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of skus with features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required 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.listSkus(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all skus with associated features. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of skus with features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusSinglePageAsync(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 - .listSkus(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all skus with associated features. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of skus with features. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync() { - return new PagedFlux<>(() -> listSkusSinglePageAsync(), nextLink -> listSkusNextSinglePageAsync(nextLink)); - } - - /** - * Lists all skus with associated features. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of skus with features. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync(Context context) { - return new PagedFlux<>(() -> listSkusSinglePageAsync(context), - nextLink -> listSkusNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all skus with associated features. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of skus with features. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSkus() { - return new PagedIterable<>(listSkusAsync()); - } - - /** - * Lists all skus with associated features. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of skus with features. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSkus(Context context) { - return new PagedIterable<>(listSkusAsync(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 list of skus with features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listSkusNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The 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 list of skus with features. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listSkusNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceOperationsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceOperationsImpl.java deleted file mode 100644 index c7e3f6c4f839..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceOperationsImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceOperationsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceSkuInner; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceOperations; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceSku; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class WorkspaceOperationsImpl implements WorkspaceOperations { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(WorkspaceOperationsImpl.class); - - private final WorkspaceOperationsClient innerClient; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - public WorkspaceOperationsImpl(WorkspaceOperationsClient innerClient, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listSkus() { - PagedIterable inner = this.serviceClient().listSkus(); - return Utils.mapPage(inner, inner1 -> new WorkspaceSkuImpl(inner1, this.manager())); - } - - public PagedIterable listSkus(Context context) { - PagedIterable inner = this.serviceClient().listSkus(context); - return Utils.mapPage(inner, inner1 -> new WorkspaceSkuImpl(inner1, this.manager())); - } - - private WorkspaceOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceSkuImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceSkuImpl.java deleted file mode 100644 index ba493eb8345a..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceSkuImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceSkuInner; -import com.azure.resourcemanager.machinelearningservices.models.ResourceSkuLocationInfo; -import com.azure.resourcemanager.machinelearningservices.models.Restriction; -import com.azure.resourcemanager.machinelearningservices.models.SkuCapability; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceSku; -import java.util.Collections; -import java.util.List; - -public final class WorkspaceSkuImpl implements WorkspaceSku { - private WorkspaceSkuInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - WorkspaceSkuImpl(WorkspaceSkuInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List locations() { - List inner = this.innerModel().locations(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List locationInfo() { - List inner = this.innerModel().locationInfo(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String tier() { - return this.innerModel().tier(); - } - - public String resourceType() { - return this.innerModel().resourceType(); - } - - public String name() { - return this.innerModel().name(); - } - - public List capabilities() { - List inner = this.innerModel().capabilities(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List restrictions() { - List inner = this.innerModel().restrictions(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public WorkspaceSkuInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspacesClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspacesClientImpl.java deleted file mode 100644 index a970dd318aa2..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspacesClientImpl.java +++ /dev/null @@ -1,1727 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.WorkspacesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListWorkspaceKeysResultInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookAccessTokenResultInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceListResult; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceUpdateParameters; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in WorkspacesClient. */ -public final class WorkspacesClientImpl implements WorkspacesClient { - private final ClientLogger logger = new ClientLogger(WorkspacesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final WorkspacesService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of WorkspacesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkspacesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service - = RestProxy.create(WorkspacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaces to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - private interface WorkspacesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({ 200, 201, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") WorkspaceInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") WorkspaceUpdateParameters parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resyncKeys(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNotebookAccessToken(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); - } - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { - return getByResourceGroupAsync(resourceGroupName, workspaceName).block(); - } - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, WorkspaceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, WorkspaceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, parameters, accept, context); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, Context.NONE); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, context); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - WorkspaceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - WorkspaceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters) { - return createOrUpdateAsync(resourceGroupName, workspaceName, parameters).block(); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters, - Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).block(); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, accept, context); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - Context.NONE); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName) { - return beginDeleteAsync(resourceGroupName, workspaceName).getSyncPoller(); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, context).getSyncPoller(); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName) { - return beginDeleteAsync(resourceGroupName, workspaceName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName) { - deleteAsync(resourceGroupName, workspaceName).block(); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, Context context) { - deleteAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, parameters, accept, context); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters) { - return updateWithResponseAsync(resourceGroupName, workspaceName, parameters) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters) { - return updateAsync(resourceGroupName, workspaceName, parameters).block(); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, workspaceName, parameters, context).block(); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String skip) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String skip, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skip) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skip), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName Name of the resource group in which workspace 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 result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final String skip = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skip), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skip, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skip, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName Name of the resource group in which workspace 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 result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final String skip = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skip)); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skip, context)); - } - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, accept, context); - } - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync(String resourceGroupName, String workspaceName) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ListWorkspaceKeysResultInner listKeys(String resourceGroupName, String workspaceName) { - return listKeysAsync(resourceGroupName, workspaceName).block(); - } - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncKeysWithResponseAsync(String resourceGroupName, - String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.resyncKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncKeysWithResponseAsync(String resourceGroupName, String workspaceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.resyncKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginResyncKeysAsync(String resourceGroupName, String workspaceName) { - Mono>> mono = resyncKeysWithResponseAsync(resourceGroupName, workspaceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - Context.NONE); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginResyncKeysAsync(String resourceGroupName, String workspaceName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = resyncKeysWithResponseAsync(resourceGroupName, workspaceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName) { - return beginResyncKeysAsync(resourceGroupName, workspaceName).getSyncPoller(); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName, - Context context) { - return beginResyncKeysAsync(resourceGroupName, workspaceName, context).getSyncPoller(); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncKeysAsync(String resourceGroupName, String workspaceName) { - return beginResyncKeysAsync(resourceGroupName, workspaceName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncKeysAsync(String resourceGroupName, String workspaceName, Context context) { - return beginResyncKeysAsync(resourceGroupName, workspaceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void resyncKeys(String resourceGroupName, String workspaceName) { - resyncKeysAsync(resourceGroupName, workspaceName).block(); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void resyncKeys(String resourceGroupName, String workspaceName, Context context) { - resyncKeysAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skip) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skip, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), skip, accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(skip), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(skip), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skip, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(skip, context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String skip = null; - return new PagedIterable<>(listAsync(skip)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String skip, Context context) { - return new PagedIterable<>(listAsync(skip, context)); - } - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listNotebookAccessTokenWithResponseAsync(String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listNotebookAccessToken(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listNotebookAccessTokenWithResponseAsync(String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNotebookAccessToken(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); - } - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listNotebookAccessTokenAsync(String resourceGroupName, - String workspaceName) { - return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName) - .flatMap((Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName) { - return listNotebookAccessTokenAsync(resourceGroupName, workspaceName).block(); - } - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listNotebookAccessTokenWithResponse(String resourceGroupName, - String workspaceName, Context context) { - return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @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 the result of a request to list machine learning workspaces. - */ - @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 the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspacesImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspacesImpl.java deleted file mode 100644 index 025105b217d7..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspacesImpl.java +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.WorkspacesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListWorkspaceKeysResultInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookAccessTokenResultInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.machinelearningservices.models.ListWorkspaceKeysResult; -import com.azure.resourcemanager.machinelearningservices.models.NotebookAccessTokenResult; -import com.azure.resourcemanager.machinelearningservices.models.Workspace; -import com.azure.resourcemanager.machinelearningservices.models.Workspaces; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class WorkspacesImpl implements Workspaces { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(WorkspacesImpl.class); - - private final WorkspacesClient innerClient; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - public WorkspacesImpl(WorkspacesClient innerClient, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Workspace getByResourceGroup(String resourceGroupName, String workspaceName) { - WorkspaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, workspaceName); - if (inner != null) { - return new WorkspaceImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkspaceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String workspaceName) { - this.serviceClient().delete(resourceGroupName, workspaceName); - } - - public void delete(String resourceGroupName, String workspaceName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, skip, context); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public ListWorkspaceKeysResult listKeys(String resourceGroupName, String workspaceName) { - ListWorkspaceKeysResultInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName); - if (inner != null) { - return new ListWorkspaceKeysResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - Context context) { - Response inner - = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ListWorkspaceKeysResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void resyncKeys(String resourceGroupName, String workspaceName) { - this.serviceClient().resyncKeys(resourceGroupName, workspaceName); - } - - public void resyncKeys(String resourceGroupName, String workspaceName, Context context) { - this.serviceClient().resyncKeys(resourceGroupName, workspaceName, context); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public PagedIterable list(String skip, Context context) { - PagedIterable inner = this.serviceClient().list(skip, context); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupName, String workspaceName) { - NotebookAccessTokenResultInner inner - = this.serviceClient().listNotebookAccessToken(resourceGroupName, workspaceName); - if (inner != null) { - return new NotebookAccessTokenResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listNotebookAccessTokenWithResponse(String resourceGroupName, - String workspaceName, Context context) { - Response inner - = this.serviceClient().listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NotebookAccessTokenResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Workspace getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - this.delete(resourceGroupName, workspaceName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); - if (workspaceName == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); - } - this.delete(resourceGroupName, workspaceName, context); - } - - private WorkspacesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } - - public WorkspaceImpl define(String name) { - return new WorkspaceImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/package-info.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/package-info.java deleted file mode 100644 index 5632113f83ea..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the implementations for AzureMachineLearningWorkspaces. These APIs allow end users to operate on - * Azure Machine Learning Workspace resources. - */ -package com.azure.resourcemanager.machinelearningservices.implementation; diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequest.java deleted file mode 100644 index 36372691e0b5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequest.java +++ /dev/null @@ -1,375 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** The AciServiceCreateRequest model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("ACI") -@Fluent -public final class AciServiceCreateRequest extends CreateServiceRequest { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AciServiceCreateRequest.class); - - /* - * The container resource requirements. - */ - @JsonProperty(value = "containerResourceRequirements") - private ContainerResourceRequirements containerResourceRequirements; - - /* - * Whether or not authentication is enabled on the service. - */ - @JsonProperty(value = "authEnabled") - private Boolean authEnabled; - - /* - * Whether or not SSL is enabled. - */ - @JsonProperty(value = "sslEnabled") - private Boolean sslEnabled; - - /* - * Whether or not Application Insights is enabled. - */ - @JsonProperty(value = "appInsightsEnabled") - private Boolean appInsightsEnabled; - - /* - * Details of the data collection options specified. - */ - @JsonProperty(value = "dataCollection") - private AciServiceCreateRequestDataCollection dataCollection; - - /* - * The public SSL certificate in PEM format to use if SSL is enabled. - */ - @JsonProperty(value = "sslCertificate") - private String sslCertificate; - - /* - * The public SSL key in PEM format for the certificate. - */ - @JsonProperty(value = "sslKey") - private String sslKey; - - /* - * The CName for the service. - */ - @JsonProperty(value = "cname") - private String cname; - - /* - * The Dns label for the service. - */ - @JsonProperty(value = "dnsNameLabel") - private String dnsNameLabel; - - /* - * The virtual network configuration. - */ - @JsonProperty(value = "vnetConfiguration") - private AciServiceCreateRequestVnetConfiguration vnetConfiguration; - - /* - * The encryption properties. - */ - @JsonProperty(value = "encryptionProperties") - private AciServiceCreateRequestEncryptionProperties encryptionProperties; - - /** - * Get the containerResourceRequirements property: The container resource requirements. - * - * @return the containerResourceRequirements value. - */ - public ContainerResourceRequirements containerResourceRequirements() { - return this.containerResourceRequirements; - } - - /** - * Set the containerResourceRequirements property: The container resource requirements. - * - * @param containerResourceRequirements the containerResourceRequirements value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest - withContainerResourceRequirements(ContainerResourceRequirements containerResourceRequirements) { - this.containerResourceRequirements = containerResourceRequirements; - return this; - } - - /** - * Get the authEnabled property: Whether or not authentication is enabled on the service. - * - * @return the authEnabled value. - */ - public Boolean authEnabled() { - return this.authEnabled; - } - - /** - * Set the authEnabled property: Whether or not authentication is enabled on the service. - * - * @param authEnabled the authEnabled value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withAuthEnabled(Boolean authEnabled) { - this.authEnabled = authEnabled; - return this; - } - - /** - * Get the sslEnabled property: Whether or not SSL is enabled. - * - * @return the sslEnabled value. - */ - public Boolean sslEnabled() { - return this.sslEnabled; - } - - /** - * Set the sslEnabled property: Whether or not SSL is enabled. - * - * @param sslEnabled the sslEnabled value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withSslEnabled(Boolean sslEnabled) { - this.sslEnabled = sslEnabled; - return this; - } - - /** - * Get the appInsightsEnabled property: Whether or not Application Insights is enabled. - * - * @return the appInsightsEnabled value. - */ - public Boolean appInsightsEnabled() { - return this.appInsightsEnabled; - } - - /** - * Set the appInsightsEnabled property: Whether or not Application Insights is enabled. - * - * @param appInsightsEnabled the appInsightsEnabled value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withAppInsightsEnabled(Boolean appInsightsEnabled) { - this.appInsightsEnabled = appInsightsEnabled; - return this; - } - - /** - * Get the dataCollection property: Details of the data collection options specified. - * - * @return the dataCollection value. - */ - public AciServiceCreateRequestDataCollection dataCollection() { - return this.dataCollection; - } - - /** - * Set the dataCollection property: Details of the data collection options specified. - * - * @param dataCollection the dataCollection value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withDataCollection(AciServiceCreateRequestDataCollection dataCollection) { - this.dataCollection = dataCollection; - return this; - } - - /** - * Get the sslCertificate property: The public SSL certificate in PEM format to use if SSL is enabled. - * - * @return the sslCertificate value. - */ - public String sslCertificate() { - return this.sslCertificate; - } - - /** - * Set the sslCertificate property: The public SSL certificate in PEM format to use if SSL is enabled. - * - * @param sslCertificate the sslCertificate value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withSslCertificate(String sslCertificate) { - this.sslCertificate = sslCertificate; - return this; - } - - /** - * Get the sslKey property: The public SSL key in PEM format for the certificate. - * - * @return the sslKey value. - */ - public String sslKey() { - return this.sslKey; - } - - /** - * Set the sslKey property: The public SSL key in PEM format for the certificate. - * - * @param sslKey the sslKey value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withSslKey(String sslKey) { - this.sslKey = sslKey; - return this; - } - - /** - * Get the cname property: The CName for the service. - * - * @return the cname value. - */ - public String cname() { - return this.cname; - } - - /** - * Set the cname property: The CName for the service. - * - * @param cname the cname value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withCname(String cname) { - this.cname = cname; - return this; - } - - /** - * Get the dnsNameLabel property: The Dns label for the service. - * - * @return the dnsNameLabel value. - */ - public String dnsNameLabel() { - return this.dnsNameLabel; - } - - /** - * Set the dnsNameLabel property: The Dns label for the service. - * - * @param dnsNameLabel the dnsNameLabel value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withDnsNameLabel(String dnsNameLabel) { - this.dnsNameLabel = dnsNameLabel; - return this; - } - - /** - * Get the vnetConfiguration property: The virtual network configuration. - * - * @return the vnetConfiguration value. - */ - public AciServiceCreateRequestVnetConfiguration vnetConfiguration() { - return this.vnetConfiguration; - } - - /** - * Set the vnetConfiguration property: The virtual network configuration. - * - * @param vnetConfiguration the vnetConfiguration value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withVnetConfiguration(AciServiceCreateRequestVnetConfiguration vnetConfiguration) { - this.vnetConfiguration = vnetConfiguration; - return this; - } - - /** - * Get the encryptionProperties property: The encryption properties. - * - * @return the encryptionProperties value. - */ - public AciServiceCreateRequestEncryptionProperties encryptionProperties() { - return this.encryptionProperties; - } - - /** - * Set the encryptionProperties property: The encryption properties. - * - * @param encryptionProperties the encryptionProperties value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest - withEncryptionProperties(AciServiceCreateRequestEncryptionProperties encryptionProperties) { - this.encryptionProperties = encryptionProperties; - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequest withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequest withKvTags(Map kvTags) { - super.withKvTags(kvTags); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequest withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequest withKeys(CreateServiceRequestKeys keys) { - super.withKeys(keys); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequest - withEnvironmentImageRequest(CreateServiceRequestEnvironmentImageRequest environmentImageRequest) { - super.withEnvironmentImageRequest(environmentImageRequest); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequest withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (containerResourceRequirements() != null) { - containerResourceRequirements().validate(); - } - if (dataCollection() != null) { - dataCollection().validate(); - } - if (vnetConfiguration() != null) { - vnetConfiguration().validate(); - } - if (encryptionProperties() != null) { - encryptionProperties().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestDataCollection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestDataCollection.java deleted file mode 100644 index dd8263a9e562..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestDataCollection.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** Details of the data collection options specified. */ -@Immutable -public final class AciServiceCreateRequestDataCollection extends ModelDataCollection { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AciServiceCreateRequestDataCollection.class); - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequestDataCollection withEventHubEnabled(Boolean eventHubEnabled) { - super.withEventHubEnabled(eventHubEnabled); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequestDataCollection withStorageEnabled(Boolean storageEnabled) { - super.withStorageEnabled(storageEnabled); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestEncryptionProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestEncryptionProperties.java deleted file mode 100644 index 79ec31460566..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestEncryptionProperties.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The encryption properties. */ -@Immutable -public final class AciServiceCreateRequestEncryptionProperties extends EncryptionProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AciServiceCreateRequestEncryptionProperties.class); - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequestEncryptionProperties withVaultBaseUrl(String vaultBaseUrl) { - super.withVaultBaseUrl(vaultBaseUrl); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequestEncryptionProperties withKeyName(String keyName) { - super.withKeyName(keyName); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequestEncryptionProperties withKeyVersion(String keyVersion) { - super.withKeyVersion(keyVersion); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestVnetConfiguration.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestVnetConfiguration.java deleted file mode 100644 index 8be96d82af15..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestVnetConfiguration.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The virtual network configuration. */ -@Immutable -public final class AciServiceCreateRequestVnetConfiguration extends VnetConfiguration { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AciServiceCreateRequestVnetConfiguration.class); - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequestVnetConfiguration withVnetName(String vnetName) { - super.withVnetName(vnetName); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequestVnetConfiguration withSubnetName(String subnetName) { - super.withSubnetName(subnetName); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponse.java deleted file mode 100644 index 13e4a094eef5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponse.java +++ /dev/null @@ -1,516 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; -import java.util.Map; - -/** The response for an ACI service. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("ACI") -@Fluent -public final class AciServiceResponse extends ServiceResponseBase { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AciServiceResponse.class); - - /* - * The container resource requirements. - */ - @JsonProperty(value = "containerResourceRequirements") - private ContainerResourceRequirements containerResourceRequirements; - - /* - * The Uri for sending scoring requests. - */ - @JsonProperty(value = "scoringUri", access = JsonProperty.Access.WRITE_ONLY) - private String scoringUri; - - /* - * The name of the Azure location/region. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Whether or not authentication is enabled on the service. - */ - @JsonProperty(value = "authEnabled") - private Boolean authEnabled; - - /* - * Whether or not SSL is enabled. - */ - @JsonProperty(value = "sslEnabled") - private Boolean sslEnabled; - - /* - * Whether or not Application Insights is enabled. - */ - @JsonProperty(value = "appInsightsEnabled") - private Boolean appInsightsEnabled; - - /* - * Details of the data collection options specified. - */ - @JsonProperty(value = "dataCollection") - private AciServiceResponseDataCollection dataCollection; - - /* - * The public SSL certificate in PEM format to use if SSL is enabled. - */ - @JsonProperty(value = "sslCertificate") - private String sslCertificate; - - /* - * The public SSL key in PEM format for the certificate. - */ - @JsonProperty(value = "sslKey") - private String sslKey; - - /* - * The CName for the service. - */ - @JsonProperty(value = "cname") - private String cname; - - /* - * The public IP address for the service. - */ - @JsonProperty(value = "publicIp") - private String publicIp; - - /* - * The public Fqdn for the service. - */ - @JsonProperty(value = "publicFqdn") - private String publicFqdn; - - /* - * The Uri for sending swagger requests. - */ - @JsonProperty(value = "swaggerUri", access = JsonProperty.Access.WRITE_ONLY) - private String swaggerUri; - - /* - * Details on the models and configurations. - */ - @JsonProperty(value = "modelConfigMap", access = JsonProperty.Access.WRITE_ONLY) - private Map modelConfigMap; - - /* - * The list of models. - */ - @JsonProperty(value = "models") - private List models; - - /* - * The Environment, models and assets used for inferencing. - */ - @JsonProperty(value = "environmentImageRequest") - private AciServiceResponseEnvironmentImageRequest environmentImageRequest; - - /* - * The virtual network configuration. - */ - @JsonProperty(value = "vnetConfiguration") - private AciServiceResponseVnetConfiguration vnetConfiguration; - - /* - * The encryption properties. - */ - @JsonProperty(value = "encryptionProperties") - private AciServiceResponseEncryptionProperties encryptionProperties; - - /** - * Get the containerResourceRequirements property: The container resource requirements. - * - * @return the containerResourceRequirements value. - */ - public ContainerResourceRequirements containerResourceRequirements() { - return this.containerResourceRequirements; - } - - /** - * Set the containerResourceRequirements property: The container resource requirements. - * - * @param containerResourceRequirements the containerResourceRequirements value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse - withContainerResourceRequirements(ContainerResourceRequirements containerResourceRequirements) { - this.containerResourceRequirements = containerResourceRequirements; - return this; - } - - /** - * Get the scoringUri property: The Uri for sending scoring requests. - * - * @return the scoringUri value. - */ - public String scoringUri() { - return this.scoringUri; - } - - /** - * Get the location property: The name of the Azure location/region. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The name of the Azure location/region. - * - * @param location the location value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the authEnabled property: Whether or not authentication is enabled on the service. - * - * @return the authEnabled value. - */ - public Boolean authEnabled() { - return this.authEnabled; - } - - /** - * Set the authEnabled property: Whether or not authentication is enabled on the service. - * - * @param authEnabled the authEnabled value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withAuthEnabled(Boolean authEnabled) { - this.authEnabled = authEnabled; - return this; - } - - /** - * Get the sslEnabled property: Whether or not SSL is enabled. - * - * @return the sslEnabled value. - */ - public Boolean sslEnabled() { - return this.sslEnabled; - } - - /** - * Set the sslEnabled property: Whether or not SSL is enabled. - * - * @param sslEnabled the sslEnabled value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withSslEnabled(Boolean sslEnabled) { - this.sslEnabled = sslEnabled; - return this; - } - - /** - * Get the appInsightsEnabled property: Whether or not Application Insights is enabled. - * - * @return the appInsightsEnabled value. - */ - public Boolean appInsightsEnabled() { - return this.appInsightsEnabled; - } - - /** - * Set the appInsightsEnabled property: Whether or not Application Insights is enabled. - * - * @param appInsightsEnabled the appInsightsEnabled value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withAppInsightsEnabled(Boolean appInsightsEnabled) { - this.appInsightsEnabled = appInsightsEnabled; - return this; - } - - /** - * Get the dataCollection property: Details of the data collection options specified. - * - * @return the dataCollection value. - */ - public AciServiceResponseDataCollection dataCollection() { - return this.dataCollection; - } - - /** - * Set the dataCollection property: Details of the data collection options specified. - * - * @param dataCollection the dataCollection value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withDataCollection(AciServiceResponseDataCollection dataCollection) { - this.dataCollection = dataCollection; - return this; - } - - /** - * Get the sslCertificate property: The public SSL certificate in PEM format to use if SSL is enabled. - * - * @return the sslCertificate value. - */ - public String sslCertificate() { - return this.sslCertificate; - } - - /** - * Set the sslCertificate property: The public SSL certificate in PEM format to use if SSL is enabled. - * - * @param sslCertificate the sslCertificate value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withSslCertificate(String sslCertificate) { - this.sslCertificate = sslCertificate; - return this; - } - - /** - * Get the sslKey property: The public SSL key in PEM format for the certificate. - * - * @return the sslKey value. - */ - public String sslKey() { - return this.sslKey; - } - - /** - * Set the sslKey property: The public SSL key in PEM format for the certificate. - * - * @param sslKey the sslKey value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withSslKey(String sslKey) { - this.sslKey = sslKey; - return this; - } - - /** - * Get the cname property: The CName for the service. - * - * @return the cname value. - */ - public String cname() { - return this.cname; - } - - /** - * Set the cname property: The CName for the service. - * - * @param cname the cname value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withCname(String cname) { - this.cname = cname; - return this; - } - - /** - * Get the publicIp property: The public IP address for the service. - * - * @return the publicIp value. - */ - public String publicIp() { - return this.publicIp; - } - - /** - * Set the publicIp property: The public IP address for the service. - * - * @param publicIp the publicIp value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withPublicIp(String publicIp) { - this.publicIp = publicIp; - return this; - } - - /** - * Get the publicFqdn property: The public Fqdn for the service. - * - * @return the publicFqdn value. - */ - public String publicFqdn() { - return this.publicFqdn; - } - - /** - * Set the publicFqdn property: The public Fqdn for the service. - * - * @param publicFqdn the publicFqdn value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withPublicFqdn(String publicFqdn) { - this.publicFqdn = publicFqdn; - return this; - } - - /** - * Get the swaggerUri property: The Uri for sending swagger requests. - * - * @return the swaggerUri value. - */ - public String swaggerUri() { - return this.swaggerUri; - } - - /** - * Get the modelConfigMap property: Details on the models and configurations. - * - * @return the modelConfigMap value. - */ - public Map modelConfigMap() { - return this.modelConfigMap; - } - - /** - * Get the models property: The list of models. - * - * @return the models value. - */ - public List models() { - return this.models; - } - - /** - * Set the models property: The list of models. - * - * @param models the models value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withModels(List models) { - this.models = models; - return this; - } - - /** - * Get the environmentImageRequest property: The Environment, models and assets used for inferencing. - * - * @return the environmentImageRequest value. - */ - public AciServiceResponseEnvironmentImageRequest environmentImageRequest() { - return this.environmentImageRequest; - } - - /** - * Set the environmentImageRequest property: The Environment, models and assets used for inferencing. - * - * @param environmentImageRequest the environmentImageRequest value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse - withEnvironmentImageRequest(AciServiceResponseEnvironmentImageRequest environmentImageRequest) { - this.environmentImageRequest = environmentImageRequest; - return this; - } - - /** - * Get the vnetConfiguration property: The virtual network configuration. - * - * @return the vnetConfiguration value. - */ - public AciServiceResponseVnetConfiguration vnetConfiguration() { - return this.vnetConfiguration; - } - - /** - * Set the vnetConfiguration property: The virtual network configuration. - * - * @param vnetConfiguration the vnetConfiguration value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withVnetConfiguration(AciServiceResponseVnetConfiguration vnetConfiguration) { - this.vnetConfiguration = vnetConfiguration; - return this; - } - - /** - * Get the encryptionProperties property: The encryption properties. - * - * @return the encryptionProperties value. - */ - public AciServiceResponseEncryptionProperties encryptionProperties() { - return this.encryptionProperties; - } - - /** - * Set the encryptionProperties property: The encryption properties. - * - * @param encryptionProperties the encryptionProperties value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withEncryptionProperties(AciServiceResponseEncryptionProperties encryptionProperties) { - this.encryptionProperties = encryptionProperties; - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponse withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponse withKvTags(Map kvTags) { - super.withKvTags(kvTags); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponse withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponse withDeploymentType(DeploymentType deploymentType) { - super.withDeploymentType(deploymentType); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (containerResourceRequirements() != null) { - containerResourceRequirements().validate(); - } - if (dataCollection() != null) { - dataCollection().validate(); - } - if (models() != null) { - models().forEach(e -> e.validate()); - } - if (environmentImageRequest() != null) { - environmentImageRequest().validate(); - } - if (vnetConfiguration() != null) { - vnetConfiguration().validate(); - } - if (encryptionProperties() != null) { - encryptionProperties().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseDataCollection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseDataCollection.java deleted file mode 100644 index 434ae5b3b70c..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseDataCollection.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** Details of the data collection options specified. */ -@Immutable -public final class AciServiceResponseDataCollection extends ModelDataCollection { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AciServiceResponseDataCollection.class); - - /** {@inheritDoc} */ - @Override - public AciServiceResponseDataCollection withEventHubEnabled(Boolean eventHubEnabled) { - super.withEventHubEnabled(eventHubEnabled); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseDataCollection withStorageEnabled(Boolean storageEnabled) { - super.withStorageEnabled(storageEnabled); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseEncryptionProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseEncryptionProperties.java deleted file mode 100644 index 59e31ae552b7..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseEncryptionProperties.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The encryption properties. */ -@Immutable -public final class AciServiceResponseEncryptionProperties extends EncryptionProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AciServiceResponseEncryptionProperties.class); - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEncryptionProperties withVaultBaseUrl(String vaultBaseUrl) { - super.withVaultBaseUrl(vaultBaseUrl); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEncryptionProperties withKeyName(String keyName) { - super.withKeyName(keyName); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEncryptionProperties withKeyVersion(String keyVersion) { - super.withKeyVersion(keyVersion); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseEnvironmentImageRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseEnvironmentImageRequest.java deleted file mode 100644 index a838242b9cbb..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseEnvironmentImageRequest.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -/** The Environment, models and assets used for inferencing. */ -@Immutable -public final class AciServiceResponseEnvironmentImageRequest extends EnvironmentImageResponse { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AciServiceResponseEnvironmentImageRequest.class); - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEnvironmentImageRequest withDriverProgram(String driverProgram) { - super.withDriverProgram(driverProgram); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEnvironmentImageRequest withAssets(List assets) { - super.withAssets(assets); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEnvironmentImageRequest withModelIds(List modelIds) { - super.withModelIds(modelIds); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEnvironmentImageRequest withModels(List models) { - super.withModels(models); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEnvironmentImageRequest withEnvironment(EnvironmentImageResponseEnvironment environment) { - super.withEnvironment(environment); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEnvironmentImageRequest - withEnvironmentReference(EnvironmentImageResponseEnvironmentReference environmentReference) { - super.withEnvironmentReference(environmentReference); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseVnetConfiguration.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseVnetConfiguration.java deleted file mode 100644 index bdeecc80400c..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseVnetConfiguration.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The virtual network configuration. */ -@Immutable -public final class AciServiceResponseVnetConfiguration extends VnetConfiguration { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AciServiceResponseVnetConfiguration.class); - - /** {@inheritDoc} */ - @Override - public AciServiceResponseVnetConfiguration withVnetName(String vnetName) { - super.withVnetName(vnetName); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseVnetConfiguration withSubnetName(String subnetName) { - super.withSubnetName(subnetName); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Aks.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Aks.java deleted file mode 100644 index 7fd021812440..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Aks.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A Machine Learning compute based on AKS. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("AKS") -@Fluent -public final class Aks extends Compute { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(Aks.class); - - /* - * AKS properties - */ - @JsonProperty(value = "properties") - private AksProperties properties; - - /** - * Get the properties property: AKS properties. - * - * @return the properties value. - */ - public AksProperties properties() { - return this.properties; - } - - /** - * Set the properties property: AKS properties. - * - * @param properties the properties value to set. - * @return the Aks object itself. - */ - public Aks withProperties(AksProperties properties) { - this.properties = properties; - return this; - } - - /** {@inheritDoc} */ - @Override - public Aks withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public Aks withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public Aks withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public Aks withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksComputeSecrets.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksComputeSecrets.java deleted file mode 100644 index 301f0943f8ee..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksComputeSecrets.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeSecretsInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Secrets related to a Machine Learning compute based on AKS. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("AKS") -@Fluent -public final class AksComputeSecrets extends ComputeSecretsInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksComputeSecrets.class); - - /* - * Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - */ - @JsonProperty(value = "userKubeConfig") - private String userKubeConfig; - - /* - * Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - */ - @JsonProperty(value = "adminKubeConfig") - private String adminKubeConfig; - - /* - * Image registry pull secret. - */ - @JsonProperty(value = "imagePullSecretName") - private String imagePullSecretName; - - /** - * Get the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @return the userKubeConfig value. - */ - public String userKubeConfig() { - return this.userKubeConfig; - } - - /** - * Set the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @param userKubeConfig the userKubeConfig value to set. - * @return the AksComputeSecrets object itself. - */ - public AksComputeSecrets withUserKubeConfig(String userKubeConfig) { - this.userKubeConfig = userKubeConfig; - return this; - } - - /** - * Get the adminKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @return the adminKubeConfig value. - */ - public String adminKubeConfig() { - return this.adminKubeConfig; - } - - /** - * Set the adminKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @param adminKubeConfig the adminKubeConfig value to set. - * @return the AksComputeSecrets object itself. - */ - public AksComputeSecrets withAdminKubeConfig(String adminKubeConfig) { - this.adminKubeConfig = adminKubeConfig; - return this; - } - - /** - * Get the imagePullSecretName property: Image registry pull secret. - * - * @return the imagePullSecretName value. - */ - public String imagePullSecretName() { - return this.imagePullSecretName; - } - - /** - * Set the imagePullSecretName property: Image registry pull secret. - * - * @param imagePullSecretName the imagePullSecretName value to set. - * @return the AksComputeSecrets object itself. - */ - public AksComputeSecrets withImagePullSecretName(String imagePullSecretName) { - this.imagePullSecretName = imagePullSecretName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksNetworkingConfiguration.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksNetworkingConfiguration.java deleted file mode 100644 index e04ccea648a7..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksNetworkingConfiguration.java +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Advance configuration for AKS networking. */ -@Fluent -public final class AksNetworkingConfiguration { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksNetworkingConfiguration.class); - - /* - * Virtual network subnet resource ID the compute nodes belong to - */ - @JsonProperty(value = "subnetId") - private String subnetId; - - /* - * A CIDR notation IP range from which to assign service cluster IPs. It - * must not overlap with any Subnet IP ranges. - */ - @JsonProperty(value = "serviceCidr") - private String serviceCidr; - - /* - * An IP address assigned to the Kubernetes DNS service. It must be within - * the Kubernetes service address range specified in serviceCidr. - */ - @JsonProperty(value = "dnsServiceIP") - private String dnsServiceIp; - - /* - * A CIDR notation IP range assigned to the Docker bridge network. It must - * not overlap with any Subnet IP ranges or the Kubernetes service address - * range. - */ - @JsonProperty(value = "dockerBridgeCidr") - private String dockerBridgeCidr; - - /** - * Get the subnetId property: Virtual network subnet resource ID the compute nodes belong to. - * - * @return the subnetId value. - */ - public String subnetId() { - return this.subnetId; - } - - /** - * Set the subnetId property: Virtual network subnet resource ID the compute nodes belong to. - * - * @param subnetId the subnetId value to set. - * @return the AksNetworkingConfiguration object itself. - */ - public AksNetworkingConfiguration withSubnetId(String subnetId) { - this.subnetId = subnetId; - return this; - } - - /** - * Get the serviceCidr property: A CIDR notation IP range from which to assign service cluster IPs. It must not - * overlap with any Subnet IP ranges. - * - * @return the serviceCidr value. - */ - public String serviceCidr() { - return this.serviceCidr; - } - - /** - * Set the serviceCidr property: A CIDR notation IP range from which to assign service cluster IPs. It must not - * overlap with any Subnet IP ranges. - * - * @param serviceCidr the serviceCidr value to set. - * @return the AksNetworkingConfiguration object itself. - */ - public AksNetworkingConfiguration withServiceCidr(String serviceCidr) { - this.serviceCidr = serviceCidr; - return this; - } - - /** - * Get the dnsServiceIp property: An IP address assigned to the Kubernetes DNS service. It must be within the - * Kubernetes service address range specified in serviceCidr. - * - * @return the dnsServiceIp value. - */ - public String dnsServiceIp() { - return this.dnsServiceIp; - } - - /** - * Set the dnsServiceIp property: An IP address assigned to the Kubernetes DNS service. It must be within the - * Kubernetes service address range specified in serviceCidr. - * - * @param dnsServiceIp the dnsServiceIp value to set. - * @return the AksNetworkingConfiguration object itself. - */ - public AksNetworkingConfiguration withDnsServiceIp(String dnsServiceIp) { - this.dnsServiceIp = dnsServiceIp; - return this; - } - - /** - * Get the dockerBridgeCidr property: A CIDR notation IP range assigned to the Docker bridge network. It must not - * overlap with any Subnet IP ranges or the Kubernetes service address range. - * - * @return the dockerBridgeCidr value. - */ - public String dockerBridgeCidr() { - return this.dockerBridgeCidr; - } - - /** - * Set the dockerBridgeCidr property: A CIDR notation IP range assigned to the Docker bridge network. It must not - * overlap with any Subnet IP ranges or the Kubernetes service address range. - * - * @param dockerBridgeCidr the dockerBridgeCidr value to set. - * @return the AksNetworkingConfiguration object itself. - */ - public AksNetworkingConfiguration withDockerBridgeCidr(String dockerBridgeCidr) { - this.dockerBridgeCidr = dockerBridgeCidr; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksProperties.java deleted file mode 100644 index c2ff16aae5e5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksProperties.java +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** AKS properties. */ -@Fluent -public final class AksProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksProperties.class); - - /* - * Cluster full qualified domain name - */ - @JsonProperty(value = "clusterFqdn") - private String clusterFqdn; - - /* - * System services - */ - @JsonProperty(value = "systemServices", access = JsonProperty.Access.WRITE_ONLY) - private List systemServices; - - /* - * Number of agents - */ - @JsonProperty(value = "agentCount") - private Integer agentCount; - - /* - * Agent virtual machine size - */ - @JsonProperty(value = "agentVmSize") - private String agentVmSize; - - /* - * Intended usage of the cluster - */ - @JsonProperty(value = "clusterPurpose") - private ClusterPurpose clusterPurpose; - - /* - * SSL configuration - */ - @JsonProperty(value = "sslConfiguration") - private SslConfiguration sslConfiguration; - - /* - * AKS networking configuration for vnet - */ - @JsonProperty(value = "aksNetworkingConfiguration") - private AksNetworkingConfiguration aksNetworkingConfiguration; - - /* - * Load Balancer Type - */ - @JsonProperty(value = "loadBalancerType") - private LoadBalancerType loadBalancerType; - - /* - * Load Balancer Subnet - */ - @JsonProperty(value = "loadBalancerSubnet") - private String loadBalancerSubnet; - - /** - * Get the clusterFqdn property: Cluster full qualified domain name. - * - * @return the clusterFqdn value. - */ - public String clusterFqdn() { - return this.clusterFqdn; - } - - /** - * Set the clusterFqdn property: Cluster full qualified domain name. - * - * @param clusterFqdn the clusterFqdn value to set. - * @return the AksProperties object itself. - */ - public AksProperties withClusterFqdn(String clusterFqdn) { - this.clusterFqdn = clusterFqdn; - return this; - } - - /** - * Get the systemServices property: System services. - * - * @return the systemServices value. - */ - public List systemServices() { - return this.systemServices; - } - - /** - * Get the agentCount property: Number of agents. - * - * @return the agentCount value. - */ - public Integer agentCount() { - return this.agentCount; - } - - /** - * Set the agentCount property: Number of agents. - * - * @param agentCount the agentCount value to set. - * @return the AksProperties object itself. - */ - public AksProperties withAgentCount(Integer agentCount) { - this.agentCount = agentCount; - return this; - } - - /** - * Get the agentVmSize property: Agent virtual machine size. - * - * @return the agentVmSize value. - */ - public String agentVmSize() { - return this.agentVmSize; - } - - /** - * Set the agentVmSize property: Agent virtual machine size. - * - * @param agentVmSize the agentVmSize value to set. - * @return the AksProperties object itself. - */ - public AksProperties withAgentVmSize(String agentVmSize) { - this.agentVmSize = agentVmSize; - return this; - } - - /** - * Get the clusterPurpose property: Intended usage of the cluster. - * - * @return the clusterPurpose value. - */ - public ClusterPurpose clusterPurpose() { - return this.clusterPurpose; - } - - /** - * Set the clusterPurpose property: Intended usage of the cluster. - * - * @param clusterPurpose the clusterPurpose value to set. - * @return the AksProperties object itself. - */ - public AksProperties withClusterPurpose(ClusterPurpose clusterPurpose) { - this.clusterPurpose = clusterPurpose; - return this; - } - - /** - * Get the sslConfiguration property: SSL configuration. - * - * @return the sslConfiguration value. - */ - public SslConfiguration sslConfiguration() { - return this.sslConfiguration; - } - - /** - * Set the sslConfiguration property: SSL configuration. - * - * @param sslConfiguration the sslConfiguration value to set. - * @return the AksProperties object itself. - */ - public AksProperties withSslConfiguration(SslConfiguration sslConfiguration) { - this.sslConfiguration = sslConfiguration; - return this; - } - - /** - * Get the aksNetworkingConfiguration property: AKS networking configuration for vnet. - * - * @return the aksNetworkingConfiguration value. - */ - public AksNetworkingConfiguration aksNetworkingConfiguration() { - return this.aksNetworkingConfiguration; - } - - /** - * Set the aksNetworkingConfiguration property: AKS networking configuration for vnet. - * - * @param aksNetworkingConfiguration the aksNetworkingConfiguration value to set. - * @return the AksProperties object itself. - */ - public AksProperties withAksNetworkingConfiguration(AksNetworkingConfiguration aksNetworkingConfiguration) { - this.aksNetworkingConfiguration = aksNetworkingConfiguration; - return this; - } - - /** - * Get the loadBalancerType property: Load Balancer Type. - * - * @return the loadBalancerType value. - */ - public LoadBalancerType loadBalancerType() { - return this.loadBalancerType; - } - - /** - * Set the loadBalancerType property: Load Balancer Type. - * - * @param loadBalancerType the loadBalancerType value to set. - * @return the AksProperties object itself. - */ - public AksProperties withLoadBalancerType(LoadBalancerType loadBalancerType) { - this.loadBalancerType = loadBalancerType; - return this; - } - - /** - * Get the loadBalancerSubnet property: Load Balancer Subnet. - * - * @return the loadBalancerSubnet value. - */ - public String loadBalancerSubnet() { - return this.loadBalancerSubnet; - } - - /** - * Set the loadBalancerSubnet property: Load Balancer Subnet. - * - * @param loadBalancerSubnet the loadBalancerSubnet value to set. - * @return the AksProperties object itself. - */ - public AksProperties withLoadBalancerSubnet(String loadBalancerSubnet) { - this.loadBalancerSubnet = loadBalancerSubnet; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (systemServices() != null) { - systemServices().forEach(e -> e.validate()); - } - if (sslConfiguration() != null) { - sslConfiguration().validate(); - } - if (aksNetworkingConfiguration() != null) { - aksNetworkingConfiguration().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksReplicaStatus.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksReplicaStatus.java deleted file mode 100644 index fe54ba94e5b2..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksReplicaStatus.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 AksReplicaStatus model. */ -@Fluent -public class AksReplicaStatus { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksReplicaStatus.class); - - /* - * The desired number of replicas. - */ - @JsonProperty(value = "desiredReplicas") - private Integer desiredReplicas; - - /* - * The number of updated replicas. - */ - @JsonProperty(value = "updatedReplicas") - private Integer updatedReplicas; - - /* - * The number of available replicas. - */ - @JsonProperty(value = "availableReplicas") - private Integer availableReplicas; - - /* - * The error details. - */ - @JsonProperty(value = "error") - private AksReplicaStatusError error; - - /** - * Get the desiredReplicas property: The desired number of replicas. - * - * @return the desiredReplicas value. - */ - public Integer desiredReplicas() { - return this.desiredReplicas; - } - - /** - * Set the desiredReplicas property: The desired number of replicas. - * - * @param desiredReplicas the desiredReplicas value to set. - * @return the AksReplicaStatus object itself. - */ - public AksReplicaStatus withDesiredReplicas(Integer desiredReplicas) { - this.desiredReplicas = desiredReplicas; - return this; - } - - /** - * Get the updatedReplicas property: The number of updated replicas. - * - * @return the updatedReplicas value. - */ - public Integer updatedReplicas() { - return this.updatedReplicas; - } - - /** - * Set the updatedReplicas property: The number of updated replicas. - * - * @param updatedReplicas the updatedReplicas value to set. - * @return the AksReplicaStatus object itself. - */ - public AksReplicaStatus withUpdatedReplicas(Integer updatedReplicas) { - this.updatedReplicas = updatedReplicas; - return this; - } - - /** - * Get the availableReplicas property: The number of available replicas. - * - * @return the availableReplicas value. - */ - public Integer availableReplicas() { - return this.availableReplicas; - } - - /** - * Set the availableReplicas property: The number of available replicas. - * - * @param availableReplicas the availableReplicas value to set. - * @return the AksReplicaStatus object itself. - */ - public AksReplicaStatus withAvailableReplicas(Integer availableReplicas) { - this.availableReplicas = availableReplicas; - return this; - } - - /** - * Get the error property: The error details. - * - * @return the error value. - */ - public AksReplicaStatusError error() { - return this.error; - } - - /** - * Set the error property: The error details. - * - * @param error the error value to set. - * @return the AksReplicaStatus object itself. - */ - public AksReplicaStatus withError(AksReplicaStatusError error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (error() != null) { - error().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksReplicaStatusError.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksReplicaStatusError.java deleted file mode 100644 index f4e81aeaf106..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksReplicaStatusError.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The error details. */ -@Immutable -public final class AksReplicaStatusError extends ManagementError { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksReplicaStatusError.class); - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequest.java deleted file mode 100644 index 11ed2d24f81f..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequest.java +++ /dev/null @@ -1,451 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** The request to create an AKS service. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("AKS") -@Fluent -public final class AksServiceCreateRequest extends CreateEndpointVariantRequest { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksServiceCreateRequest.class); - - /* - * The number of replicas on the cluster. - */ - @JsonProperty(value = "numReplicas") - private Integer numReplicas; - - /* - * Details of the data collection options specified. - */ - @JsonProperty(value = "dataCollection") - private AksServiceCreateRequestDataCollection dataCollection; - - /* - * The name of the compute resource. - */ - @JsonProperty(value = "computeName") - private String computeName; - - /* - * Whether or not Application Insights is enabled. - */ - @JsonProperty(value = "appInsightsEnabled") - private Boolean appInsightsEnabled; - - /* - * The auto scaler properties. - */ - @JsonProperty(value = "autoScaler") - private AksServiceCreateRequestAutoScaler autoScaler; - - /* - * The container resource requirements. - */ - @JsonProperty(value = "containerResourceRequirements") - private ContainerResourceRequirements containerResourceRequirements; - - /* - * The maximum number of concurrent requests per container. - */ - @JsonProperty(value = "maxConcurrentRequestsPerContainer") - private Integer maxConcurrentRequestsPerContainer; - - /* - * Maximum time a request will wait in the queue (in milliseconds). After - * this time, the service will return 503 (Service Unavailable) - */ - @JsonProperty(value = "maxQueueWaitMs") - private Integer maxQueueWaitMs; - - /* - * Kubernetes namespace for the service. - */ - @JsonProperty(value = "namespace") - private String namespace; - - /* - * The scoring timeout in milliseconds. - */ - @JsonProperty(value = "scoringTimeoutMs") - private Integer scoringTimeoutMs; - - /* - * Whether or not authentication is enabled. - */ - @JsonProperty(value = "authEnabled") - private Boolean authEnabled; - - /* - * The liveness probe requirements. - */ - @JsonProperty(value = "livenessProbeRequirements") - private AksServiceCreateRequestLivenessProbeRequirements livenessProbeRequirements; - - /* - * Whether or not AAD authentication is enabled. - */ - @JsonProperty(value = "aadAuthEnabled") - private Boolean aadAuthEnabled; - - /** - * Get the numReplicas property: The number of replicas on the cluster. - * - * @return the numReplicas value. - */ - public Integer numReplicas() { - return this.numReplicas; - } - - /** - * Set the numReplicas property: The number of replicas on the cluster. - * - * @param numReplicas the numReplicas value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withNumReplicas(Integer numReplicas) { - this.numReplicas = numReplicas; - return this; - } - - /** - * Get the dataCollection property: Details of the data collection options specified. - * - * @return the dataCollection value. - */ - public AksServiceCreateRequestDataCollection dataCollection() { - return this.dataCollection; - } - - /** - * Set the dataCollection property: Details of the data collection options specified. - * - * @param dataCollection the dataCollection value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withDataCollection(AksServiceCreateRequestDataCollection dataCollection) { - this.dataCollection = dataCollection; - return this; - } - - /** - * Get the computeName property: The name of the compute resource. - * - * @return the computeName value. - */ - public String computeName() { - return this.computeName; - } - - /** - * Set the computeName property: The name of the compute resource. - * - * @param computeName the computeName value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withComputeName(String computeName) { - this.computeName = computeName; - return this; - } - - /** - * Get the appInsightsEnabled property: Whether or not Application Insights is enabled. - * - * @return the appInsightsEnabled value. - */ - public Boolean appInsightsEnabled() { - return this.appInsightsEnabled; - } - - /** - * Set the appInsightsEnabled property: Whether or not Application Insights is enabled. - * - * @param appInsightsEnabled the appInsightsEnabled value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withAppInsightsEnabled(Boolean appInsightsEnabled) { - this.appInsightsEnabled = appInsightsEnabled; - return this; - } - - /** - * Get the autoScaler property: The auto scaler properties. - * - * @return the autoScaler value. - */ - public AksServiceCreateRequestAutoScaler autoScaler() { - return this.autoScaler; - } - - /** - * Set the autoScaler property: The auto scaler properties. - * - * @param autoScaler the autoScaler value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withAutoScaler(AksServiceCreateRequestAutoScaler autoScaler) { - this.autoScaler = autoScaler; - return this; - } - - /** - * Get the containerResourceRequirements property: The container resource requirements. - * - * @return the containerResourceRequirements value. - */ - public ContainerResourceRequirements containerResourceRequirements() { - return this.containerResourceRequirements; - } - - /** - * Set the containerResourceRequirements property: The container resource requirements. - * - * @param containerResourceRequirements the containerResourceRequirements value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest - withContainerResourceRequirements(ContainerResourceRequirements containerResourceRequirements) { - this.containerResourceRequirements = containerResourceRequirements; - return this; - } - - /** - * Get the maxConcurrentRequestsPerContainer property: The maximum number of concurrent requests per container. - * - * @return the maxConcurrentRequestsPerContainer value. - */ - public Integer maxConcurrentRequestsPerContainer() { - return this.maxConcurrentRequestsPerContainer; - } - - /** - * Set the maxConcurrentRequestsPerContainer property: The maximum number of concurrent requests per container. - * - * @param maxConcurrentRequestsPerContainer the maxConcurrentRequestsPerContainer value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withMaxConcurrentRequestsPerContainer(Integer maxConcurrentRequestsPerContainer) { - this.maxConcurrentRequestsPerContainer = maxConcurrentRequestsPerContainer; - return this; - } - - /** - * Get the maxQueueWaitMs property: Maximum time a request will wait in the queue (in milliseconds). After this - * time, the service will return 503 (Service Unavailable). - * - * @return the maxQueueWaitMs value. - */ - public Integer maxQueueWaitMs() { - return this.maxQueueWaitMs; - } - - /** - * Set the maxQueueWaitMs property: Maximum time a request will wait in the queue (in milliseconds). After this - * time, the service will return 503 (Service Unavailable). - * - * @param maxQueueWaitMs the maxQueueWaitMs value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withMaxQueueWaitMs(Integer maxQueueWaitMs) { - this.maxQueueWaitMs = maxQueueWaitMs; - return this; - } - - /** - * Get the namespace property: Kubernetes namespace for the service. - * - * @return the namespace value. - */ - public String namespace() { - return this.namespace; - } - - /** - * Set the namespace property: Kubernetes namespace for the service. - * - * @param namespace the namespace value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withNamespace(String namespace) { - this.namespace = namespace; - return this; - } - - /** - * Get the scoringTimeoutMs property: The scoring timeout in milliseconds. - * - * @return the scoringTimeoutMs value. - */ - public Integer scoringTimeoutMs() { - return this.scoringTimeoutMs; - } - - /** - * Set the scoringTimeoutMs property: The scoring timeout in milliseconds. - * - * @param scoringTimeoutMs the scoringTimeoutMs value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withScoringTimeoutMs(Integer scoringTimeoutMs) { - this.scoringTimeoutMs = scoringTimeoutMs; - return this; - } - - /** - * Get the authEnabled property: Whether or not authentication is enabled. - * - * @return the authEnabled value. - */ - public Boolean authEnabled() { - return this.authEnabled; - } - - /** - * Set the authEnabled property: Whether or not authentication is enabled. - * - * @param authEnabled the authEnabled value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withAuthEnabled(Boolean authEnabled) { - this.authEnabled = authEnabled; - return this; - } - - /** - * Get the livenessProbeRequirements property: The liveness probe requirements. - * - * @return the livenessProbeRequirements value. - */ - public AksServiceCreateRequestLivenessProbeRequirements livenessProbeRequirements() { - return this.livenessProbeRequirements; - } - - /** - * Set the livenessProbeRequirements property: The liveness probe requirements. - * - * @param livenessProbeRequirements the livenessProbeRequirements value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest - withLivenessProbeRequirements(AksServiceCreateRequestLivenessProbeRequirements livenessProbeRequirements) { - this.livenessProbeRequirements = livenessProbeRequirements; - return this; - } - - /** - * Get the aadAuthEnabled property: Whether or not AAD authentication is enabled. - * - * @return the aadAuthEnabled value. - */ - public Boolean aadAuthEnabled() { - return this.aadAuthEnabled; - } - - /** - * Set the aadAuthEnabled property: Whether or not AAD authentication is enabled. - * - * @param aadAuthEnabled the aadAuthEnabled value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withAadAuthEnabled(Boolean aadAuthEnabled) { - this.aadAuthEnabled = aadAuthEnabled; - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withIsDefault(Boolean isDefault) { - super.withIsDefault(isDefault); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withTrafficPercentile(Float trafficPercentile) { - super.withTrafficPercentile(trafficPercentile); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withType(VariantType type) { - super.withType(type); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withKvTags(Map kvTags) { - super.withKvTags(kvTags); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withKeys(CreateServiceRequestKeys keys) { - super.withKeys(keys); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest - withEnvironmentImageRequest(CreateServiceRequestEnvironmentImageRequest environmentImageRequest) { - super.withEnvironmentImageRequest(environmentImageRequest); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataCollection() != null) { - dataCollection().validate(); - } - if (autoScaler() != null) { - autoScaler().validate(); - } - if (containerResourceRequirements() != null) { - containerResourceRequirements().validate(); - } - if (livenessProbeRequirements() != null) { - livenessProbeRequirements().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestAutoScaler.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestAutoScaler.java deleted file mode 100644 index afc58fc733b9..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestAutoScaler.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The auto scaler properties. */ -@Immutable -public final class AksServiceCreateRequestAutoScaler extends AutoScaler { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksServiceCreateRequestAutoScaler.class); - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestAutoScaler withAutoscaleEnabled(Boolean autoscaleEnabled) { - super.withAutoscaleEnabled(autoscaleEnabled); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestAutoScaler withMinReplicas(Integer minReplicas) { - super.withMinReplicas(minReplicas); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestAutoScaler withMaxReplicas(Integer maxReplicas) { - super.withMaxReplicas(maxReplicas); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestAutoScaler withTargetUtilization(Integer targetUtilization) { - super.withTargetUtilization(targetUtilization); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestAutoScaler withRefreshPeriodInSeconds(Integer refreshPeriodInSeconds) { - super.withRefreshPeriodInSeconds(refreshPeriodInSeconds); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestDataCollection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestDataCollection.java deleted file mode 100644 index 9e9878b77672..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestDataCollection.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** Details of the data collection options specified. */ -@Immutable -public final class AksServiceCreateRequestDataCollection extends ModelDataCollection { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksServiceCreateRequestDataCollection.class); - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestDataCollection withEventHubEnabled(Boolean eventHubEnabled) { - super.withEventHubEnabled(eventHubEnabled); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestDataCollection withStorageEnabled(Boolean storageEnabled) { - super.withStorageEnabled(storageEnabled); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestLivenessProbeRequirements.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestLivenessProbeRequirements.java deleted file mode 100644 index ef3774c5c72f..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestLivenessProbeRequirements.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The liveness probe requirements. */ -@Immutable -public final class AksServiceCreateRequestLivenessProbeRequirements extends LivenessProbeRequirements { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksServiceCreateRequestLivenessProbeRequirements.class); - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestLivenessProbeRequirements withFailureThreshold(Integer failureThreshold) { - super.withFailureThreshold(failureThreshold); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestLivenessProbeRequirements withSuccessThreshold(Integer successThreshold) { - super.withSuccessThreshold(successThreshold); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestLivenessProbeRequirements withTimeoutSeconds(Integer timeoutSeconds) { - super.withTimeoutSeconds(timeoutSeconds); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestLivenessProbeRequirements withPeriodSeconds(Integer periodSeconds) { - super.withPeriodSeconds(periodSeconds); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestLivenessProbeRequirements withInitialDelaySeconds(Integer initialDelaySeconds) { - super.withInitialDelaySeconds(initialDelaySeconds); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponse.java deleted file mode 100644 index 52d1d5436278..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponse.java +++ /dev/null @@ -1,559 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; -import java.util.Map; - -/** The response for an AKS service. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("AKS") -@Fluent -public final class AksServiceResponse extends AksVariantResponse { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksServiceResponse.class); - - /* - * The list of models. - */ - @JsonProperty(value = "models") - private List models; - - /* - * The container resource requirements. - */ - @JsonProperty(value = "containerResourceRequirements") - private ContainerResourceRequirements containerResourceRequirements; - - /* - * The maximum number of concurrent requests per container. - */ - @JsonProperty(value = "maxConcurrentRequestsPerContainer") - private Integer maxConcurrentRequestsPerContainer; - - /* - * Maximum time a request will wait in the queue (in milliseconds). After - * this time, the service will return 503 (Service Unavailable) - */ - @JsonProperty(value = "maxQueueWaitMs") - private Integer maxQueueWaitMs; - - /* - * The name of the compute resource. - */ - @JsonProperty(value = "computeName") - private String computeName; - - /* - * The Kubernetes namespace of the deployment. - */ - @JsonProperty(value = "namespace") - private String namespace; - - /* - * The number of replicas on the cluster. - */ - @JsonProperty(value = "numReplicas") - private Integer numReplicas; - - /* - * Details of the data collection options specified. - */ - @JsonProperty(value = "dataCollection") - private AksServiceResponseDataCollection dataCollection; - - /* - * Whether or not Application Insights is enabled. - */ - @JsonProperty(value = "appInsightsEnabled") - private Boolean appInsightsEnabled; - - /* - * The auto scaler properties. - */ - @JsonProperty(value = "autoScaler") - private AksServiceResponseAutoScaler autoScaler; - - /* - * The Uri for sending scoring requests. - */ - @JsonProperty(value = "scoringUri", access = JsonProperty.Access.WRITE_ONLY) - private String scoringUri; - - /* - * The deployment status. - */ - @JsonProperty(value = "deploymentStatus", access = JsonProperty.Access.WRITE_ONLY) - private AksServiceResponseDeploymentStatus deploymentStatus; - - /* - * The scoring timeout in milliseconds. - */ - @JsonProperty(value = "scoringTimeoutMs") - private Integer scoringTimeoutMs; - - /* - * The liveness probe requirements. - */ - @JsonProperty(value = "livenessProbeRequirements") - private AksServiceResponseLivenessProbeRequirements livenessProbeRequirements; - - /* - * Whether or not authentication is enabled. - */ - @JsonProperty(value = "authEnabled") - private Boolean authEnabled; - - /* - * Whether or not AAD authentication is enabled. - */ - @JsonProperty(value = "aadAuthEnabled") - private Boolean aadAuthEnabled; - - /* - * The Uri for sending swagger requests. - */ - @JsonProperty(value = "swaggerUri", access = JsonProperty.Access.WRITE_ONLY) - private String swaggerUri; - - /* - * Details on the models and configurations. - */ - @JsonProperty(value = "modelConfigMap", access = JsonProperty.Access.WRITE_ONLY) - private Map modelConfigMap; - - /* - * The Environment, models and assets used for inferencing. - */ - @JsonProperty(value = "environmentImageRequest") - private AksServiceResponseEnvironmentImageRequest environmentImageRequest; - - /** - * Get the models property: The list of models. - * - * @return the models value. - */ - public List models() { - return this.models; - } - - /** - * Set the models property: The list of models. - * - * @param models the models value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withModels(List models) { - this.models = models; - return this; - } - - /** - * Get the containerResourceRequirements property: The container resource requirements. - * - * @return the containerResourceRequirements value. - */ - public ContainerResourceRequirements containerResourceRequirements() { - return this.containerResourceRequirements; - } - - /** - * Set the containerResourceRequirements property: The container resource requirements. - * - * @param containerResourceRequirements the containerResourceRequirements value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse - withContainerResourceRequirements(ContainerResourceRequirements containerResourceRequirements) { - this.containerResourceRequirements = containerResourceRequirements; - return this; - } - - /** - * Get the maxConcurrentRequestsPerContainer property: The maximum number of concurrent requests per container. - * - * @return the maxConcurrentRequestsPerContainer value. - */ - public Integer maxConcurrentRequestsPerContainer() { - return this.maxConcurrentRequestsPerContainer; - } - - /** - * Set the maxConcurrentRequestsPerContainer property: The maximum number of concurrent requests per container. - * - * @param maxConcurrentRequestsPerContainer the maxConcurrentRequestsPerContainer value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withMaxConcurrentRequestsPerContainer(Integer maxConcurrentRequestsPerContainer) { - this.maxConcurrentRequestsPerContainer = maxConcurrentRequestsPerContainer; - return this; - } - - /** - * Get the maxQueueWaitMs property: Maximum time a request will wait in the queue (in milliseconds). After this - * time, the service will return 503 (Service Unavailable). - * - * @return the maxQueueWaitMs value. - */ - public Integer maxQueueWaitMs() { - return this.maxQueueWaitMs; - } - - /** - * Set the maxQueueWaitMs property: Maximum time a request will wait in the queue (in milliseconds). After this - * time, the service will return 503 (Service Unavailable). - * - * @param maxQueueWaitMs the maxQueueWaitMs value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withMaxQueueWaitMs(Integer maxQueueWaitMs) { - this.maxQueueWaitMs = maxQueueWaitMs; - return this; - } - - /** - * Get the computeName property: The name of the compute resource. - * - * @return the computeName value. - */ - public String computeName() { - return this.computeName; - } - - /** - * Set the computeName property: The name of the compute resource. - * - * @param computeName the computeName value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withComputeName(String computeName) { - this.computeName = computeName; - return this; - } - - /** - * Get the namespace property: The Kubernetes namespace of the deployment. - * - * @return the namespace value. - */ - public String namespace() { - return this.namespace; - } - - /** - * Set the namespace property: The Kubernetes namespace of the deployment. - * - * @param namespace the namespace value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withNamespace(String namespace) { - this.namespace = namespace; - return this; - } - - /** - * Get the numReplicas property: The number of replicas on the cluster. - * - * @return the numReplicas value. - */ - public Integer numReplicas() { - return this.numReplicas; - } - - /** - * Set the numReplicas property: The number of replicas on the cluster. - * - * @param numReplicas the numReplicas value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withNumReplicas(Integer numReplicas) { - this.numReplicas = numReplicas; - return this; - } - - /** - * Get the dataCollection property: Details of the data collection options specified. - * - * @return the dataCollection value. - */ - public AksServiceResponseDataCollection dataCollection() { - return this.dataCollection; - } - - /** - * Set the dataCollection property: Details of the data collection options specified. - * - * @param dataCollection the dataCollection value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withDataCollection(AksServiceResponseDataCollection dataCollection) { - this.dataCollection = dataCollection; - return this; - } - - /** - * Get the appInsightsEnabled property: Whether or not Application Insights is enabled. - * - * @return the appInsightsEnabled value. - */ - public Boolean appInsightsEnabled() { - return this.appInsightsEnabled; - } - - /** - * Set the appInsightsEnabled property: Whether or not Application Insights is enabled. - * - * @param appInsightsEnabled the appInsightsEnabled value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withAppInsightsEnabled(Boolean appInsightsEnabled) { - this.appInsightsEnabled = appInsightsEnabled; - return this; - } - - /** - * Get the autoScaler property: The auto scaler properties. - * - * @return the autoScaler value. - */ - public AksServiceResponseAutoScaler autoScaler() { - return this.autoScaler; - } - - /** - * Set the autoScaler property: The auto scaler properties. - * - * @param autoScaler the autoScaler value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withAutoScaler(AksServiceResponseAutoScaler autoScaler) { - this.autoScaler = autoScaler; - return this; - } - - /** - * Get the scoringUri property: The Uri for sending scoring requests. - * - * @return the scoringUri value. - */ - public String scoringUri() { - return this.scoringUri; - } - - /** - * Get the deploymentStatus property: The deployment status. - * - * @return the deploymentStatus value. - */ - public AksServiceResponseDeploymentStatus deploymentStatus() { - return this.deploymentStatus; - } - - /** - * Get the scoringTimeoutMs property: The scoring timeout in milliseconds. - * - * @return the scoringTimeoutMs value. - */ - public Integer scoringTimeoutMs() { - return this.scoringTimeoutMs; - } - - /** - * Set the scoringTimeoutMs property: The scoring timeout in milliseconds. - * - * @param scoringTimeoutMs the scoringTimeoutMs value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withScoringTimeoutMs(Integer scoringTimeoutMs) { - this.scoringTimeoutMs = scoringTimeoutMs; - return this; - } - - /** - * Get the livenessProbeRequirements property: The liveness probe requirements. - * - * @return the livenessProbeRequirements value. - */ - public AksServiceResponseLivenessProbeRequirements livenessProbeRequirements() { - return this.livenessProbeRequirements; - } - - /** - * Set the livenessProbeRequirements property: The liveness probe requirements. - * - * @param livenessProbeRequirements the livenessProbeRequirements value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse - withLivenessProbeRequirements(AksServiceResponseLivenessProbeRequirements livenessProbeRequirements) { - this.livenessProbeRequirements = livenessProbeRequirements; - return this; - } - - /** - * Get the authEnabled property: Whether or not authentication is enabled. - * - * @return the authEnabled value. - */ - public Boolean authEnabled() { - return this.authEnabled; - } - - /** - * Set the authEnabled property: Whether or not authentication is enabled. - * - * @param authEnabled the authEnabled value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withAuthEnabled(Boolean authEnabled) { - this.authEnabled = authEnabled; - return this; - } - - /** - * Get the aadAuthEnabled property: Whether or not AAD authentication is enabled. - * - * @return the aadAuthEnabled value. - */ - public Boolean aadAuthEnabled() { - return this.aadAuthEnabled; - } - - /** - * Set the aadAuthEnabled property: Whether or not AAD authentication is enabled. - * - * @param aadAuthEnabled the aadAuthEnabled value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withAadAuthEnabled(Boolean aadAuthEnabled) { - this.aadAuthEnabled = aadAuthEnabled; - return this; - } - - /** - * Get the swaggerUri property: The Uri for sending swagger requests. - * - * @return the swaggerUri value. - */ - public String swaggerUri() { - return this.swaggerUri; - } - - /** - * Get the modelConfigMap property: Details on the models and configurations. - * - * @return the modelConfigMap value. - */ - public Map modelConfigMap() { - return this.modelConfigMap; - } - - /** - * Get the environmentImageRequest property: The Environment, models and assets used for inferencing. - * - * @return the environmentImageRequest value. - */ - public AksServiceResponseEnvironmentImageRequest environmentImageRequest() { - return this.environmentImageRequest; - } - - /** - * Set the environmentImageRequest property: The Environment, models and assets used for inferencing. - * - * @param environmentImageRequest the environmentImageRequest value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse - withEnvironmentImageRequest(AksServiceResponseEnvironmentImageRequest environmentImageRequest) { - this.environmentImageRequest = environmentImageRequest; - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponse withIsDefault(Boolean isDefault) { - super.withIsDefault(isDefault); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponse withTrafficPercentile(Float trafficPercentile) { - super.withTrafficPercentile(trafficPercentile); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponse withType(VariantType type) { - super.withType(type); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponse withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponse withKvTags(Map kvTags) { - super.withKvTags(kvTags); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponse withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponse withDeploymentType(DeploymentType deploymentType) { - super.withDeploymentType(deploymentType); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (models() != null) { - models().forEach(e -> e.validate()); - } - if (containerResourceRequirements() != null) { - containerResourceRequirements().validate(); - } - if (dataCollection() != null) { - dataCollection().validate(); - } - if (autoScaler() != null) { - autoScaler().validate(); - } - if (deploymentStatus() != null) { - deploymentStatus().validate(); - } - if (livenessProbeRequirements() != null) { - livenessProbeRequirements().validate(); - } - if (environmentImageRequest() != null) { - environmentImageRequest().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseAutoScaler.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseAutoScaler.java deleted file mode 100644 index 61c0e21b4079..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseAutoScaler.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The auto scaler properties. */ -@Immutable -public final class AksServiceResponseAutoScaler extends AutoScaler { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksServiceResponseAutoScaler.class); - - /** {@inheritDoc} */ - @Override - public AksServiceResponseAutoScaler withAutoscaleEnabled(Boolean autoscaleEnabled) { - super.withAutoscaleEnabled(autoscaleEnabled); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseAutoScaler withMinReplicas(Integer minReplicas) { - super.withMinReplicas(minReplicas); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseAutoScaler withMaxReplicas(Integer maxReplicas) { - super.withMaxReplicas(maxReplicas); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseAutoScaler withTargetUtilization(Integer targetUtilization) { - super.withTargetUtilization(targetUtilization); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseAutoScaler withRefreshPeriodInSeconds(Integer refreshPeriodInSeconds) { - super.withRefreshPeriodInSeconds(refreshPeriodInSeconds); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseDataCollection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseDataCollection.java deleted file mode 100644 index 90ae493b7d9a..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseDataCollection.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** Details of the data collection options specified. */ -@Immutable -public final class AksServiceResponseDataCollection extends ModelDataCollection { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksServiceResponseDataCollection.class); - - /** {@inheritDoc} */ - @Override - public AksServiceResponseDataCollection withEventHubEnabled(Boolean eventHubEnabled) { - super.withEventHubEnabled(eventHubEnabled); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseDataCollection withStorageEnabled(Boolean storageEnabled) { - super.withStorageEnabled(storageEnabled); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseDeploymentStatus.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseDeploymentStatus.java deleted file mode 100644 index d92b4673b329..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseDeploymentStatus.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The deployment status. */ -@Immutable -public final class AksServiceResponseDeploymentStatus extends AksReplicaStatus { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksServiceResponseDeploymentStatus.class); - - /** {@inheritDoc} */ - @Override - public AksServiceResponseDeploymentStatus withDesiredReplicas(Integer desiredReplicas) { - super.withDesiredReplicas(desiredReplicas); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseDeploymentStatus withUpdatedReplicas(Integer updatedReplicas) { - super.withUpdatedReplicas(updatedReplicas); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseDeploymentStatus withAvailableReplicas(Integer availableReplicas) { - super.withAvailableReplicas(availableReplicas); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseDeploymentStatus withError(AksReplicaStatusError error) { - super.withError(error); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseEnvironmentImageRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseEnvironmentImageRequest.java deleted file mode 100644 index d266bf827a25..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseEnvironmentImageRequest.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -/** The Environment, models and assets used for inferencing. */ -@Immutable -public final class AksServiceResponseEnvironmentImageRequest extends EnvironmentImageResponse { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksServiceResponseEnvironmentImageRequest.class); - - /** {@inheritDoc} */ - @Override - public AksServiceResponseEnvironmentImageRequest withDriverProgram(String driverProgram) { - super.withDriverProgram(driverProgram); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseEnvironmentImageRequest withAssets(List assets) { - super.withAssets(assets); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseEnvironmentImageRequest withModelIds(List modelIds) { - super.withModelIds(modelIds); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseEnvironmentImageRequest withModels(List models) { - super.withModels(models); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseEnvironmentImageRequest withEnvironment(EnvironmentImageResponseEnvironment environment) { - super.withEnvironment(environment); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseEnvironmentImageRequest - withEnvironmentReference(EnvironmentImageResponseEnvironmentReference environmentReference) { - super.withEnvironmentReference(environmentReference); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseLivenessProbeRequirements.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseLivenessProbeRequirements.java deleted file mode 100644 index eda68e422a63..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseLivenessProbeRequirements.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The liveness probe requirements. */ -@Immutable -public final class AksServiceResponseLivenessProbeRequirements extends LivenessProbeRequirements { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksServiceResponseLivenessProbeRequirements.class); - - /** {@inheritDoc} */ - @Override - public AksServiceResponseLivenessProbeRequirements withFailureThreshold(Integer failureThreshold) { - super.withFailureThreshold(failureThreshold); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseLivenessProbeRequirements withSuccessThreshold(Integer successThreshold) { - super.withSuccessThreshold(successThreshold); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseLivenessProbeRequirements withTimeoutSeconds(Integer timeoutSeconds) { - super.withTimeoutSeconds(timeoutSeconds); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseLivenessProbeRequirements withPeriodSeconds(Integer periodSeconds) { - super.withPeriodSeconds(periodSeconds); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseLivenessProbeRequirements withInitialDelaySeconds(Integer initialDelaySeconds) { - super.withInitialDelaySeconds(initialDelaySeconds); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksVariantResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksVariantResponse.java deleted file mode 100644 index 3023f04426ba..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksVariantResponse.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** The response for an AKS variant. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "computeType", - defaultImpl = AksVariantResponse.class) -@JsonTypeName("Custom") -@JsonSubTypes({ @JsonSubTypes.Type(name = "AKS", value = AksServiceResponse.class) }) -@Fluent -public class AksVariantResponse extends ServiceResponseBase { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksVariantResponse.class); - - /* - * Is this the default variant. - */ - @JsonProperty(value = "isDefault") - private Boolean isDefault; - - /* - * The amount of traffic variant receives. - */ - @JsonProperty(value = "trafficPercentile") - private Float trafficPercentile; - - /* - * The type of the variant. - */ - @JsonProperty(value = "type") - private VariantType type; - - /** - * Get the isDefault property: Is this the default variant. - * - * @return the isDefault value. - */ - public Boolean isDefault() { - return this.isDefault; - } - - /** - * Set the isDefault property: Is this the default variant. - * - * @param isDefault the isDefault value to set. - * @return the AksVariantResponse object itself. - */ - public AksVariantResponse withIsDefault(Boolean isDefault) { - this.isDefault = isDefault; - return this; - } - - /** - * Get the trafficPercentile property: The amount of traffic variant receives. - * - * @return the trafficPercentile value. - */ - public Float trafficPercentile() { - return this.trafficPercentile; - } - - /** - * Set the trafficPercentile property: The amount of traffic variant receives. - * - * @param trafficPercentile the trafficPercentile value to set. - * @return the AksVariantResponse object itself. - */ - public AksVariantResponse withTrafficPercentile(Float trafficPercentile) { - this.trafficPercentile = trafficPercentile; - return this; - } - - /** - * Get the type property: The type of the variant. - * - * @return the type value. - */ - public VariantType type() { - return this.type; - } - - /** - * Set the type property: The type of the variant. - * - * @param type the type value to set. - * @return the AksVariantResponse object itself. - */ - public AksVariantResponse withType(VariantType type) { - this.type = type; - return this; - } - - /** {@inheritDoc} */ - @Override - public AksVariantResponse withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksVariantResponse withKvTags(Map kvTags) { - super.withKvTags(kvTags); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksVariantResponse withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksVariantResponse withDeploymentType(DeploymentType deploymentType) { - super.withDeploymentType(deploymentType); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AllocationState.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AllocationState.java deleted file mode 100644 index fc9e6b8590fa..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AllocationState.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AllocationState. */ -public final class AllocationState extends ExpandableStringEnum { - /** Static value Steady for AllocationState. */ - public static final AllocationState STEADY = fromString("Steady"); - - /** Static value Resizing for AllocationState. */ - public static final AllocationState RESIZING = fromString("Resizing"); - - /** - * Creates or finds a AllocationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding AllocationState. - */ - @JsonCreator - public static AllocationState fromString(String name) { - return fromString(name, AllocationState.class); - } - - /** @return known AllocationState values. */ - public static Collection values() { - return values(AllocationState.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlCompute.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlCompute.java deleted file mode 100644 index 83150719c731..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlCompute.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** An Azure Machine Learning compute. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("AmlCompute") -@Fluent -public final class AmlCompute extends Compute { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AmlCompute.class); - - /* - * AML Compute properties - */ - @JsonProperty(value = "properties") - private AmlComputeProperties properties; - - /** - * Get the properties property: AML Compute properties. - * - * @return the properties value. - */ - public AmlComputeProperties properties() { - return this.properties; - } - - /** - * Set the properties property: AML Compute properties. - * - * @param properties the properties value to set. - * @return the AmlCompute object itself. - */ - public AmlCompute withProperties(AmlComputeProperties properties) { - this.properties = properties; - return this; - } - - /** {@inheritDoc} */ - @Override - public AmlCompute withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public AmlCompute withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public AmlCompute withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public AmlCompute withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeNodeInformation.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeNodeInformation.java deleted file mode 100644 index 6afb8bb9e26b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeNodeInformation.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Compute node information related to a AmlCompute. */ -@Immutable -public final class AmlComputeNodeInformation { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AmlComputeNodeInformation.class); - - /* - * ID of the compute node. - */ - @JsonProperty(value = "nodeId", access = JsonProperty.Access.WRITE_ONLY) - private String nodeId; - - /* - * Private IP address of the compute node. - */ - @JsonProperty(value = "privateIpAddress", access = JsonProperty.Access.WRITE_ONLY) - private String privateIpAddress; - - /* - * Public IP address of the compute node. - */ - @JsonProperty(value = "publicIpAddress", access = JsonProperty.Access.WRITE_ONLY) - private String publicIpAddress; - - /* - * SSH port number of the node. - */ - @JsonProperty(value = "port", access = JsonProperty.Access.WRITE_ONLY) - private Integer port; - - /* - * State of the compute node. Values are idle, running, preparing, - * unusable, leaving and preempted. - */ - @JsonProperty(value = "nodeState", access = JsonProperty.Access.WRITE_ONLY) - private NodeState nodeState; - - /* - * ID of the Experiment running on the node, if any else null. - */ - @JsonProperty(value = "runId", access = JsonProperty.Access.WRITE_ONLY) - private String runId; - - /** - * Get the nodeId property: ID of the compute node. - * - * @return the nodeId value. - */ - public String nodeId() { - return this.nodeId; - } - - /** - * Get the privateIpAddress property: Private IP address of the compute node. - * - * @return the privateIpAddress value. - */ - public String privateIpAddress() { - return this.privateIpAddress; - } - - /** - * Get the publicIpAddress property: Public IP address of the compute node. - * - * @return the publicIpAddress value. - */ - public String publicIpAddress() { - return this.publicIpAddress; - } - - /** - * Get the port property: SSH port number of the node. - * - * @return the port value. - */ - public Integer port() { - return this.port; - } - - /** - * Get the nodeState property: State of the compute node. Values are idle, running, preparing, unusable, leaving and - * preempted. - * - * @return the nodeState value. - */ - public NodeState nodeState() { - return this.nodeState; - } - - /** - * Get the runId property: ID of the Experiment running on the node, if any else null. - * - * @return the runId value. - */ - public String runId() { - return this.runId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeNodesInformation.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeNodesInformation.java deleted file mode 100644 index 5bebba477bb5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeNodesInformation.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Compute node information related to a AmlCompute. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("AmlCompute") -@Immutable -public final class AmlComputeNodesInformation extends ComputeNodesInformation { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AmlComputeNodesInformation.class); - - /* - * The collection of returned AmlCompute nodes details. - */ - @JsonProperty(value = "nodes", access = JsonProperty.Access.WRITE_ONLY) - private List nodes; - - /** - * Get the nodes property: The collection of returned AmlCompute nodes details. - * - * @return the nodes value. - */ - public List nodes() { - return this.nodes; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (nodes() != null) { - nodes().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeProperties.java deleted file mode 100644 index d30359ea251b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeProperties.java +++ /dev/null @@ -1,436 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** AML Compute properties. */ -@Fluent -public final class AmlComputeProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AmlComputeProperties.class); - - /* - * Compute OS Type - */ - @JsonProperty(value = "osType") - private OsType osType; - - /* - * Virtual Machine Size - */ - @JsonProperty(value = "vmSize") - private String vmSize; - - /* - * Virtual Machine priority - */ - @JsonProperty(value = "vmPriority") - private VmPriority vmPriority; - - /* - * Virtual Machine image for AML Compute - windows only - */ - @JsonProperty(value = "virtualMachineImage") - private VirtualMachineImage virtualMachineImage; - - /* - * Network is isolated or not - */ - @JsonProperty(value = "isolatedNetwork") - private Boolean isolatedNetwork; - - /* - * Scale settings for AML Compute - */ - @JsonProperty(value = "scaleSettings") - private ScaleSettings scaleSettings; - - /* - * Credentials for an administrator user account that will be created on - * each compute node. - */ - @JsonProperty(value = "userAccountCredentials") - private UserAccountCredentials userAccountCredentials; - - /* - * Virtual network subnet resource ID the compute nodes belong to. - */ - @JsonProperty(value = "subnet") - private ResourceId subnet; - - /* - * State of the public SSH port. Possible values are: Disabled - Indicates - * that the public ssh port is closed on all nodes of the cluster. Enabled - * - Indicates that the public ssh port is open on all nodes of the - * cluster. NotSpecified - Indicates that the public ssh port is closed on - * all nodes of the cluster if VNet is defined, else is open all public - * nodes. It can be default only during cluster creation time, after - * creation it will be either enabled or disabled. - */ - @JsonProperty(value = "remoteLoginPortPublicAccess") - private RemoteLoginPortPublicAccess remoteLoginPortPublicAccess; - - /* - * Allocation state of the compute. Possible values are: steady - Indicates - * that the compute is not resizing. There are no changes to the number of - * compute nodes in the compute in progress. A compute enters this state - * when it is created and when no operations are being performed on the - * compute to change the number of compute nodes. resizing - Indicates that - * the compute is resizing; that is, compute nodes are being added to or - * removed from the compute. - */ - @JsonProperty(value = "allocationState", access = JsonProperty.Access.WRITE_ONLY) - private AllocationState allocationState; - - /* - * The time at which the compute entered its current allocation state. - */ - @JsonProperty(value = "allocationStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime allocationStateTransitionTime; - - /* - * Collection of errors encountered by various compute nodes during node - * setup. - */ - @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) - private List errors; - - /* - * The number of compute nodes currently assigned to the compute. - */ - @JsonProperty(value = "currentNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer currentNodeCount; - - /* - * The target number of compute nodes for the compute. If the - * allocationState is resizing, this property denotes the target node count - * for the ongoing resize operation. If the allocationState is steady, this - * property denotes the target node count for the previous resize - * operation. - */ - @JsonProperty(value = "targetNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer targetNodeCount; - - /* - * Counts of various node states on the compute. - */ - @JsonProperty(value = "nodeStateCounts", access = JsonProperty.Access.WRITE_ONLY) - private NodeStateCounts nodeStateCounts; - - /* - * Enable or disable node public IP address provisioning. Possible values - * are: Possible values are: true - Indicates that the compute nodes will - * have public IPs provisioned. false - Indicates that the compute nodes - * will have a private endpoint and no public IPs. - */ - @JsonProperty(value = "enableNodePublicIp") - private Boolean enableNodePublicIp; - - /** - * Get the osType property: Compute OS Type. - * - * @return the osType value. - */ - public OsType osType() { - return this.osType; - } - - /** - * Set the osType property: Compute OS Type. - * - * @param osType the osType value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withOsType(OsType osType) { - this.osType = osType; - return this; - } - - /** - * Get the vmSize property: Virtual Machine Size. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: Virtual Machine Size. - * - * @param vmSize the vmSize value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the vmPriority property: Virtual Machine priority. - * - * @return the vmPriority value. - */ - public VmPriority vmPriority() { - return this.vmPriority; - } - - /** - * Set the vmPriority property: Virtual Machine priority. - * - * @param vmPriority the vmPriority value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withVmPriority(VmPriority vmPriority) { - this.vmPriority = vmPriority; - return this; - } - - /** - * Get the virtualMachineImage property: Virtual Machine image for AML Compute - windows only. - * - * @return the virtualMachineImage value. - */ - public VirtualMachineImage virtualMachineImage() { - return this.virtualMachineImage; - } - - /** - * Set the virtualMachineImage property: Virtual Machine image for AML Compute - windows only. - * - * @param virtualMachineImage the virtualMachineImage value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withVirtualMachineImage(VirtualMachineImage virtualMachineImage) { - this.virtualMachineImage = virtualMachineImage; - return this; - } - - /** - * Get the isolatedNetwork property: Network is isolated or not. - * - * @return the isolatedNetwork value. - */ - public Boolean isolatedNetwork() { - return this.isolatedNetwork; - } - - /** - * Set the isolatedNetwork property: Network is isolated or not. - * - * @param isolatedNetwork the isolatedNetwork value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withIsolatedNetwork(Boolean isolatedNetwork) { - this.isolatedNetwork = isolatedNetwork; - return this; - } - - /** - * Get the scaleSettings property: Scale settings for AML Compute. - * - * @return the scaleSettings value. - */ - public ScaleSettings scaleSettings() { - return this.scaleSettings; - } - - /** - * Set the scaleSettings property: Scale settings for AML Compute. - * - * @param scaleSettings the scaleSettings value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withScaleSettings(ScaleSettings scaleSettings) { - this.scaleSettings = scaleSettings; - return this; - } - - /** - * Get the userAccountCredentials property: Credentials for an administrator user account that will be created on - * each compute node. - * - * @return the userAccountCredentials value. - */ - public UserAccountCredentials userAccountCredentials() { - return this.userAccountCredentials; - } - - /** - * Set the userAccountCredentials property: Credentials for an administrator user account that will be created on - * each compute node. - * - * @param userAccountCredentials the userAccountCredentials value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withUserAccountCredentials(UserAccountCredentials userAccountCredentials) { - this.userAccountCredentials = userAccountCredentials; - return this; - } - - /** - * Get the subnet property: Virtual network subnet resource ID the compute nodes belong to. - * - * @return the subnet value. - */ - public ResourceId subnet() { - return this.subnet; - } - - /** - * Set the subnet property: Virtual network subnet resource ID the compute nodes belong to. - * - * @param subnet the subnet value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withSubnet(ResourceId subnet) { - this.subnet = subnet; - return this; - } - - /** - * Get the remoteLoginPortPublicAccess property: State of the public SSH port. Possible values are: Disabled - - * Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh - * port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all - * nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster - * creation time, after creation it will be either enabled or disabled. - * - * @return the remoteLoginPortPublicAccess value. - */ - public RemoteLoginPortPublicAccess remoteLoginPortPublicAccess() { - return this.remoteLoginPortPublicAccess; - } - - /** - * Set the remoteLoginPortPublicAccess property: State of the public SSH port. Possible values are: Disabled - - * Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh - * port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all - * nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster - * creation time, after creation it will be either enabled or disabled. - * - * @param remoteLoginPortPublicAccess the remoteLoginPortPublicAccess value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties - withRemoteLoginPortPublicAccess(RemoteLoginPortPublicAccess remoteLoginPortPublicAccess) { - this.remoteLoginPortPublicAccess = remoteLoginPortPublicAccess; - return this; - } - - /** - * Get the allocationState property: Allocation state of the compute. Possible values are: steady - Indicates that - * the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A - * compute enters this state when it is created and when no operations are being performed on the compute to change - * the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being - * added to or removed from the compute. - * - * @return the allocationState value. - */ - public AllocationState allocationState() { - return this.allocationState; - } - - /** - * Get the allocationStateTransitionTime property: The time at which the compute entered its current allocation - * state. - * - * @return the allocationStateTransitionTime value. - */ - public OffsetDateTime allocationStateTransitionTime() { - return this.allocationStateTransitionTime; - } - - /** - * Get the errors property: Collection of errors encountered by various compute nodes during node setup. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Get the currentNodeCount property: The number of compute nodes currently assigned to the compute. - * - * @return the currentNodeCount value. - */ - public Integer currentNodeCount() { - return this.currentNodeCount; - } - - /** - * Get the targetNodeCount property: The target number of compute nodes for the compute. If the allocationState is - * resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is - * steady, this property denotes the target node count for the previous resize operation. - * - * @return the targetNodeCount value. - */ - public Integer targetNodeCount() { - return this.targetNodeCount; - } - - /** - * Get the nodeStateCounts property: Counts of various node states on the compute. - * - * @return the nodeStateCounts value. - */ - public NodeStateCounts nodeStateCounts() { - return this.nodeStateCounts; - } - - /** - * Get the enableNodePublicIp property: Enable or disable node public IP address provisioning. Possible values are: - * Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates - * that the compute nodes will have a private endpoint and no public IPs. - * - * @return the enableNodePublicIp value. - */ - public Boolean enableNodePublicIp() { - return this.enableNodePublicIp; - } - - /** - * Set the enableNodePublicIp property: Enable or disable node public IP address provisioning. Possible values are: - * Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates - * that the compute nodes will have a private endpoint and no public IPs. - * - * @param enableNodePublicIp the enableNodePublicIp value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withEnableNodePublicIp(Boolean enableNodePublicIp) { - this.enableNodePublicIp = enableNodePublicIp; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (virtualMachineImage() != null) { - virtualMachineImage().validate(); - } - if (scaleSettings() != null) { - scaleSettings().validate(); - } - if (userAccountCredentials() != null) { - userAccountCredentials().validate(); - } - if (subnet() != null) { - subnet().validate(); - } - if (nodeStateCounts() != null) { - nodeStateCounts().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlUserFeature.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlUserFeature.java deleted file mode 100644 index 943d320b3aa8..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlUserFeature.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.AmlUserFeatureInner; - -/** An immutable client-side representation of AmlUserFeature. */ -public interface AmlUserFeature { - /** - * Gets the id property: Specifies the feature ID. - * - * @return the id value. - */ - String id(); - - /** - * Gets the displayName property: Specifies the feature name. - * - * @return the displayName value. - */ - String displayName(); - - /** - * Gets the description property: Describes the feature for user experience. - * - * @return the description value. - */ - String description(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.AmlUserFeatureInner object. - * - * @return the inner object. - */ - AmlUserFeatureInner innerModel(); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ApplicationSharingPolicy.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ApplicationSharingPolicy.java deleted file mode 100644 index b3c92449a120..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ApplicationSharingPolicy.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ApplicationSharingPolicy. */ -public final class ApplicationSharingPolicy extends ExpandableStringEnum { - /** Static value Personal for ApplicationSharingPolicy. */ - public static final ApplicationSharingPolicy PERSONAL = fromString("Personal"); - - /** Static value Shared for ApplicationSharingPolicy. */ - public static final ApplicationSharingPolicy SHARED = fromString("Shared"); - - /** - * Creates or finds a ApplicationSharingPolicy from its string representation. - * - * @param name a name to look for. - * @return the corresponding ApplicationSharingPolicy. - */ - @JsonCreator - public static ApplicationSharingPolicy fromString(String name) { - return fromString(name, ApplicationSharingPolicy.class); - } - - /** @return known ApplicationSharingPolicy values. */ - public static Collection values() { - return values(ApplicationSharingPolicy.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AssignedUser.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AssignedUser.java deleted file mode 100644 index d0448d3636af..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AssignedUser.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** A user that can be assigned to a compute instance. */ -@Fluent -public final class AssignedUser { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AssignedUser.class); - - /* - * User’s AAD Object Id. - */ - @JsonProperty(value = "objectId", required = true) - private String objectId; - - /* - * User’s AAD Tenant Id. - */ - @JsonProperty(value = "tenantId", required = true) - private String tenantId; - - /** - * Get the objectId property: User’s AAD Object Id. - * - * @return the objectId value. - */ - public String objectId() { - return this.objectId; - } - - /** - * Set the objectId property: User’s AAD Object Id. - * - * @param objectId the objectId value to set. - * @return the AssignedUser object itself. - */ - public AssignedUser withObjectId(String objectId) { - this.objectId = objectId; - return this; - } - - /** - * Get the tenantId property: User’s AAD Tenant Id. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: User’s AAD Tenant Id. - * - * @param tenantId the tenantId value to set. - * @return the AssignedUser object itself. - */ - public AssignedUser withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (objectId() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property objectId in model AssignedUser")); - } - if (tenantId() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property tenantId in model AssignedUser")); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AuthKeys.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AuthKeys.java deleted file mode 100644 index 9981a7dd1702..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AuthKeys.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 AuthKeys model. */ -@Fluent -public class AuthKeys { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AuthKeys.class); - - /* - * The primary key. - */ - @JsonProperty(value = "primaryKey") - private String primaryKey; - - /* - * The secondary key. - */ - @JsonProperty(value = "secondaryKey") - private String secondaryKey; - - /** - * Get the primaryKey property: The primary key. - * - * @return the primaryKey value. - */ - public String primaryKey() { - return this.primaryKey; - } - - /** - * Set the primaryKey property: The primary key. - * - * @param primaryKey the primaryKey value to set. - * @return the AuthKeys object itself. - */ - public AuthKeys withPrimaryKey(String primaryKey) { - this.primaryKey = primaryKey; - return this; - } - - /** - * Get the secondaryKey property: The secondary key. - * - * @return the secondaryKey value. - */ - public String secondaryKey() { - return this.secondaryKey; - } - - /** - * Set the secondaryKey property: The secondary key. - * - * @param secondaryKey the secondaryKey value to set. - * @return the AuthKeys object itself. - */ - public AuthKeys withSecondaryKey(String secondaryKey) { - this.secondaryKey = secondaryKey; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoPauseProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoPauseProperties.java deleted file mode 100644 index fb74b4f7a909..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoPauseProperties.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Auto pause properties. */ -@Fluent -public final class AutoPauseProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AutoPauseProperties.class); - - /* - * The delayInMinutes property. - */ - @JsonProperty(value = "delayInMinutes") - private Integer delayInMinutes; - - /* - * The enabled property. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /** - * Get the delayInMinutes property: The delayInMinutes property. - * - * @return the delayInMinutes value. - */ - public Integer delayInMinutes() { - return this.delayInMinutes; - } - - /** - * Set the delayInMinutes property: The delayInMinutes property. - * - * @param delayInMinutes the delayInMinutes value to set. - * @return the AutoPauseProperties object itself. - */ - public AutoPauseProperties withDelayInMinutes(Integer delayInMinutes) { - this.delayInMinutes = delayInMinutes; - return this; - } - - /** - * Get the enabled property: The enabled property. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: The enabled property. - * - * @param enabled the enabled value to set. - * @return the AutoPauseProperties object itself. - */ - public AutoPauseProperties withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoScaleProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoScaleProperties.java deleted file mode 100644 index 5e587f2dad41..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoScaleProperties.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Auto scale properties. */ -@Fluent -public final class AutoScaleProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AutoScaleProperties.class); - - /* - * The minNodeCount property. - */ - @JsonProperty(value = "minNodeCount") - private Integer minNodeCount; - - /* - * The enabled property. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * The maxNodeCount property. - */ - @JsonProperty(value = "maxNodeCount") - private Integer maxNodeCount; - - /** - * Get the minNodeCount property: The minNodeCount property. - * - * @return the minNodeCount value. - */ - public Integer minNodeCount() { - return this.minNodeCount; - } - - /** - * Set the minNodeCount property: The minNodeCount property. - * - * @param minNodeCount the minNodeCount value to set. - * @return the AutoScaleProperties object itself. - */ - public AutoScaleProperties withMinNodeCount(Integer minNodeCount) { - this.minNodeCount = minNodeCount; - return this; - } - - /** - * Get the enabled property: The enabled property. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: The enabled property. - * - * @param enabled the enabled value to set. - * @return the AutoScaleProperties object itself. - */ - public AutoScaleProperties withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the maxNodeCount property: The maxNodeCount property. - * - * @return the maxNodeCount value. - */ - public Integer maxNodeCount() { - return this.maxNodeCount; - } - - /** - * Set the maxNodeCount property: The maxNodeCount property. - * - * @param maxNodeCount the maxNodeCount value to set. - * @return the AutoScaleProperties object itself. - */ - public AutoScaleProperties withMaxNodeCount(Integer maxNodeCount) { - this.maxNodeCount = maxNodeCount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoScaler.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoScaler.java deleted file mode 100644 index 6d181bd98994..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoScaler.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 Auto Scaler properties. */ -@Fluent -public class AutoScaler { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AutoScaler.class); - - /* - * Option to enable/disable auto scaling. - */ - @JsonProperty(value = "autoscaleEnabled") - private Boolean autoscaleEnabled; - - /* - * The minimum number of replicas to scale down to. - */ - @JsonProperty(value = "minReplicas") - private Integer minReplicas; - - /* - * The maximum number of replicas in the cluster. - */ - @JsonProperty(value = "maxReplicas") - private Integer maxReplicas; - - /* - * The target utilization percentage to use for determining whether to - * scale the cluster. - */ - @JsonProperty(value = "targetUtilization") - private Integer targetUtilization; - - /* - * The amount of seconds to wait between auto scale updates. - */ - @JsonProperty(value = "refreshPeriodInSeconds") - private Integer refreshPeriodInSeconds; - - /** - * Get the autoscaleEnabled property: Option to enable/disable auto scaling. - * - * @return the autoscaleEnabled value. - */ - public Boolean autoscaleEnabled() { - return this.autoscaleEnabled; - } - - /** - * Set the autoscaleEnabled property: Option to enable/disable auto scaling. - * - * @param autoscaleEnabled the autoscaleEnabled value to set. - * @return the AutoScaler object itself. - */ - public AutoScaler withAutoscaleEnabled(Boolean autoscaleEnabled) { - this.autoscaleEnabled = autoscaleEnabled; - return this; - } - - /** - * Get the minReplicas property: The minimum number of replicas to scale down to. - * - * @return the minReplicas value. - */ - public Integer minReplicas() { - return this.minReplicas; - } - - /** - * Set the minReplicas property: The minimum number of replicas to scale down to. - * - * @param minReplicas the minReplicas value to set. - * @return the AutoScaler object itself. - */ - public AutoScaler withMinReplicas(Integer minReplicas) { - this.minReplicas = minReplicas; - return this; - } - - /** - * Get the maxReplicas property: The maximum number of replicas in the cluster. - * - * @return the maxReplicas value. - */ - public Integer maxReplicas() { - return this.maxReplicas; - } - - /** - * Set the maxReplicas property: The maximum number of replicas in the cluster. - * - * @param maxReplicas the maxReplicas value to set. - * @return the AutoScaler object itself. - */ - public AutoScaler withMaxReplicas(Integer maxReplicas) { - this.maxReplicas = maxReplicas; - return this; - } - - /** - * Get the targetUtilization property: The target utilization percentage to use for determining whether to scale the - * cluster. - * - * @return the targetUtilization value. - */ - public Integer targetUtilization() { - return this.targetUtilization; - } - - /** - * Set the targetUtilization property: The target utilization percentage to use for determining whether to scale the - * cluster. - * - * @param targetUtilization the targetUtilization value to set. - * @return the AutoScaler object itself. - */ - public AutoScaler withTargetUtilization(Integer targetUtilization) { - this.targetUtilization = targetUtilization; - return this; - } - - /** - * Get the refreshPeriodInSeconds property: The amount of seconds to wait between auto scale updates. - * - * @return the refreshPeriodInSeconds value. - */ - public Integer refreshPeriodInSeconds() { - return this.refreshPeriodInSeconds; - } - - /** - * Set the refreshPeriodInSeconds property: The amount of seconds to wait between auto scale updates. - * - * @param refreshPeriodInSeconds the refreshPeriodInSeconds value to set. - * @return the AutoScaler object itself. - */ - public AutoScaler 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/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BillingCurrency.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BillingCurrency.java deleted file mode 100644 index 8bf384777e4e..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BillingCurrency.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for BillingCurrency. */ -public final class BillingCurrency extends ExpandableStringEnum { - /** Static value USD for BillingCurrency. */ - public static final BillingCurrency USD = fromString("USD"); - - /** - * Creates or finds a BillingCurrency from its string representation. - * - * @param name a name to look for. - * @return the corresponding BillingCurrency. - */ - @JsonCreator - public static BillingCurrency fromString(String name) { - return fromString(name, BillingCurrency.class); - } - - /** @return known BillingCurrency values. */ - public static Collection values() { - return values(BillingCurrency.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ClusterPurpose.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ClusterPurpose.java deleted file mode 100644 index b40057e337f5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ClusterPurpose.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ClusterPurpose. */ -public final class ClusterPurpose extends ExpandableStringEnum { - /** Static value FastProd for ClusterPurpose. */ - public static final ClusterPurpose FAST_PROD = fromString("FastProd"); - - /** Static value DenseProd for ClusterPurpose. */ - public static final ClusterPurpose DENSE_PROD = fromString("DenseProd"); - - /** Static value DevTest for ClusterPurpose. */ - public static final ClusterPurpose DEV_TEST = fromString("DevTest"); - - /** - * Creates or finds a ClusterPurpose from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClusterPurpose. - */ - @JsonCreator - public static ClusterPurpose fromString(String name) { - return fromString(name, ClusterPurpose.class); - } - - /** @return known ClusterPurpose values. */ - public static Collection values() { - return values(ClusterPurpose.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ClusterUpdateParameters.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ClusterUpdateParameters.java deleted file mode 100644 index 045bcf11b026..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ClusterUpdateParameters.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** AmlCompute update parameters. */ -@JsonFlatten -@Fluent -public class ClusterUpdateParameters { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ClusterUpdateParameters.class); - - /* - * Desired scale settings for the amlCompute. - */ - @JsonProperty(value = "properties.scaleSettings") - private ScaleSettings scaleSettings; - - /** - * Get the scaleSettings property: Desired scale settings for the amlCompute. - * - * @return the scaleSettings value. - */ - public ScaleSettings scaleSettings() { - return this.scaleSettings; - } - - /** - * Set the scaleSettings property: Desired scale settings for the amlCompute. - * - * @param scaleSettings the scaleSettings value to set. - * @return the ClusterUpdateParameters object itself. - */ - public ClusterUpdateParameters withScaleSettings(ScaleSettings scaleSettings) { - this.scaleSettings = scaleSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scaleSettings() != null) { - scaleSettings().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Compute.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Compute.java deleted file mode 100644 index 84a0683e0dc3..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Compute.java +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Machine Learning compute object. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "computeType", - defaultImpl = Compute.class) -@JsonTypeName("Compute") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "AKS", value = Aks.class), - @JsonSubTypes.Type(name = "AmlCompute", value = AmlCompute.class), - @JsonSubTypes.Type(name = "ComputeInstance", value = ComputeInstance.class), - @JsonSubTypes.Type(name = "VirtualMachine", value = VirtualMachine.class), - @JsonSubTypes.Type(name = "HDInsight", value = HDInsight.class), - @JsonSubTypes.Type(name = "DataFactory", value = DataFactory.class), - @JsonSubTypes.Type(name = "Databricks", value = Databricks.class), - @JsonSubTypes.Type(name = "DataLakeAnalytics", value = DataLakeAnalytics.class), - @JsonSubTypes.Type(name = "SynapseSpark", value = SynapseSpark.class) }) -@Fluent -public class Compute { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(Compute.class); - - /* - * Location for the underlying compute - */ - @JsonProperty(value = "computeLocation") - private String computeLocation; - - /* - * The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * The description of the Machine Learning compute. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The time at which the compute was created. - */ - @JsonProperty(value = "createdOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - @JsonProperty(value = "modifiedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime modifiedOn; - - /* - * ARM resource id of the underlying compute - */ - @JsonProperty(value = "resourceId") - private String resourceId; - - /* - * Errors during provisioning - */ - @JsonProperty(value = "provisioningErrors", access = JsonProperty.Access.WRITE_ONLY) - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - */ - @JsonProperty(value = "isAttachedCompute", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isAttachedCompute; - - /* - * Opt-out of local authentication and ensure customers can use only MSI - * and AAD exclusively for authentication. - */ - @JsonProperty(value = "disableLocalAuth") - private Boolean disableLocalAuth; - - /** - * Get the computeLocation property: Location for the underlying compute. - * - * @return the computeLocation value. - */ - public String computeLocation() { - return this.computeLocation; - } - - /** - * Set the computeLocation property: Location for the underlying compute. - * - * @param computeLocation the computeLocation value to set. - * @return the Compute object itself. - */ - public Compute withComputeLocation(String computeLocation) { - this.computeLocation = computeLocation; - return this; - } - - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the description property: The description of the Machine Learning compute. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the Machine Learning compute. - * - * @param description the description value to set. - * @return the Compute object itself. - */ - public Compute withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the resourceId property: ARM resource id of the underlying compute. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: ARM resource id of the underlying compute. - * - * @param resourceId the resourceId value to set. - * @return the Compute object itself. - */ - public Compute withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - - /** - * Get the disableLocalAuth property: Opt-out of local authentication and ensure customers can use only MSI and AAD - * exclusively for authentication. - * - * @return the disableLocalAuth value. - */ - public Boolean disableLocalAuth() { - return this.disableLocalAuth; - } - - /** - * Set the disableLocalAuth property: Opt-out of local authentication and ensure customers can use only MSI and AAD - * exclusively for authentication. - * - * @param disableLocalAuth the disableLocalAuth value to set. - * @return the Compute object itself. - */ - public Compute withDisableLocalAuth(Boolean disableLocalAuth) { - this.disableLocalAuth = disableLocalAuth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeEnvironmentType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeEnvironmentType.java deleted file mode 100644 index a792b0e5311e..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeEnvironmentType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ComputeEnvironmentType. */ -public final class ComputeEnvironmentType extends ExpandableStringEnum { - /** Static value ACI for ComputeEnvironmentType. */ - public static final ComputeEnvironmentType ACI = fromString("ACI"); - - /** Static value AKS for ComputeEnvironmentType. */ - public static final ComputeEnvironmentType AKS = fromString("AKS"); - - /** - * Creates or finds a ComputeEnvironmentType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeEnvironmentType. - */ - @JsonCreator - public static ComputeEnvironmentType fromString(String name) { - return fromString(name, ComputeEnvironmentType.class); - } - - /** @return known ComputeEnvironmentType values. */ - public static Collection values() { - return values(ComputeEnvironmentType.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstance.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstance.java deleted file mode 100644 index 01653fceb97a..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstance.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** An Azure Machine Learning compute instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("ComputeInstance") -@Fluent -public final class ComputeInstance extends Compute { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ComputeInstance.class); - - /* - * Compute Instance properties - */ - @JsonProperty(value = "properties") - private ComputeInstanceProperties properties; - - /** - * Get the properties property: Compute Instance properties. - * - * @return the properties value. - */ - public ComputeInstanceProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Compute Instance properties. - * - * @param properties the properties value to set. - * @return the ComputeInstance object itself. - */ - public ComputeInstance withProperties(ComputeInstanceProperties properties) { - this.properties = properties; - return this; - } - - /** {@inheritDoc} */ - @Override - public ComputeInstance withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComputeInstance withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComputeInstance withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComputeInstance withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceApplication.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceApplication.java deleted file mode 100644 index de29f849bcfc..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceApplication.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Defines an Aml Instance application and its connectivity endpoint URI. */ -@Fluent -public final class ComputeInstanceApplication { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ComputeInstanceApplication.class); - - /* - * Name of the ComputeInstance application. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * Application' endpoint URI. - */ - @JsonProperty(value = "endpointUri") - private String endpointUri; - - /** - * Get the displayName property: Name of the ComputeInstance application. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Name of the ComputeInstance application. - * - * @param displayName the displayName value to set. - * @return the ComputeInstanceApplication object itself. - */ - public ComputeInstanceApplication withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the endpointUri property: Application' endpoint URI. - * - * @return the endpointUri value. - */ - public String endpointUri() { - return this.endpointUri; - } - - /** - * Set the endpointUri property: Application' endpoint URI. - * - * @param endpointUri the endpointUri value to set. - * @return the ComputeInstanceApplication object itself. - */ - public ComputeInstanceApplication withEndpointUri(String endpointUri) { - this.endpointUri = endpointUri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceAuthorizationType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceAuthorizationType.java deleted file mode 100644 index e0359524a8a7..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceAuthorizationType.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ComputeInstanceAuthorizationType. */ -public final class ComputeInstanceAuthorizationType extends ExpandableStringEnum { - /** Static value personal for ComputeInstanceAuthorizationType. */ - public static final ComputeInstanceAuthorizationType PERSONAL = fromString("personal"); - - /** - * Creates or finds a ComputeInstanceAuthorizationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeInstanceAuthorizationType. - */ - @JsonCreator - public static ComputeInstanceAuthorizationType fromString(String name) { - return fromString(name, ComputeInstanceAuthorizationType.class); - } - - /** @return known ComputeInstanceAuthorizationType values. */ - public static Collection values() { - return values(ComputeInstanceAuthorizationType.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceConnectivityEndpoints.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceConnectivityEndpoints.java deleted file mode 100644 index fbb4ecba9d0b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceConnectivityEndpoints.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Defines all connectivity endpoints and properties for an ComputeInstance. */ -@Immutable -public final class ComputeInstanceConnectivityEndpoints { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ComputeInstanceConnectivityEndpoints.class); - - /* - * Public IP Address of this ComputeInstance. - */ - @JsonProperty(value = "publicIpAddress", access = JsonProperty.Access.WRITE_ONLY) - private String publicIpAddress; - - /* - * Private IP Address of this ComputeInstance (local to the VNET in which - * the compute instance is deployed). - */ - @JsonProperty(value = "privateIpAddress", access = JsonProperty.Access.WRITE_ONLY) - private String privateIpAddress; - - /** - * Get the publicIpAddress property: Public IP Address of this ComputeInstance. - * - * @return the publicIpAddress value. - */ - public String publicIpAddress() { - return this.publicIpAddress; - } - - /** - * Get the privateIpAddress property: Private IP Address of this ComputeInstance (local to the VNET in which the - * compute instance is deployed). - * - * @return the privateIpAddress value. - */ - public String privateIpAddress() { - return this.privateIpAddress; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceCreatedBy.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceCreatedBy.java deleted file mode 100644 index 2129fbb5a0bf..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceCreatedBy.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Describes information on user who created this ComputeInstance. */ -@Immutable -public final class ComputeInstanceCreatedBy { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ComputeInstanceCreatedBy.class); - - /* - * Name of the user. - */ - @JsonProperty(value = "userName", access = JsonProperty.Access.WRITE_ONLY) - private String username; - - /* - * Uniquely identifies user' Azure Active Directory organization. - */ - @JsonProperty(value = "userOrgId", access = JsonProperty.Access.WRITE_ONLY) - private String userOrgId; - - /* - * Uniquely identifies the user within his/her organization. - */ - @JsonProperty(value = "userId", access = JsonProperty.Access.WRITE_ONLY) - private String userId; - - /** - * Get the username property: Name of the user. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Get the userOrgId property: Uniquely identifies user' Azure Active Directory organization. - * - * @return the userOrgId value. - */ - public String userOrgId() { - return this.userOrgId; - } - - /** - * Get the userId property: Uniquely identifies the user within his/her organization. - * - * @return the userId value. - */ - public String userId() { - return this.userId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceLastOperation.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceLastOperation.java deleted file mode 100644 index 8430b9599045..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceLastOperation.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.time.OffsetDateTime; - -/** The last operation on ComputeInstance. */ -@Fluent -public final class ComputeInstanceLastOperation { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ComputeInstanceLastOperation.class); - - /* - * Name of the last operation. - */ - @JsonProperty(value = "operationName") - private OperationName operationName; - - /* - * Time of the last operation. - */ - @JsonProperty(value = "operationTime") - private OffsetDateTime operationTime; - - /* - * Operation status. - */ - @JsonProperty(value = "operationStatus") - private OperationStatus operationStatus; - - /** - * Get the operationName property: Name of the last operation. - * - * @return the operationName value. - */ - public OperationName operationName() { - return this.operationName; - } - - /** - * Set the operationName property: Name of the last operation. - * - * @param operationName the operationName value to set. - * @return the ComputeInstanceLastOperation object itself. - */ - public ComputeInstanceLastOperation withOperationName(OperationName operationName) { - this.operationName = operationName; - return this; - } - - /** - * Get the operationTime property: Time of the last operation. - * - * @return the operationTime value. - */ - public OffsetDateTime operationTime() { - return this.operationTime; - } - - /** - * Set the operationTime property: Time of the last operation. - * - * @param operationTime the operationTime value to set. - * @return the ComputeInstanceLastOperation object itself. - */ - public ComputeInstanceLastOperation withOperationTime(OffsetDateTime operationTime) { - this.operationTime = operationTime; - return this; - } - - /** - * Get the operationStatus property: Operation status. - * - * @return the operationStatus value. - */ - public OperationStatus operationStatus() { - return this.operationStatus; - } - - /** - * Set the operationStatus property: Operation status. - * - * @param operationStatus the operationStatus value to set. - * @return the ComputeInstanceLastOperation object itself. - */ - public ComputeInstanceLastOperation withOperationStatus(OperationStatus operationStatus) { - this.operationStatus = operationStatus; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceProperties.java deleted file mode 100644 index d8c57b6c4e10..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceProperties.java +++ /dev/null @@ -1,336 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Compute Instance properties. */ -@Fluent -public final class ComputeInstanceProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ComputeInstanceProperties.class); - - /* - * Virtual Machine Size - */ - @JsonProperty(value = "vmSize") - private String vmSize; - - /* - * Virtual network subnet resource ID the compute nodes belong to. - */ - @JsonProperty(value = "subnet") - private ResourceId subnet; - - /* - * Policy for sharing applications on this compute instance among users of - * parent workspace. If Personal, only the creator can access applications - * on this compute instance. When Shared, any workspace user can access - * applications on this instance depending on his/her assigned role. - */ - @JsonProperty(value = "applicationSharingPolicy") - private ApplicationSharingPolicy applicationSharingPolicy; - - /* - * Specifies policy and settings for SSH access. - */ - @JsonProperty(value = "sshSettings") - private ComputeInstanceSshSettings sshSettings; - - /* - * Describes all connectivity endpoints available for this ComputeInstance. - */ - @JsonProperty(value = "connectivityEndpoints", access = JsonProperty.Access.WRITE_ONLY) - private ComputeInstanceConnectivityEndpoints connectivityEndpoints; - - /* - * Describes available applications and their endpoints on this - * ComputeInstance. - */ - @JsonProperty(value = "applications", access = JsonProperty.Access.WRITE_ONLY) - private List applications; - - /* - * Describes information on user who created this ComputeInstance. - */ - @JsonProperty(value = "createdBy", access = JsonProperty.Access.WRITE_ONLY) - private ComputeInstanceCreatedBy createdBy; - - /* - * Collection of errors encountered on this ComputeInstance. - */ - @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) - private List errors; - - /* - * The current state of this ComputeInstance. - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private ComputeInstanceState state; - - /* - * The Compute Instance Authorization type. Available values are personal - * (default). - */ - @JsonProperty(value = "computeInstanceAuthorizationType") - private ComputeInstanceAuthorizationType computeInstanceAuthorizationType; - - /* - * Settings for a personal compute instance. - */ - @JsonProperty(value = "personalComputeInstanceSettings") - private PersonalComputeInstanceSettings personalComputeInstanceSettings; - - /* - * Details of customized scripts to execute for setting up the cluster. - */ - @JsonProperty(value = "setupScripts") - private SetupScripts setupScripts; - - /* - * The last operation on ComputeInstance. - */ - @JsonProperty(value = "lastOperation", access = JsonProperty.Access.WRITE_ONLY) - private ComputeInstanceLastOperation lastOperation; - - /** - * Get the vmSize property: Virtual Machine Size. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: Virtual Machine Size. - * - * @param vmSize the vmSize value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the subnet property: Virtual network subnet resource ID the compute nodes belong to. - * - * @return the subnet value. - */ - public ResourceId subnet() { - return this.subnet; - } - - /** - * Set the subnet property: Virtual network subnet resource ID the compute nodes belong to. - * - * @param subnet the subnet value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties withSubnet(ResourceId subnet) { - this.subnet = subnet; - return this; - } - - /** - * Get the applicationSharingPolicy property: Policy for sharing applications on this compute instance among users - * of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, - * any workspace user can access applications on this instance depending on his/her assigned role. - * - * @return the applicationSharingPolicy value. - */ - public ApplicationSharingPolicy applicationSharingPolicy() { - return this.applicationSharingPolicy; - } - - /** - * Set the applicationSharingPolicy property: Policy for sharing applications on this compute instance among users - * of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, - * any workspace user can access applications on this instance depending on his/her assigned role. - * - * @param applicationSharingPolicy the applicationSharingPolicy value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties withApplicationSharingPolicy(ApplicationSharingPolicy applicationSharingPolicy) { - this.applicationSharingPolicy = applicationSharingPolicy; - return this; - } - - /** - * Get the sshSettings property: Specifies policy and settings for SSH access. - * - * @return the sshSettings value. - */ - public ComputeInstanceSshSettings sshSettings() { - return this.sshSettings; - } - - /** - * Set the sshSettings property: Specifies policy and settings for SSH access. - * - * @param sshSettings the sshSettings value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties withSshSettings(ComputeInstanceSshSettings sshSettings) { - this.sshSettings = sshSettings; - return this; - } - - /** - * Get the connectivityEndpoints property: Describes all connectivity endpoints available for this ComputeInstance. - * - * @return the connectivityEndpoints value. - */ - public ComputeInstanceConnectivityEndpoints connectivityEndpoints() { - return this.connectivityEndpoints; - } - - /** - * Get the applications property: Describes available applications and their endpoints on this ComputeInstance. - * - * @return the applications value. - */ - public List applications() { - return this.applications; - } - - /** - * Get the createdBy property: Describes information on user who created this ComputeInstance. - * - * @return the createdBy value. - */ - public ComputeInstanceCreatedBy createdBy() { - return this.createdBy; - } - - /** - * Get the errors property: Collection of errors encountered on this ComputeInstance. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Get the state property: The current state of this ComputeInstance. - * - * @return the state value. - */ - public ComputeInstanceState state() { - return this.state; - } - - /** - * Get the computeInstanceAuthorizationType property: The Compute Instance Authorization type. Available values are - * personal (default). - * - * @return the computeInstanceAuthorizationType value. - */ - public ComputeInstanceAuthorizationType computeInstanceAuthorizationType() { - return this.computeInstanceAuthorizationType; - } - - /** - * Set the computeInstanceAuthorizationType property: The Compute Instance Authorization type. Available values are - * personal (default). - * - * @param computeInstanceAuthorizationType the computeInstanceAuthorizationType value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties - withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType computeInstanceAuthorizationType) { - this.computeInstanceAuthorizationType = computeInstanceAuthorizationType; - return this; - } - - /** - * Get the personalComputeInstanceSettings property: Settings for a personal compute instance. - * - * @return the personalComputeInstanceSettings value. - */ - public PersonalComputeInstanceSettings personalComputeInstanceSettings() { - return this.personalComputeInstanceSettings; - } - - /** - * Set the personalComputeInstanceSettings property: Settings for a personal compute instance. - * - * @param personalComputeInstanceSettings the personalComputeInstanceSettings value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties - withPersonalComputeInstanceSettings(PersonalComputeInstanceSettings personalComputeInstanceSettings) { - this.personalComputeInstanceSettings = personalComputeInstanceSettings; - return this; - } - - /** - * Get the setupScripts property: Details of customized scripts to execute for setting up the cluster. - * - * @return the setupScripts value. - */ - public SetupScripts setupScripts() { - return this.setupScripts; - } - - /** - * Set the setupScripts property: Details of customized scripts to execute for setting up the cluster. - * - * @param setupScripts the setupScripts value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties withSetupScripts(SetupScripts setupScripts) { - this.setupScripts = setupScripts; - return this; - } - - /** - * Get the lastOperation property: The last operation on ComputeInstance. - * - * @return the lastOperation value. - */ - public ComputeInstanceLastOperation lastOperation() { - return this.lastOperation; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (subnet() != null) { - subnet().validate(); - } - if (sshSettings() != null) { - sshSettings().validate(); - } - if (connectivityEndpoints() != null) { - connectivityEndpoints().validate(); - } - if (applications() != null) { - applications().forEach(e -> e.validate()); - } - if (createdBy() != null) { - createdBy().validate(); - } - if (personalComputeInstanceSettings() != null) { - personalComputeInstanceSettings().validate(); - } - if (setupScripts() != null) { - setupScripts().validate(); - } - if (lastOperation() != null) { - lastOperation().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceSshSettings.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceSshSettings.java deleted file mode 100644 index 773743db98d6..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceSshSettings.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Specifies policy and settings for SSH access. */ -@Fluent -public final class ComputeInstanceSshSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ComputeInstanceSshSettings.class); - - /* - * State of the public SSH port. Possible values are: Disabled - Indicates - * that the public ssh port is closed on this instance. Enabled - Indicates - * that the public ssh port is open and accessible according to the - * VNet/subnet policy if applicable. - */ - @JsonProperty(value = "sshPublicAccess") - private SshPublicAccess sshPublicAccess; - - /* - * Describes the admin user name. - */ - @JsonProperty(value = "adminUserName", access = JsonProperty.Access.WRITE_ONLY) - private String adminUsername; - - /* - * Describes the port for connecting through SSH. - */ - @JsonProperty(value = "sshPort", access = JsonProperty.Access.WRITE_ONLY) - private Integer sshPort; - - /* - * Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t - * rsa -b 2048" to generate your SSH key pairs. - */ - @JsonProperty(value = "adminPublicKey") - private String adminPublicKey; - - /** - * Get the sshPublicAccess property: State of the public SSH port. Possible values are: Disabled - Indicates that - * the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and - * accessible according to the VNet/subnet policy if applicable. - * - * @return the sshPublicAccess value. - */ - public SshPublicAccess sshPublicAccess() { - return this.sshPublicAccess; - } - - /** - * Set the sshPublicAccess property: State of the public SSH port. Possible values are: Disabled - Indicates that - * the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and - * accessible according to the VNet/subnet policy if applicable. - * - * @param sshPublicAccess the sshPublicAccess value to set. - * @return the ComputeInstanceSshSettings object itself. - */ - public ComputeInstanceSshSettings withSshPublicAccess(SshPublicAccess sshPublicAccess) { - this.sshPublicAccess = sshPublicAccess; - return this; - } - - /** - * Get the adminUsername property: Describes the admin user name. - * - * @return the adminUsername value. - */ - public String adminUsername() { - return this.adminUsername; - } - - /** - * Get the sshPort property: Describes the port for connecting through SSH. - * - * @return the sshPort value. - */ - public Integer sshPort() { - return this.sshPort; - } - - /** - * Get the adminPublicKey property: Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b - * 2048" to generate your SSH key pairs. - * - * @return the adminPublicKey value. - */ - public String adminPublicKey() { - return this.adminPublicKey; - } - - /** - * Set the adminPublicKey property: Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b - * 2048" to generate your SSH key pairs. - * - * @param adminPublicKey the adminPublicKey value to set. - * @return the ComputeInstanceSshSettings object itself. - */ - public ComputeInstanceSshSettings withAdminPublicKey(String adminPublicKey) { - this.adminPublicKey = adminPublicKey; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceState.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceState.java deleted file mode 100644 index 4b2c5e63b906..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceState.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ComputeInstanceState. */ -public final class ComputeInstanceState extends ExpandableStringEnum { - /** Static value Creating for ComputeInstanceState. */ - public static final ComputeInstanceState CREATING = fromString("Creating"); - - /** Static value CreateFailed for ComputeInstanceState. */ - public static final ComputeInstanceState CREATE_FAILED = fromString("CreateFailed"); - - /** Static value Deleting for ComputeInstanceState. */ - public static final ComputeInstanceState DELETING = fromString("Deleting"); - - /** Static value Running for ComputeInstanceState. */ - public static final ComputeInstanceState RUNNING = fromString("Running"); - - /** Static value Restarting for ComputeInstanceState. */ - public static final ComputeInstanceState RESTARTING = fromString("Restarting"); - - /** Static value JobRunning for ComputeInstanceState. */ - public static final ComputeInstanceState JOB_RUNNING = fromString("JobRunning"); - - /** Static value SettingUp for ComputeInstanceState. */ - public static final ComputeInstanceState SETTING_UP = fromString("SettingUp"); - - /** Static value SetupFailed for ComputeInstanceState. */ - public static final ComputeInstanceState SETUP_FAILED = fromString("SetupFailed"); - - /** Static value Starting for ComputeInstanceState. */ - public static final ComputeInstanceState STARTING = fromString("Starting"); - - /** Static value Stopped for ComputeInstanceState. */ - public static final ComputeInstanceState STOPPED = fromString("Stopped"); - - /** Static value Stopping for ComputeInstanceState. */ - public static final ComputeInstanceState STOPPING = fromString("Stopping"); - - /** Static value UserSettingUp for ComputeInstanceState. */ - public static final ComputeInstanceState USER_SETTING_UP = fromString("UserSettingUp"); - - /** Static value UserSetupFailed for ComputeInstanceState. */ - public static final ComputeInstanceState USER_SETUP_FAILED = fromString("UserSetupFailed"); - - /** Static value Unknown for ComputeInstanceState. */ - public static final ComputeInstanceState UNKNOWN = fromString("Unknown"); - - /** Static value Unusable for ComputeInstanceState. */ - public static final ComputeInstanceState UNUSABLE = fromString("Unusable"); - - /** - * Creates or finds a ComputeInstanceState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeInstanceState. - */ - @JsonCreator - public static ComputeInstanceState fromString(String name) { - return fromString(name, ComputeInstanceState.class); - } - - /** @return known ComputeInstanceState values. */ - public static Collection values() { - return values(ComputeInstanceState.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeNodesInformation.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeNodesInformation.java deleted file mode 100644 index 5346e98561bf..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeNodesInformation.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Compute nodes information related to a Machine Learning compute. Might differ for every type of compute. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "computeType", - defaultImpl = ComputeNodesInformation.class) -@JsonTypeName("ComputeNodesInformation") -@JsonSubTypes({ @JsonSubTypes.Type(name = "AmlCompute", value = AmlComputeNodesInformation.class) }) -@Immutable -public class ComputeNodesInformation { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ComputeNodesInformation.class); - - /* - * The continuation token. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the nextLink property: The continuation token. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeResource.java deleted file mode 100644 index b6059728a8f4..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeResource.java +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeResourceInner; -import java.util.Map; - -/** An immutable client-side representation of ComputeResource. */ -public interface ComputeResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the 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 properties property: Compute properties. - * - * @return the properties value. - */ - Compute properties(); - - /** - * Gets the identity property: The identity of the resource. - * - * @return the identity value. - */ - Identity identity(); - - /** - * Gets the sku property: The sku of the workspace. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the systemData property: Read only system data. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeResourceInner object. - * - * @return the inner object. - */ - ComputeResourceInner innerModel(); - - /** The entirety of the ComputeResource definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** The ComputeResource definition stages. */ - interface DefinitionStages { - /** The first stage of the ComputeResource definition. */ - interface Blank extends WithLocation { - } - - /** The stage of the ComputeResource definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - - /** The stage of the ComputeResource definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the ComputeResource definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties, - DefinitionStages.WithIdentity, DefinitionStages.WithSku { - /** - * Executes the create request. - * - * @return the created resource. - */ - ComputeResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ComputeResource create(Context context); - } - - /** The stage of the ComputeResource definition allowing to specify 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 ComputeResource definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: Compute properties. - * - * @param properties Compute properties. - * @return the next definition stage. - */ - WithCreate withProperties(Compute properties); - } - - /** The stage of the ComputeResource definition allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: The identity of the resource.. - * - * @param identity The identity of the resource. - * @return the next definition stage. - */ - WithCreate withIdentity(Identity identity); - } - - /** The stage of the ComputeResource definition allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: The sku of the workspace.. - * - * @param sku The sku of the workspace. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - } - - /** - * Begins update for the ComputeResource resource. - * - * @return the stage of resource update. - */ - ComputeResource.Update update(); - - /** The template for ComputeResource update. */ - interface Update extends UpdateStages.WithScaleSettings { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ComputeResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ComputeResource apply(Context context); - } - - /** The ComputeResource update stages. */ - interface UpdateStages { - /** The stage of the ComputeResource update allowing to specify scaleSettings. */ - interface WithScaleSettings { - /** - * Specifies the scaleSettings property: Desired scale settings for the amlCompute.. - * - * @param scaleSettings Desired scale settings for the amlCompute. - * @return the next definition stage. - */ - Update withScaleSettings(ScaleSettings scaleSettings); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ComputeResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ComputeResource refresh(Context context); - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e. - */ - PagedIterable listNodes(); - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e. - */ - PagedIterable listNodes(Context context); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - ComputeSecrets listKeys(); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - Response listKeysWithResponse(Context context); - - /** - * Posts a start action to a compute instance. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void start(); - - /** - * Posts a start action to a compute instance. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void start(Context context); - - /** - * Posts a stop action to a compute instance. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stop(); - - /** - * Posts a stop action to a compute instance. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stop(Context context); - - /** - * Posts a restart action to a compute instance. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void restart(); - - /** - * Posts a restart action to a compute instance. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response restartWithResponse(Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeSecrets.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeSecrets.java deleted file mode 100644 index 69abfaba3e05..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeSecrets.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeSecretsInner; - -/** An immutable client-side representation of ComputeSecrets. */ -public interface ComputeSecrets { - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeSecretsInner object. - * - * @return the inner object. - */ - ComputeSecretsInner innerModel(); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeType.java deleted file mode 100644 index 455f07506ec8..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeType.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ComputeType. */ -public final class ComputeType extends ExpandableStringEnum { - /** Static value AKS for ComputeType. */ - public static final ComputeType AKS = fromString("AKS"); - - /** Static value AmlCompute for ComputeType. */ - public static final ComputeType AML_COMPUTE = fromString("AmlCompute"); - - /** Static value ComputeInstance for ComputeType. */ - public static final ComputeType COMPUTE_INSTANCE = fromString("ComputeInstance"); - - /** Static value DataFactory for ComputeType. */ - public static final ComputeType DATA_FACTORY = fromString("DataFactory"); - - /** Static value VirtualMachine for ComputeType. */ - public static final ComputeType VIRTUAL_MACHINE = fromString("VirtualMachine"); - - /** Static value HDInsight for ComputeType. */ - public static final ComputeType HDINSIGHT = fromString("HDInsight"); - - /** Static value Databricks for ComputeType. */ - public static final ComputeType DATABRICKS = fromString("Databricks"); - - /** Static value DataLakeAnalytics for ComputeType. */ - public static final ComputeType DATA_LAKE_ANALYTICS = fromString("DataLakeAnalytics"); - - /** Static value SynapseSpark for ComputeType. */ - public static final ComputeType SYNAPSE_SPARK = fromString("SynapseSpark"); - - /** - * Creates or finds a ComputeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeType. - */ - @JsonCreator - public static ComputeType fromString(String name) { - return fromString(name, ComputeType.class); - } - - /** @return known ComputeType values. */ - public static Collection values() { - return values(ComputeType.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerRegistry.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerRegistry.java deleted file mode 100644 index 18ea575d5a4c..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerRegistry.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 ContainerRegistry model. */ -@Fluent -public class ContainerRegistry { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ContainerRegistry.class); - - /* - * The address property. - */ - @JsonProperty(value = "address") - private String address; - - /* - * The username property. - */ - @JsonProperty(value = "username") - private String username; - - /* - * The password property. - */ - @JsonProperty(value = "password") - private String password; - - /** - * Get the address property: The address property. - * - * @return the address value. - */ - public String address() { - return this.address; - } - - /** - * Set the address property: The address property. - * - * @param address the address value to set. - * @return the ContainerRegistry object itself. - */ - public ContainerRegistry withAddress(String address) { - this.address = address; - return this; - } - - /** - * Get the username property: The username property. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: The username property. - * - * @param username the username value to set. - * @return the ContainerRegistry object itself. - */ - public ContainerRegistry withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: The password property. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: The password property. - * - * @param password the password value to set. - * @return the ContainerRegistry object itself. - */ - public ContainerRegistry withPassword(String password) { - this.password = password; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerRegistryResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerRegistryResponse.java deleted file mode 100644 index 21e3be4c1d1c..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerRegistryResponse.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 ContainerRegistryResponse model. */ -@Fluent -public class ContainerRegistryResponse { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ContainerRegistryResponse.class); - - /* - * The address property. - */ - @JsonProperty(value = "address") - private String address; - - /** - * Get the address property: The address property. - * - * @return the address value. - */ - public String address() { - return this.address; - } - - /** - * Set the address property: The address property. - * - * @param address the address value to set. - * @return the ContainerRegistryResponse object itself. - */ - public ContainerRegistryResponse withAddress(String address) { - this.address = address; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerResourceRequirements.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerResourceRequirements.java deleted file mode 100644 index 36fe86e56315..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerResourceRequirements.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 resource requirements for the container (cpu and memory). */ -@Fluent -public final class ContainerResourceRequirements { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ContainerResourceRequirements.class); - - /* - * The minimum amount of CPU cores to be used by the container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - */ - @JsonProperty(value = "cpu") - private Double cpu; - - /* - * The maximum amount of CPU cores allowed to be used by the container. - * More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - */ - @JsonProperty(value = "cpuLimit") - private Double cpuLimit; - - /* - * The minimum amount of memory (in GB) to be used by the container. More - * info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - */ - @JsonProperty(value = "memoryInGB") - private Double memoryInGB; - - /* - * The maximum amount of memory (in GB) allowed to be used by the - * container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - */ - @JsonProperty(value = "memoryInGBLimit") - private Double memoryInGBLimit; - - /* - * The number of GPU cores in the container. - */ - @JsonProperty(value = "gpu") - private Integer gpu; - - /* - * The number of FPGA PCIE devices exposed to the container. Must be - * multiple of 2. - */ - @JsonProperty(value = "fpga") - private Integer fpga; - - /** - * Get the cpu property: The minimum amount of CPU cores to be used by the container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * - * @return the cpu value. - */ - public Double cpu() { - return this.cpu; - } - - /** - * Set the cpu property: The minimum amount of CPU cores to be used by the container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * - * @param cpu the cpu value to set. - * @return the ContainerResourceRequirements object itself. - */ - public ContainerResourceRequirements withCpu(Double cpu) { - this.cpu = cpu; - return this; - } - - /** - * Get the cpuLimit property: The maximum amount of CPU cores allowed to be used by the container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * - * @return the cpuLimit value. - */ - public Double cpuLimit() { - return this.cpuLimit; - } - - /** - * Set the cpuLimit property: The maximum amount of CPU cores allowed to be used by the container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * - * @param cpuLimit the cpuLimit value to set. - * @return the ContainerResourceRequirements object itself. - */ - public ContainerResourceRequirements withCpuLimit(Double cpuLimit) { - this.cpuLimit = cpuLimit; - return this; - } - - /** - * Get the memoryInGB property: The minimum amount of memory (in GB) to be used by the container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * - * @return the memoryInGB value. - */ - public Double memoryInGB() { - return this.memoryInGB; - } - - /** - * Set the memoryInGB property: The minimum amount of memory (in GB) to be used by the container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * - * @param memoryInGB the memoryInGB value to set. - * @return the ContainerResourceRequirements object itself. - */ - public ContainerResourceRequirements withMemoryInGB(Double memoryInGB) { - this.memoryInGB = memoryInGB; - return this; - } - - /** - * Get the memoryInGBLimit property: The maximum amount of memory (in GB) allowed to be used by the container. More - * info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * - * @return the memoryInGBLimit value. - */ - public Double memoryInGBLimit() { - return this.memoryInGBLimit; - } - - /** - * Set the memoryInGBLimit property: The maximum amount of memory (in GB) allowed to be used by the container. More - * info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * - * @param memoryInGBLimit the memoryInGBLimit value to set. - * @return the ContainerResourceRequirements object itself. - */ - public ContainerResourceRequirements withMemoryInGBLimit(Double memoryInGBLimit) { - this.memoryInGBLimit = memoryInGBLimit; - return this; - } - - /** - * Get the gpu property: The number of GPU cores in the container. - * - * @return the gpu value. - */ - public Integer gpu() { - return this.gpu; - } - - /** - * Set the gpu property: The number of GPU cores in the container. - * - * @param gpu the gpu value to set. - * @return the ContainerResourceRequirements object itself. - */ - public ContainerResourceRequirements withGpu(Integer gpu) { - this.gpu = gpu; - return this; - } - - /** - * Get the fpga property: The number of FPGA PCIE devices exposed to the container. Must be multiple of 2. - * - * @return the fpga value. - */ - public Integer fpga() { - return this.fpga; - } - - /** - * Set the fpga property: The number of FPGA PCIE devices exposed to the container. Must be multiple of 2. - * - * @param fpga the fpga value to set. - * @return the ContainerResourceRequirements object itself. - */ - public ContainerResourceRequirements withFpga(Integer fpga) { - this.fpga = fpga; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CosmosDbSettings.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CosmosDbSettings.java deleted file mode 100644 index 95719a3ca796..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CosmosDbSettings.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 CosmosDbSettings model. */ -@Fluent -public final class CosmosDbSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(CosmosDbSettings.class); - - /* - * The throughput of the collections in cosmosdb database - */ - @JsonProperty(value = "collectionsThroughput") - private Integer collectionsThroughput; - - /** - * Get the collectionsThroughput property: The throughput of the collections in cosmosdb database. - * - * @return the collectionsThroughput value. - */ - public Integer collectionsThroughput() { - return this.collectionsThroughput; - } - - /** - * Set the collectionsThroughput property: The throughput of the collections in cosmosdb database. - * - * @param collectionsThroughput the collectionsThroughput value to set. - * @return the CosmosDbSettings object itself. - */ - public CosmosDbSettings withCollectionsThroughput(Integer collectionsThroughput) { - this.collectionsThroughput = collectionsThroughput; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateEndpointVariantRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateEndpointVariantRequest.java deleted file mode 100644 index dda4abc3dad7..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateEndpointVariantRequest.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** The Variant properties. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "computeType", - defaultImpl = CreateEndpointVariantRequest.class) -@JsonTypeName("Custom") -@JsonSubTypes({ @JsonSubTypes.Type(name = "AKS", value = AksServiceCreateRequest.class) }) -@Fluent -public class CreateEndpointVariantRequest extends CreateServiceRequest { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(CreateEndpointVariantRequest.class); - - /* - * Is this the default variant. - */ - @JsonProperty(value = "isDefault") - private Boolean isDefault; - - /* - * The amount of traffic variant receives. - */ - @JsonProperty(value = "trafficPercentile") - private Float trafficPercentile; - - /* - * The type of the variant. - */ - @JsonProperty(value = "type") - private VariantType type; - - /** - * Get the isDefault property: Is this the default variant. - * - * @return the isDefault value. - */ - public Boolean isDefault() { - return this.isDefault; - } - - /** - * Set the isDefault property: Is this the default variant. - * - * @param isDefault the isDefault value to set. - * @return the CreateEndpointVariantRequest object itself. - */ - public CreateEndpointVariantRequest withIsDefault(Boolean isDefault) { - this.isDefault = isDefault; - return this; - } - - /** - * Get the trafficPercentile property: The amount of traffic variant receives. - * - * @return the trafficPercentile value. - */ - public Float trafficPercentile() { - return this.trafficPercentile; - } - - /** - * Set the trafficPercentile property: The amount of traffic variant receives. - * - * @param trafficPercentile the trafficPercentile value to set. - * @return the CreateEndpointVariantRequest object itself. - */ - public CreateEndpointVariantRequest withTrafficPercentile(Float trafficPercentile) { - this.trafficPercentile = trafficPercentile; - return this; - } - - /** - * Get the type property: The type of the variant. - * - * @return the type value. - */ - public VariantType type() { - return this.type; - } - - /** - * Set the type property: The type of the variant. - * - * @param type the type value to set. - * @return the CreateEndpointVariantRequest object itself. - */ - public CreateEndpointVariantRequest withType(VariantType type) { - this.type = type; - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateEndpointVariantRequest withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateEndpointVariantRequest withKvTags(Map kvTags) { - super.withKvTags(kvTags); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateEndpointVariantRequest withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateEndpointVariantRequest withKeys(CreateServiceRequestKeys keys) { - super.withKeys(keys); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateEndpointVariantRequest - withEnvironmentImageRequest(CreateServiceRequestEnvironmentImageRequest environmentImageRequest) { - super.withEnvironmentImageRequest(environmentImageRequest); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateEndpointVariantRequest withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequest.java deleted file mode 100644 index 4ae55068ae28..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequest.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** The base class for creating a service. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "computeType", - defaultImpl = CreateServiceRequest.class) -@JsonTypeName("CreateServiceRequest") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "ACI", value = AciServiceCreateRequest.class), - @JsonSubTypes.Type(name = "Custom", value = CreateEndpointVariantRequest.class) }) -@Fluent -public class CreateServiceRequest { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(CreateServiceRequest.class); - - /* - * The description of the service. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The service tag dictionary. Tags are mutable. - */ - @JsonProperty(value = "kvTags") - private Map kvTags; - - /* - * The service properties dictionary. Properties are immutable. - */ - @JsonProperty(value = "properties") - private Map properties; - - /* - * The authentication keys. - */ - @JsonProperty(value = "keys") - private CreateServiceRequestKeys keys; - - /* - * The Environment, models and assets needed for inferencing. - */ - @JsonProperty(value = "environmentImageRequest") - private CreateServiceRequestEnvironmentImageRequest environmentImageRequest; - - /* - * The name of the Azure location/region. - */ - @JsonProperty(value = "location") - private String location; - - /** - * Get the description property: The description of the service. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the service. - * - * @param description the description value to set. - * @return the CreateServiceRequest object itself. - */ - public CreateServiceRequest withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the kvTags property: The service tag dictionary. Tags are mutable. - * - * @return the kvTags value. - */ - public Map kvTags() { - return this.kvTags; - } - - /** - * Set the kvTags property: The service tag dictionary. Tags are mutable. - * - * @param kvTags the kvTags value to set. - * @return the CreateServiceRequest object itself. - */ - public CreateServiceRequest withKvTags(Map kvTags) { - this.kvTags = kvTags; - return this; - } - - /** - * Get the properties property: The service properties dictionary. Properties are immutable. - * - * @return the properties value. - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties property: The service properties dictionary. Properties are immutable. - * - * @param properties the properties value to set. - * @return the CreateServiceRequest object itself. - */ - public CreateServiceRequest withProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Get the keys property: The authentication keys. - * - * @return the keys value. - */ - public CreateServiceRequestKeys keys() { - return this.keys; - } - - /** - * Set the keys property: The authentication keys. - * - * @param keys the keys value to set. - * @return the CreateServiceRequest object itself. - */ - public CreateServiceRequest withKeys(CreateServiceRequestKeys keys) { - this.keys = keys; - return this; - } - - /** - * Get the environmentImageRequest property: The Environment, models and assets needed for inferencing. - * - * @return the environmentImageRequest value. - */ - public CreateServiceRequestEnvironmentImageRequest environmentImageRequest() { - return this.environmentImageRequest; - } - - /** - * Set the environmentImageRequest property: The Environment, models and assets needed for inferencing. - * - * @param environmentImageRequest the environmentImageRequest value to set. - * @return the CreateServiceRequest object itself. - */ - public CreateServiceRequest - withEnvironmentImageRequest(CreateServiceRequestEnvironmentImageRequest environmentImageRequest) { - this.environmentImageRequest = environmentImageRequest; - return this; - } - - /** - * Get the location property: The name of the Azure location/region. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The name of the Azure location/region. - * - * @param location the location value to set. - * @return the CreateServiceRequest object itself. - */ - public CreateServiceRequest withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keys() != null) { - keys().validate(); - } - if (environmentImageRequest() != null) { - environmentImageRequest().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequestEnvironmentImageRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequestEnvironmentImageRequest.java deleted file mode 100644 index 0272fafc49c0..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequestEnvironmentImageRequest.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -/** The Environment, models and assets needed for inferencing. */ -@Immutable -public final class CreateServiceRequestEnvironmentImageRequest extends EnvironmentImageRequest { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(CreateServiceRequestEnvironmentImageRequest.class); - - /** {@inheritDoc} */ - @Override - public CreateServiceRequestEnvironmentImageRequest withDriverProgram(String driverProgram) { - super.withDriverProgram(driverProgram); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateServiceRequestEnvironmentImageRequest withAssets(List assets) { - super.withAssets(assets); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateServiceRequestEnvironmentImageRequest withModelIds(List modelIds) { - super.withModelIds(modelIds); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateServiceRequestEnvironmentImageRequest withModels(List models) { - super.withModels(models); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateServiceRequestEnvironmentImageRequest withEnvironment(EnvironmentImageRequestEnvironment environment) { - super.withEnvironment(environment); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateServiceRequestEnvironmentImageRequest - withEnvironmentReference(EnvironmentImageRequestEnvironmentReference environmentReference) { - super.withEnvironmentReference(environmentReference); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequestKeys.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequestKeys.java deleted file mode 100644 index 54e268d2b564..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequestKeys.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The authentication keys. */ -@Immutable -public final class CreateServiceRequestKeys extends AuthKeys { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(CreateServiceRequestKeys.class); - - /** {@inheritDoc} */ - @Override - public CreateServiceRequestKeys withPrimaryKey(String primaryKey) { - super.withPrimaryKey(primaryKey); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateServiceRequestKeys withSecondaryKey(String secondaryKey) { - super.withSecondaryKey(secondaryKey); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataFactory.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataFactory.java deleted file mode 100644 index 9ae89743b452..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataFactory.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A DataFactory compute. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("DataFactory") -@Immutable -public final class DataFactory extends Compute { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(DataFactory.class); - - /** {@inheritDoc} */ - @Override - public DataFactory withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataFactory withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataFactory withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataFactory withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataLakeAnalytics.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataLakeAnalytics.java deleted file mode 100644 index 687d85333c54..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataLakeAnalytics.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A DataLakeAnalytics compute. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("DataLakeAnalytics") -@Fluent -public final class DataLakeAnalytics extends Compute { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(DataLakeAnalytics.class); - - /* - * The properties property. - */ - @JsonProperty(value = "properties") - private DataLakeAnalyticsProperties properties; - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public DataLakeAnalyticsProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the DataLakeAnalytics object itself. - */ - public DataLakeAnalytics withProperties(DataLakeAnalyticsProperties properties) { - this.properties = properties; - return this; - } - - /** {@inheritDoc} */ - @Override - public DataLakeAnalytics withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataLakeAnalytics withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataLakeAnalytics withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataLakeAnalytics withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataLakeAnalyticsProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataLakeAnalyticsProperties.java deleted file mode 100644 index d2dfe7a6cbe9..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataLakeAnalyticsProperties.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 DataLakeAnalyticsProperties model. */ -@Fluent -public final class DataLakeAnalyticsProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(DataLakeAnalyticsProperties.class); - - /* - * DataLake Store Account Name - */ - @JsonProperty(value = "dataLakeStoreAccountName") - private String dataLakeStoreAccountName; - - /** - * Get the dataLakeStoreAccountName property: DataLake Store Account Name. - * - * @return the dataLakeStoreAccountName value. - */ - public String dataLakeStoreAccountName() { - return this.dataLakeStoreAccountName; - } - - /** - * Set the dataLakeStoreAccountName property: DataLake Store Account Name. - * - * @param dataLakeStoreAccountName the dataLakeStoreAccountName value to set. - * @return the DataLakeAnalyticsProperties object itself. - */ - public DataLakeAnalyticsProperties withDataLakeStoreAccountName(String dataLakeStoreAccountName) { - this.dataLakeStoreAccountName = dataLakeStoreAccountName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Databricks.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Databricks.java deleted file mode 100644 index 6119c3f47ece..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Databricks.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A DataFactory compute. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("Databricks") -@Fluent -public final class Databricks extends Compute { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(Databricks.class); - - /* - * The properties property. - */ - @JsonProperty(value = "properties") - private DatabricksProperties properties; - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public DatabricksProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the Databricks object itself. - */ - public Databricks withProperties(DatabricksProperties properties) { - this.properties = properties; - return this; - } - - /** {@inheritDoc} */ - @Override - public Databricks withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public Databricks withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public Databricks withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public Databricks withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatabricksComputeSecrets.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatabricksComputeSecrets.java deleted file mode 100644 index 079123a183fa..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatabricksComputeSecrets.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeSecretsInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Secrets related to a Machine Learning compute based on Databricks. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("Databricks") -@Fluent -public final class DatabricksComputeSecrets extends ComputeSecretsInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(DatabricksComputeSecrets.class); - - /* - * access token for databricks account. - */ - @JsonProperty(value = "databricksAccessToken") - private String databricksAccessToken; - - /** - * Get the databricksAccessToken property: access token for databricks account. - * - * @return the databricksAccessToken value. - */ - public String databricksAccessToken() { - return this.databricksAccessToken; - } - - /** - * Set the databricksAccessToken property: access token for databricks account. - * - * @param databricksAccessToken the databricksAccessToken value to set. - * @return the DatabricksComputeSecrets object itself. - */ - public DatabricksComputeSecrets withDatabricksAccessToken(String databricksAccessToken) { - this.databricksAccessToken = databricksAccessToken; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatabricksProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatabricksProperties.java deleted file mode 100644 index f6b198e1e2de..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatabricksProperties.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 DatabricksProperties model. */ -@Fluent -public final class DatabricksProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(DatabricksProperties.class); - - /* - * Databricks access token - */ - @JsonProperty(value = "databricksAccessToken") - private String databricksAccessToken; - - /* - * Workspace Url - */ - @JsonProperty(value = "workspaceUrl") - private String workspaceUrl; - - /** - * Get the databricksAccessToken property: Databricks access token. - * - * @return the databricksAccessToken value. - */ - public String databricksAccessToken() { - return this.databricksAccessToken; - } - - /** - * Set the databricksAccessToken property: Databricks access token. - * - * @param databricksAccessToken the databricksAccessToken value to set. - * @return the DatabricksProperties object itself. - */ - public DatabricksProperties withDatabricksAccessToken(String databricksAccessToken) { - this.databricksAccessToken = databricksAccessToken; - return this; - } - - /** - * Get the workspaceUrl property: Workspace Url. - * - * @return the workspaceUrl value. - */ - public String workspaceUrl() { - return this.workspaceUrl; - } - - /** - * Set the workspaceUrl property: Workspace Url. - * - * @param workspaceUrl the workspaceUrl value to set. - * @return the DatabricksProperties object itself. - */ - public DatabricksProperties withWorkspaceUrl(String workspaceUrl) { - this.workspaceUrl = workspaceUrl; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatasetReference.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatasetReference.java deleted file mode 100644 index e812894ccc43..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatasetReference.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 dataset reference object. */ -@Fluent -public final class DatasetReference { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(DatasetReference.class); - - /* - * The name of the dataset reference. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The id of the dataset reference. - */ - @JsonProperty(value = "id") - private String id; - - /** - * Get the name property: The name of the dataset reference. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the dataset reference. - * - * @param name the name value to set. - * @return the DatasetReference object itself. - */ - public DatasetReference withName(String name) { - this.name = name; - return this; - } - - /** - * Get the id property: The id of the dataset reference. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The id of the dataset reference. - * - * @param id the id value to set. - * @return the DatasetReference object itself. - */ - public DatasetReference withId(String id) { - this.id = id; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentType.java deleted file mode 100644 index 13d771f61284..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentType.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DeploymentType. */ -public final class DeploymentType extends ExpandableStringEnum { - /** Static value GRPCRealtimeEndpoint for DeploymentType. */ - public static final DeploymentType GRPCREALTIME_ENDPOINT = fromString("GRPCRealtimeEndpoint"); - - /** Static value HttpRealtimeEndpoint for DeploymentType. */ - public static final DeploymentType HTTP_REALTIME_ENDPOINT = fromString("HttpRealtimeEndpoint"); - - /** Static value Batch for DeploymentType. */ - public static final DeploymentType BATCH = fromString("Batch"); - - /** - * Creates or finds a DeploymentType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeploymentType. - */ - @JsonCreator - public static DeploymentType fromString(String name) { - return fromString(name, DeploymentType.class); - } - - /** @return known DeploymentType values. */ - public static Collection values() { - return values(DeploymentType.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EncryptionProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EncryptionProperties.java deleted file mode 100644 index 0c4946941f3f..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EncryptionProperties.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 EncryptionProperties model. */ -@Fluent -public class EncryptionProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(EncryptionProperties.class); - - /* - * vault base Url - */ - @JsonProperty(value = "vaultBaseUrl", required = true) - private String vaultBaseUrl; - - /* - * Encryption Key name - */ - @JsonProperty(value = "keyName", required = true) - private String keyName; - - /* - * Encryption Key Version - */ - @JsonProperty(value = "keyVersion", required = true) - private String keyVersion; - - /** - * Get the vaultBaseUrl property: vault base Url. - * - * @return the vaultBaseUrl value. - */ - public String vaultBaseUrl() { - return this.vaultBaseUrl; - } - - /** - * Set the vaultBaseUrl property: vault base Url. - * - * @param vaultBaseUrl the vaultBaseUrl value to set. - * @return the EncryptionProperties object itself. - */ - public EncryptionProperties withVaultBaseUrl(String vaultBaseUrl) { - this.vaultBaseUrl = vaultBaseUrl; - return this; - } - - /** - * Get the keyName property: Encryption Key name. - * - * @return the keyName value. - */ - public String keyName() { - return this.keyName; - } - - /** - * Set the keyName property: Encryption Key name. - * - * @param keyName the keyName value to set. - * @return the EncryptionProperties object itself. - */ - public EncryptionProperties withKeyName(String keyName) { - this.keyName = keyName; - return this; - } - - /** - * Get the keyVersion property: Encryption Key Version. - * - * @return the keyVersion value. - */ - public String keyVersion() { - return this.keyVersion; - } - - /** - * Set the keyVersion property: Encryption Key Version. - * - * @param keyVersion the keyVersion value to set. - * @return the EncryptionProperties object itself. - */ - public EncryptionProperties withKeyVersion(String keyVersion) { - this.keyVersion = keyVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (vaultBaseUrl() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property vaultBaseUrl in model EncryptionProperties")); - } - if (keyName() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property keyName in model EncryptionProperties")); - } - if (keyVersion() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property keyVersion in model EncryptionProperties")); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EncryptionProperty.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EncryptionProperty.java deleted file mode 100644 index 644c3a87d46f..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EncryptionProperty.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 EncryptionProperty model. */ -@Fluent -public final class EncryptionProperty { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(EncryptionProperty.class); - - /* - * Indicates whether or not the encryption is enabled for the workspace. - */ - @JsonProperty(value = "status", required = true) - private EncryptionStatus status; - - /* - * The identity that will be used to access the key vault for encryption at - * rest. - */ - @JsonProperty(value = "identity") - private IdentityForCmk identity; - - /* - * Customer Key vault properties. - */ - @JsonProperty(value = "keyVaultProperties", required = true) - private KeyVaultProperties keyVaultProperties; - - /** - * Get the status property: Indicates whether or not the encryption is enabled for the workspace. - * - * @return the status value. - */ - public EncryptionStatus status() { - return this.status; - } - - /** - * Set the status property: Indicates whether or not the encryption is enabled for the workspace. - * - * @param status the status value to set. - * @return the EncryptionProperty object itself. - */ - public EncryptionProperty withStatus(EncryptionStatus status) { - this.status = status; - return this; - } - - /** - * Get the identity property: The identity that will be used to access the key vault for encryption at rest. - * - * @return the identity value. - */ - public IdentityForCmk identity() { - return this.identity; - } - - /** - * Set the identity property: The identity that will be used to access the key vault for encryption at rest. - * - * @param identity the identity value to set. - * @return the EncryptionProperty object itself. - */ - public EncryptionProperty withIdentity(IdentityForCmk identity) { - this.identity = identity; - return this; - } - - /** - * Get the keyVaultProperties property: Customer Key vault properties. - * - * @return the keyVaultProperties value. - */ - public KeyVaultProperties keyVaultProperties() { - return this.keyVaultProperties; - } - - /** - * Set the keyVaultProperties property: Customer Key vault properties. - * - * @param keyVaultProperties the keyVaultProperties value to set. - * @return the EncryptionProperty object itself. - */ - public EncryptionProperty withKeyVaultProperties(KeyVaultProperties keyVaultProperties) { - this.keyVaultProperties = keyVaultProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (status() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property status in model EncryptionProperty")); - } - if (identity() != null) { - identity().validate(); - } - if (keyVaultProperties() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property keyVaultProperties in model EncryptionProperty")); - } else { - keyVaultProperties().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EncryptionStatus.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EncryptionStatus.java deleted file mode 100644 index 2642e3553b71..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EncryptionStatus.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EncryptionStatus. */ -public final class EncryptionStatus extends ExpandableStringEnum { - /** Static value Enabled for EncryptionStatus. */ - public static final EncryptionStatus ENABLED = fromString("Enabled"); - - /** Static value Disabled for EncryptionStatus. */ - public static final EncryptionStatus DISABLED = fromString("Disabled"); - - /** - * Creates or finds a EncryptionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding EncryptionStatus. - */ - @JsonCreator - public static EncryptionStatus fromString(String name) { - return fromString(name, EncryptionStatus.class); - } - - /** @return known EncryptionStatus values. */ - public static Collection values() { - return values(EncryptionStatus.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequest.java deleted file mode 100644 index 3e188ff460b4..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequest.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Request to create a Docker image based on Environment. */ -@Fluent -public class EnvironmentImageRequest { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(EnvironmentImageRequest.class); - - /* - * The name of the driver file. - */ - @JsonProperty(value = "driverProgram") - private String driverProgram; - - /* - * The list of assets. - */ - @JsonProperty(value = "assets") - private List assets; - - /* - * The list of model Ids. - */ - @JsonProperty(value = "modelIds") - private List modelIds; - - /* - * The list of models. - */ - @JsonProperty(value = "models") - private List models; - - /* - * The details of the AZURE ML environment. - */ - @JsonProperty(value = "environment") - private EnvironmentImageRequestEnvironment environment; - - /* - * The unique identifying details of the AZURE ML environment. - */ - @JsonProperty(value = "environmentReference") - private EnvironmentImageRequestEnvironmentReference environmentReference; - - /** - * Get the driverProgram property: The name of the driver file. - * - * @return the driverProgram value. - */ - public String driverProgram() { - return this.driverProgram; - } - - /** - * Set the driverProgram property: The name of the driver file. - * - * @param driverProgram the driverProgram value to set. - * @return the EnvironmentImageRequest object itself. - */ - public EnvironmentImageRequest withDriverProgram(String driverProgram) { - this.driverProgram = driverProgram; - return this; - } - - /** - * Get the assets property: The list of assets. - * - * @return the assets value. - */ - public List assets() { - return this.assets; - } - - /** - * Set the assets property: The list of assets. - * - * @param assets the assets value to set. - * @return the EnvironmentImageRequest object itself. - */ - public EnvironmentImageRequest withAssets(List assets) { - this.assets = assets; - return this; - } - - /** - * Get the modelIds property: The list of model Ids. - * - * @return the modelIds value. - */ - public List modelIds() { - return this.modelIds; - } - - /** - * Set the modelIds property: The list of model Ids. - * - * @param modelIds the modelIds value to set. - * @return the EnvironmentImageRequest object itself. - */ - public EnvironmentImageRequest withModelIds(List modelIds) { - this.modelIds = modelIds; - return this; - } - - /** - * Get the models property: The list of models. - * - * @return the models value. - */ - public List models() { - return this.models; - } - - /** - * Set the models property: The list of models. - * - * @param models the models value to set. - * @return the EnvironmentImageRequest object itself. - */ - public EnvironmentImageRequest withModels(List models) { - this.models = models; - return this; - } - - /** - * Get the environment property: The details of the AZURE ML environment. - * - * @return the environment value. - */ - public EnvironmentImageRequestEnvironment environment() { - return this.environment; - } - - /** - * Set the environment property: The details of the AZURE ML environment. - * - * @param environment the environment value to set. - * @return the EnvironmentImageRequest object itself. - */ - public EnvironmentImageRequest withEnvironment(EnvironmentImageRequestEnvironment environment) { - this.environment = environment; - return this; - } - - /** - * Get the environmentReference property: The unique identifying details of the AZURE ML environment. - * - * @return the environmentReference value. - */ - public EnvironmentImageRequestEnvironmentReference environmentReference() { - return this.environmentReference; - } - - /** - * Set the environmentReference property: The unique identifying details of the AZURE ML environment. - * - * @param environmentReference the environmentReference value to set. - * @return the EnvironmentImageRequest object itself. - */ - public EnvironmentImageRequest - withEnvironmentReference(EnvironmentImageRequestEnvironmentReference environmentReference) { - this.environmentReference = environmentReference; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (assets() != null) { - assets().forEach(e -> e.validate()); - } - if (models() != null) { - models().forEach(e -> e.validate()); - } - if (environment() != null) { - environment().validate(); - } - if (environmentReference() != null) { - environmentReference().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequestEnvironment.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequestEnvironment.java deleted file mode 100644 index da008688c150..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequestEnvironment.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.Map; - -/** The details of the AZURE ML environment. */ -@Immutable -public final class EnvironmentImageRequestEnvironment extends ModelEnvironmentDefinition { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(EnvironmentImageRequestEnvironment.class); - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironment withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironment withVersion(String version) { - super.withVersion(version); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironment withPython(ModelEnvironmentDefinitionPython python) { - super.withPython(python); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironment withEnvironmentVariables(Map environmentVariables) { - super.withEnvironmentVariables(environmentVariables); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironment withDocker(ModelEnvironmentDefinitionDocker docker) { - super.withDocker(docker); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironment withSpark(ModelEnvironmentDefinitionSpark spark) { - super.withSpark(spark); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironment withR(ModelEnvironmentDefinitionR r) { - super.withR(r); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironment withInferencingStackVersion(String inferencingStackVersion) { - super.withInferencingStackVersion(inferencingStackVersion); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequestEnvironmentReference.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequestEnvironmentReference.java deleted file mode 100644 index d85a31f59b30..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequestEnvironmentReference.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The unique identifying details of the AZURE ML environment. */ -@Immutable -public final class EnvironmentImageRequestEnvironmentReference extends EnvironmentReference { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(EnvironmentImageRequestEnvironmentReference.class); - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironmentReference withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironmentReference withVersion(String version) { - super.withVersion(version); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponse.java deleted file mode 100644 index f77ae53523ec..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponse.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Request to create a Docker image based on Environment. */ -@Fluent -public class EnvironmentImageResponse { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(EnvironmentImageResponse.class); - - /* - * The name of the driver file. - */ - @JsonProperty(value = "driverProgram") - private String driverProgram; - - /* - * The list of assets. - */ - @JsonProperty(value = "assets") - private List assets; - - /* - * The list of model Ids. - */ - @JsonProperty(value = "modelIds") - private List modelIds; - - /* - * The list of models. - */ - @JsonProperty(value = "models") - private List models; - - /* - * The details of the AZURE ML environment. - */ - @JsonProperty(value = "environment") - private EnvironmentImageResponseEnvironment environment; - - /* - * The unique identifying details of the AZURE ML environment. - */ - @JsonProperty(value = "environmentReference") - private EnvironmentImageResponseEnvironmentReference environmentReference; - - /** - * Get the driverProgram property: The name of the driver file. - * - * @return the driverProgram value. - */ - public String driverProgram() { - return this.driverProgram; - } - - /** - * Set the driverProgram property: The name of the driver file. - * - * @param driverProgram the driverProgram value to set. - * @return the EnvironmentImageResponse object itself. - */ - public EnvironmentImageResponse withDriverProgram(String driverProgram) { - this.driverProgram = driverProgram; - return this; - } - - /** - * Get the assets property: The list of assets. - * - * @return the assets value. - */ - public List assets() { - return this.assets; - } - - /** - * Set the assets property: The list of assets. - * - * @param assets the assets value to set. - * @return the EnvironmentImageResponse object itself. - */ - public EnvironmentImageResponse withAssets(List assets) { - this.assets = assets; - return this; - } - - /** - * Get the modelIds property: The list of model Ids. - * - * @return the modelIds value. - */ - public List modelIds() { - return this.modelIds; - } - - /** - * Set the modelIds property: The list of model Ids. - * - * @param modelIds the modelIds value to set. - * @return the EnvironmentImageResponse object itself. - */ - public EnvironmentImageResponse withModelIds(List modelIds) { - this.modelIds = modelIds; - return this; - } - - /** - * Get the models property: The list of models. - * - * @return the models value. - */ - public List models() { - return this.models; - } - - /** - * Set the models property: The list of models. - * - * @param models the models value to set. - * @return the EnvironmentImageResponse object itself. - */ - public EnvironmentImageResponse withModels(List models) { - this.models = models; - return this; - } - - /** - * Get the environment property: The details of the AZURE ML environment. - * - * @return the environment value. - */ - public EnvironmentImageResponseEnvironment environment() { - return this.environment; - } - - /** - * Set the environment property: The details of the AZURE ML environment. - * - * @param environment the environment value to set. - * @return the EnvironmentImageResponse object itself. - */ - public EnvironmentImageResponse withEnvironment(EnvironmentImageResponseEnvironment environment) { - this.environment = environment; - return this; - } - - /** - * Get the environmentReference property: The unique identifying details of the AZURE ML environment. - * - * @return the environmentReference value. - */ - public EnvironmentImageResponseEnvironmentReference environmentReference() { - return this.environmentReference; - } - - /** - * Set the environmentReference property: The unique identifying details of the AZURE ML environment. - * - * @param environmentReference the environmentReference value to set. - * @return the EnvironmentImageResponse object itself. - */ - public EnvironmentImageResponse - withEnvironmentReference(EnvironmentImageResponseEnvironmentReference environmentReference) { - this.environmentReference = environmentReference; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (assets() != null) { - assets().forEach(e -> e.validate()); - } - if (models() != null) { - models().forEach(e -> e.validate()); - } - if (environment() != null) { - environment().validate(); - } - if (environmentReference() != null) { - environmentReference().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponseEnvironment.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponseEnvironment.java deleted file mode 100644 index 0577533597cf..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponseEnvironment.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.Map; - -/** The details of the AZURE ML environment. */ -@Immutable -public final class EnvironmentImageResponseEnvironment extends ModelEnvironmentDefinitionResponse { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(EnvironmentImageResponseEnvironment.class); - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironment withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironment withVersion(String version) { - super.withVersion(version); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironment withPython(ModelEnvironmentDefinitionResponsePython python) { - super.withPython(python); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironment withEnvironmentVariables(Map environmentVariables) { - super.withEnvironmentVariables(environmentVariables); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironment withDocker(ModelEnvironmentDefinitionResponseDocker docker) { - super.withDocker(docker); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironment withSpark(ModelEnvironmentDefinitionResponseSpark spark) { - super.withSpark(spark); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironment withR(ModelEnvironmentDefinitionResponseR r) { - super.withR(r); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironment withInferencingStackVersion(String inferencingStackVersion) { - super.withInferencingStackVersion(inferencingStackVersion); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponseEnvironmentReference.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponseEnvironmentReference.java deleted file mode 100644 index 44e3884772b4..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponseEnvironmentReference.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The unique identifying details of the AZURE ML environment. */ -@Immutable -public final class EnvironmentImageResponseEnvironmentReference extends EnvironmentReference { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(EnvironmentImageResponseEnvironmentReference.class); - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironmentReference withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironmentReference withVersion(String version) { - super.withVersion(version); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentReference.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentReference.java deleted file mode 100644 index 0fb42ed989a9..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentReference.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 EnvironmentReference model. */ -@Fluent -public class EnvironmentReference { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(EnvironmentReference.class); - - /* - * Name of the environment. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Version of the environment. - */ - @JsonProperty(value = "version") - private String version; - - /** - * Get the name property: Name of the environment. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the environment. - * - * @param name the name value to set. - * @return the EnvironmentReference object itself. - */ - public EnvironmentReference withName(String name) { - this.name = name; - return this; - } - - /** - * Get the version property: Version of the environment. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Version of the environment. - * - * @param version the version value to set. - * @return the EnvironmentReference object itself. - */ - public EnvironmentReference withVersion(String version) { - this.version = version; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EstimatedVMPrice.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EstimatedVMPrice.java deleted file mode 100644 index 6cf5cdac6155..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EstimatedVMPrice.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 estimated price info for using a VM of a particular OS type, tier, etc. */ -@Fluent -public final class EstimatedVMPrice { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(EstimatedVMPrice.class); - - /* - * The price charged for using the VM. - */ - @JsonProperty(value = "retailPrice", required = true) - private double retailPrice; - - /* - * Operating system type used by the VM. - */ - @JsonProperty(value = "osType", required = true) - private VMPriceOSType osType; - - /* - * The type of the VM. - */ - @JsonProperty(value = "vmTier", required = true) - private VMTier vmTier; - - /** - * Get the retailPrice property: The price charged for using the VM. - * - * @return the retailPrice value. - */ - public double retailPrice() { - return this.retailPrice; - } - - /** - * Set the retailPrice property: The price charged for using the VM. - * - * @param retailPrice the retailPrice value to set. - * @return the EstimatedVMPrice object itself. - */ - public EstimatedVMPrice withRetailPrice(double retailPrice) { - this.retailPrice = retailPrice; - return this; - } - - /** - * Get the osType property: Operating system type used by the VM. - * - * @return the osType value. - */ - public VMPriceOSType osType() { - return this.osType; - } - - /** - * Set the osType property: Operating system type used by the VM. - * - * @param osType the osType value to set. - * @return the EstimatedVMPrice object itself. - */ - public EstimatedVMPrice withOsType(VMPriceOSType osType) { - this.osType = osType; - return this; - } - - /** - * Get the vmTier property: The type of the VM. - * - * @return the vmTier value. - */ - public VMTier vmTier() { - return this.vmTier; - } - - /** - * Set the vmTier property: The type of the VM. - * - * @param vmTier the vmTier value to set. - * @return the EstimatedVMPrice object itself. - */ - public EstimatedVMPrice withVmTier(VMTier vmTier) { - this.vmTier = vmTier; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (osType() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property osType in model EstimatedVMPrice")); - } - if (vmTier() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property vmTier in model EstimatedVMPrice")); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EstimatedVMPrices.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EstimatedVMPrices.java deleted file mode 100644 index 9358775e661f..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EstimatedVMPrices.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** The estimated price info for using a VM. */ -@Fluent -public final class EstimatedVMPrices { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(EstimatedVMPrices.class); - - /* - * Three lettered code specifying the currency of the VM price. Example: - * USD - */ - @JsonProperty(value = "billingCurrency", required = true) - private BillingCurrency billingCurrency; - - /* - * The unit of time measurement for the specified VM price. Example: - * OneHour - */ - @JsonProperty(value = "unitOfMeasure", required = true) - private UnitOfMeasure unitOfMeasure; - - /* - * The list of estimated prices for using a VM of a particular OS type, - * tier, etc. - */ - @JsonProperty(value = "values", required = true) - private List values; - - /** - * Get the billingCurrency property: Three lettered code specifying the currency of the VM price. Example: USD. - * - * @return the billingCurrency value. - */ - public BillingCurrency billingCurrency() { - return this.billingCurrency; - } - - /** - * Set the billingCurrency property: Three lettered code specifying the currency of the VM price. Example: USD. - * - * @param billingCurrency the billingCurrency value to set. - * @return the EstimatedVMPrices object itself. - */ - public EstimatedVMPrices withBillingCurrency(BillingCurrency billingCurrency) { - this.billingCurrency = billingCurrency; - return this; - } - - /** - * Get the unitOfMeasure property: The unit of time measurement for the specified VM price. Example: OneHour. - * - * @return the unitOfMeasure value. - */ - public UnitOfMeasure unitOfMeasure() { - return this.unitOfMeasure; - } - - /** - * Set the unitOfMeasure property: The unit of time measurement for the specified VM price. Example: OneHour. - * - * @param unitOfMeasure the unitOfMeasure value to set. - * @return the EstimatedVMPrices object itself. - */ - public EstimatedVMPrices withUnitOfMeasure(UnitOfMeasure unitOfMeasure) { - this.unitOfMeasure = unitOfMeasure; - return this; - } - - /** - * Get the values property: The list of estimated prices for using a VM of a particular OS type, tier, etc. - * - * @return the values value. - */ - public List values() { - return this.values; - } - - /** - * Set the values property: The list of estimated prices for using a VM of a particular OS type, tier, etc. - * - * @param values the values value to set. - * @return the EstimatedVMPrices object itself. - */ - public EstimatedVMPrices withValues(List values) { - this.values = values; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (billingCurrency() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property billingCurrency in model EstimatedVMPrices")); - } - if (unitOfMeasure() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property unitOfMeasure in model EstimatedVMPrices")); - } - if (values() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property values in model EstimatedVMPrices")); - } else { - values().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/HDInsight.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/HDInsight.java deleted file mode 100644 index 1dd7081485c2..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/HDInsight.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A HDInsight compute. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("HDInsight") -@Fluent -public final class HDInsight extends Compute { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(HDInsight.class); - - /* - * The properties property. - */ - @JsonProperty(value = "properties") - private HDInsightProperties properties; - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public HDInsightProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the HDInsight object itself. - */ - public HDInsight withProperties(HDInsightProperties properties) { - this.properties = properties; - return this; - } - - /** {@inheritDoc} */ - @Override - public HDInsight withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public HDInsight withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public HDInsight withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public HDInsight withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/HDInsightProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/HDInsightProperties.java deleted file mode 100644 index 25ec2eefaba2..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/HDInsightProperties.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 HDInsightProperties model. */ -@Fluent -public final class HDInsightProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(HDInsightProperties.class); - - /* - * Port open for ssh connections on the master node of the cluster. - */ - @JsonProperty(value = "sshPort") - private Integer sshPort; - - /* - * Public IP address of the master node of the cluster. - */ - @JsonProperty(value = "address") - private String address; - - /* - * Admin credentials for master node of the cluster - */ - @JsonProperty(value = "administratorAccount") - private VirtualMachineSshCredentials administratorAccount; - - /** - * Get the sshPort property: Port open for ssh connections on the master node of the cluster. - * - * @return the sshPort value. - */ - public Integer sshPort() { - return this.sshPort; - } - - /** - * Set the sshPort property: Port open for ssh connections on the master node of the cluster. - * - * @param sshPort the sshPort value to set. - * @return the HDInsightProperties object itself. - */ - public HDInsightProperties withSshPort(Integer sshPort) { - this.sshPort = sshPort; - return this; - } - - /** - * Get the address property: Public IP address of the master node of the cluster. - * - * @return the address value. - */ - public String address() { - return this.address; - } - - /** - * Set the address property: Public IP address of the master node of the cluster. - * - * @param address the address value to set. - * @return the HDInsightProperties object itself. - */ - public HDInsightProperties withAddress(String address) { - this.address = address; - return this; - } - - /** - * Get the administratorAccount property: Admin credentials for master node of the cluster. - * - * @return the administratorAccount value. - */ - public VirtualMachineSshCredentials administratorAccount() { - return this.administratorAccount; - } - - /** - * Set the administratorAccount property: Admin credentials for master node of the cluster. - * - * @param administratorAccount the administratorAccount value to set. - * @return the HDInsightProperties object itself. - */ - public HDInsightProperties withAdministratorAccount(VirtualMachineSshCredentials administratorAccount) { - this.administratorAccount = administratorAccount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administratorAccount() != null) { - administratorAccount().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Identity.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Identity.java deleted file mode 100644 index f5015a2a3b52..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Identity.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.Map; - -/** Identity for the resource. */ -@Fluent -public class Identity { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(Identity.class); - - /* - * The principal ID of resource identity. - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private String principalId; - - /* - * The tenant ID of resource. - */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /* - * The identity type. - */ - @JsonProperty(value = "type") - private ResourceIdentityType type; - - /* - * The user assigned identities associated with the resource. - */ - @JsonProperty(value = "userAssignedIdentities") - private Map userAssignedIdentities; - - /** - * Get the principalId property: The principal ID of resource identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of resource. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the type property: The identity type. - * - * @return the type value. - */ - public ResourceIdentityType type() { - return this.type; - } - - /** - * Set the type property: The identity type. - * - * @param type the type value to set. - * @return the Identity object itself. - */ - public Identity withType(ResourceIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: The user assigned identities associated with the resource. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The user assigned identities associated with the resource. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the Identity object itself. - */ - public Identity withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userAssignedIdentities() != null) { - userAssignedIdentities().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/IdentityForCmk.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/IdentityForCmk.java deleted file mode 100644 index 0e913c75f697..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/IdentityForCmk.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Identity that will be used to access key vault for encryption at rest. */ -@Fluent -public final class IdentityForCmk { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(IdentityForCmk.class); - - /* - * The ArmId of the user assigned identity that will be used to access the - * customer managed key vault - */ - @JsonProperty(value = "userAssignedIdentity") - private String userAssignedIdentity; - - /** - * Get the userAssignedIdentity property: The ArmId of the user assigned identity that will be used to access the - * customer managed key vault. - * - * @return the userAssignedIdentity value. - */ - public String userAssignedIdentity() { - return this.userAssignedIdentity; - } - - /** - * Set the userAssignedIdentity property: The ArmId of the user assigned identity that will be used to access the - * customer managed key vault. - * - * @param userAssignedIdentity the userAssignedIdentity value to set. - * @return the IdentityForCmk object itself. - */ - public IdentityForCmk withUserAssignedIdentity(String userAssignedIdentity) { - this.userAssignedIdentity = userAssignedIdentity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ImageAsset.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ImageAsset.java deleted file mode 100644 index 8f77ab0876ba..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ImageAsset.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** An Image asset. */ -@Fluent -public final class ImageAsset { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ImageAsset.class); - - /* - * The Asset Id. - */ - @JsonProperty(value = "id") - private String id; - - /* - * The mime type. - */ - @JsonProperty(value = "mimeType") - private String mimeType; - - /* - * The Url of the Asset. - */ - @JsonProperty(value = "url") - private String url; - - /* - * Whether the Asset is unpacked. - */ - @JsonProperty(value = "unpack") - private Boolean unpack; - - /** - * Get the id property: The Asset Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The Asset Id. - * - * @param id the id value to set. - * @return the ImageAsset object itself. - */ - public ImageAsset withId(String id) { - this.id = id; - return this; - } - - /** - * Get the mimeType property: The mime type. - * - * @return the mimeType value. - */ - public String mimeType() { - return this.mimeType; - } - - /** - * Set the mimeType property: The mime type. - * - * @param mimeType the mimeType value to set. - * @return the ImageAsset object itself. - */ - public ImageAsset withMimeType(String mimeType) { - this.mimeType = mimeType; - return this; - } - - /** - * Get the url property: The Url of the Asset. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: The Url of the Asset. - * - * @param url the url value to set. - * @return the ImageAsset object itself. - */ - public ImageAsset withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the unpack property: Whether the Asset is unpacked. - * - * @return the unpack value. - */ - public Boolean unpack() { - return this.unpack; - } - - /** - * Set the unpack property: Whether the Asset is unpacked. - * - * @param unpack the unpack value to set. - * @return the ImageAsset object itself. - */ - public ImageAsset withUnpack(Boolean unpack) { - this.unpack = unpack; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/KeyVaultProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/KeyVaultProperties.java deleted file mode 100644 index 00160bd259b0..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/KeyVaultProperties.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 KeyVaultProperties model. */ -@Fluent -public final class KeyVaultProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(KeyVaultProperties.class); - - /* - * The ArmId of the keyVault where the customer owned encryption key is - * present. - */ - @JsonProperty(value = "keyVaultArmId", required = true) - private String keyVaultArmId; - - /* - * Key vault uri to access the encryption key. - */ - @JsonProperty(value = "keyIdentifier", required = true) - private String keyIdentifier; - - /* - * For future use - The client id of the identity which will be used to - * access key vault. - */ - @JsonProperty(value = "identityClientId") - private String identityClientId; - - /** - * Get the keyVaultArmId property: The ArmId of the keyVault where the customer owned encryption key is present. - * - * @return the keyVaultArmId value. - */ - public String keyVaultArmId() { - return this.keyVaultArmId; - } - - /** - * Set the keyVaultArmId property: The ArmId of the keyVault where the customer owned encryption key is present. - * - * @param keyVaultArmId the keyVaultArmId value to set. - * @return the KeyVaultProperties object itself. - */ - public KeyVaultProperties withKeyVaultArmId(String keyVaultArmId) { - this.keyVaultArmId = keyVaultArmId; - return this; - } - - /** - * Get the keyIdentifier property: Key vault uri to access the encryption key. - * - * @return the keyIdentifier value. - */ - public String keyIdentifier() { - return this.keyIdentifier; - } - - /** - * Set the keyIdentifier property: Key vault uri to access the encryption key. - * - * @param keyIdentifier the keyIdentifier value to set. - * @return the KeyVaultProperties object itself. - */ - public KeyVaultProperties withKeyIdentifier(String keyIdentifier) { - this.keyIdentifier = keyIdentifier; - return this; - } - - /** - * Get the identityClientId property: For future use - The client id of the identity which will be used to access - * key vault. - * - * @return the identityClientId value. - */ - public String identityClientId() { - return this.identityClientId; - } - - /** - * Set the identityClientId property: For future use - The client id of the identity which will be used to access - * key vault. - * - * @param identityClientId the identityClientId value to set. - * @return the KeyVaultProperties object itself. - */ - public KeyVaultProperties withIdentityClientId(String identityClientId) { - this.identityClientId = identityClientId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyVaultArmId() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property keyVaultArmId in model KeyVaultProperties")); - } - if (keyIdentifier() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property keyIdentifier in model KeyVaultProperties")); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListAmlUserFeatureResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListAmlUserFeatureResult.java deleted file mode 100644 index 1083c2049849..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListAmlUserFeatureResult.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.models.AmlUserFeatureInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The List Aml user feature operation response. */ -@Immutable -public final class ListAmlUserFeatureResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ListAmlUserFeatureResult.class); - - /* - * The list of AML user facing features. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The URI to fetch the next page of AML user features information. Call - * ListNext() with this to fetch the next page of AML user features - * information. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: The list of AML user facing features. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI to fetch the next page of AML user features information. Call ListNext() with - * this to fetch the next page of AML user features information. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListNotebookKeysResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListNotebookKeysResult.java deleted file mode 100644 index bac630965f84..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListNotebookKeysResult.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListNotebookKeysResultInner; - -/** An immutable client-side representation of ListNotebookKeysResult. */ -public interface ListNotebookKeysResult { - /** - * Gets the primaryAccessKey property: The primaryAccessKey property. - * - * @return the primaryAccessKey value. - */ - String primaryAccessKey(); - - /** - * Gets the secondaryAccessKey property: The secondaryAccessKey property. - * - * @return the secondaryAccessKey value. - */ - String secondaryAccessKey(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.ListNotebookKeysResultInner - * object. - * - * @return the inner object. - */ - ListNotebookKeysResultInner innerModel(); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListStorageAccountKeysResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListStorageAccountKeysResult.java deleted file mode 100644 index 15d7e9cf85ec..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListStorageAccountKeysResult.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListStorageAccountKeysResultInner; - -/** An immutable client-side representation of ListStorageAccountKeysResult. */ -public interface ListStorageAccountKeysResult { - /** - * Gets the userStorageKey property: The userStorageKey property. - * - * @return the userStorageKey value. - */ - String userStorageKey(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.ListStorageAccountKeysResultInner - * object. - * - * @return the inner object. - */ - ListStorageAccountKeysResultInner innerModel(); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListUsagesResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListUsagesResult.java deleted file mode 100644 index dd036df080fa..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListUsagesResult.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.models.UsageInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The List Usages operation response. */ -@Immutable -public final class ListUsagesResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ListUsagesResult.class); - - /* - * The list of AML resource usages. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The URI to fetch the next page of AML resource usage information. Call - * ListNext() with this to fetch the next page of AML resource usage - * information. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: The list of AML resource usages. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI to fetch the next page of AML resource usage information. Call ListNext() with - * this to fetch the next page of AML resource usage information. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListWorkspaceKeysResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListWorkspaceKeysResult.java deleted file mode 100644 index 3daf16bfd18a..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListWorkspaceKeysResult.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListWorkspaceKeysResultInner; - -/** An immutable client-side representation of ListWorkspaceKeysResult. */ -public interface ListWorkspaceKeysResult { - /** - * Gets the userStorageKey property: The userStorageKey property. - * - * @return the userStorageKey value. - */ - String userStorageKey(); - - /** - * Gets the userStorageResourceId property: The userStorageResourceId property. - * - * @return the userStorageResourceId value. - */ - String userStorageResourceId(); - - /** - * Gets the appInsightsInstrumentationKey property: The appInsightsInstrumentationKey property. - * - * @return the appInsightsInstrumentationKey value. - */ - String appInsightsInstrumentationKey(); - - /** - * Gets the containerRegistryCredentials property: The containerRegistryCredentials property. - * - * @return the containerRegistryCredentials value. - */ - RegistryListCredentialsResult containerRegistryCredentials(); - - /** - * Gets the notebookAccessKeys property: The notebookAccessKeys property. - * - * @return the notebookAccessKeys value. - */ - ListNotebookKeysResult notebookAccessKeys(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.ListWorkspaceKeysResultInner - * object. - * - * @return the inner object. - */ - ListWorkspaceKeysResultInner innerModel(); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListWorkspaceQuotas.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListWorkspaceQuotas.java deleted file mode 100644 index 6f640c8b133b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ListWorkspaceQuotas.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ResourceQuotaInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The List WorkspaceQuotasByVMFamily operation response. */ -@Immutable -public final class ListWorkspaceQuotas { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ListWorkspaceQuotas.class); - - /* - * The list of Workspace Quotas by VM Family - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The URI to fetch the next page of workspace quota information by VM - * Family. Call ListNext() with this to fetch the next page of Workspace - * Quota information. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: The list of Workspace Quotas by VM Family. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI to fetch the next page of workspace quota information by VM Family. Call - * ListNext() with this to fetch the next page of Workspace Quota information. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LivenessProbeRequirements.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LivenessProbeRequirements.java deleted file mode 100644 index 18c8f1236444..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LivenessProbeRequirements.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 liveness probe requirements. */ -@Fluent -public class LivenessProbeRequirements { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(LivenessProbeRequirements.class); - - /* - * The number of failures to allow before returning an unhealthy status. - */ - @JsonProperty(value = "failureThreshold") - private Integer failureThreshold; - - /* - * The number of successful probes before returning a healthy status. - */ - @JsonProperty(value = "successThreshold") - private Integer successThreshold; - - /* - * The probe timeout in seconds. - */ - @JsonProperty(value = "timeoutSeconds") - private Integer timeoutSeconds; - - /* - * The length of time between probes in seconds. - */ - @JsonProperty(value = "periodSeconds") - private Integer periodSeconds; - - /* - * The delay before the first probe in seconds. - */ - @JsonProperty(value = "initialDelaySeconds") - private Integer initialDelaySeconds; - - /** - * Get the failureThreshold property: The number of failures to allow before returning an unhealthy status. - * - * @return the failureThreshold value. - */ - public Integer failureThreshold() { - return this.failureThreshold; - } - - /** - * Set the failureThreshold property: The number of failures to allow before returning an unhealthy status. - * - * @param failureThreshold the failureThreshold value to set. - * @return the LivenessProbeRequirements object itself. - */ - public LivenessProbeRequirements withFailureThreshold(Integer failureThreshold) { - this.failureThreshold = failureThreshold; - return this; - } - - /** - * Get the successThreshold property: The number of successful probes before returning a healthy status. - * - * @return the successThreshold value. - */ - public Integer successThreshold() { - return this.successThreshold; - } - - /** - * Set the successThreshold property: The number of successful probes before returning a healthy status. - * - * @param successThreshold the successThreshold value to set. - * @return the LivenessProbeRequirements object itself. - */ - public LivenessProbeRequirements withSuccessThreshold(Integer successThreshold) { - this.successThreshold = successThreshold; - return this; - } - - /** - * Get the timeoutSeconds property: The probe timeout in seconds. - * - * @return the timeoutSeconds value. - */ - public Integer timeoutSeconds() { - return this.timeoutSeconds; - } - - /** - * Set the timeoutSeconds property: The probe timeout in seconds. - * - * @param timeoutSeconds the timeoutSeconds value to set. - * @return the LivenessProbeRequirements object itself. - */ - public LivenessProbeRequirements withTimeoutSeconds(Integer timeoutSeconds) { - this.timeoutSeconds = timeoutSeconds; - return this; - } - - /** - * Get the periodSeconds property: The length of time between probes in seconds. - * - * @return the periodSeconds value. - */ - public Integer periodSeconds() { - return this.periodSeconds; - } - - /** - * Set the periodSeconds property: The length of time between probes in seconds. - * - * @param periodSeconds the periodSeconds value to set. - * @return the LivenessProbeRequirements object itself. - */ - public LivenessProbeRequirements withPeriodSeconds(Integer periodSeconds) { - this.periodSeconds = periodSeconds; - return this; - } - - /** - * Get the initialDelaySeconds property: The delay before the first probe in seconds. - * - * @return the initialDelaySeconds value. - */ - public Integer initialDelaySeconds() { - return this.initialDelaySeconds; - } - - /** - * Set the initialDelaySeconds property: The delay before the first probe in seconds. - * - * @param initialDelaySeconds the initialDelaySeconds value to set. - * @return the LivenessProbeRequirements object itself. - */ - public LivenessProbeRequirements withInitialDelaySeconds(Integer initialDelaySeconds) { - this.initialDelaySeconds = initialDelaySeconds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LoadBalancerType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LoadBalancerType.java deleted file mode 100644 index 53f6f45d5da2..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LoadBalancerType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for LoadBalancerType. */ -public final class LoadBalancerType extends ExpandableStringEnum { - /** Static value PublicIp for LoadBalancerType. */ - public static final LoadBalancerType PUBLIC_IP = fromString("PublicIp"); - - /** Static value InternalLoadBalancer for LoadBalancerType. */ - public static final LoadBalancerType INTERNAL_LOAD_BALANCER = fromString("InternalLoadBalancer"); - - /** - * Creates or finds a LoadBalancerType from its string representation. - * - * @param name a name to look for. - * @return the corresponding LoadBalancerType. - */ - @JsonCreator - public static LoadBalancerType fromString(String name) { - return fromString(name, LoadBalancerType.class); - } - - /** @return known LoadBalancerType values. */ - public static Collection values() { - return values(LoadBalancerType.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputes.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputes.java deleted file mode 100644 index c848ef72341b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputes.java +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 MachineLearningComputes. */ -public interface MachineLearningComputes { - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace. - */ - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace. - */ - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, String skip, - Context context); - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. - */ - ComputeResource get(String resourceGroupName, String workspaceName, String computeName); - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String computeName, - Context context); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction, Context context); - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e. - */ - PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName); - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e. - */ - PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName, Context context); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - ComputeSecrets listKeys(String resourceGroupName, String workspaceName, String computeName); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - Response listKeysWithResponse(String resourceGroupName, String workspaceName, String computeName, - Context context); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void start(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void start(String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stop(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stop(String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void restart(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response restartWithResponse(String resourceGroupName, String workspaceName, String computeName, - Context context); - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. - */ - ComputeResource getById(String id); - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ComputeResource resource. - * - * @param name resource name. - * @return the first stage of the new ComputeResource definition. - */ - ComputeResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesCreateOrUpdateHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesCreateOrUpdateHeaders.java deleted file mode 100644 index 740f059743e8..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesCreateOrUpdateHeaders.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 MachineLearningComputesCreateOrUpdateHeaders model. */ -@Fluent -public final class MachineLearningComputesCreateOrUpdateHeaders { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MachineLearningComputesCreateOrUpdateHeaders.class); - - /* - * The Azure-AsyncOperation property. - */ - @JsonProperty(value = "Azure-AsyncOperation") - private String azureAsyncOperation; - - /** - * Get the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @return the azureAsyncOperation value. - */ - public String azureAsyncOperation() { - return this.azureAsyncOperation; - } - - /** - * Set the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @param azureAsyncOperation the azureAsyncOperation value to set. - * @return the MachineLearningComputesCreateOrUpdateHeaders object itself. - */ - public MachineLearningComputesCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { - this.azureAsyncOperation = azureAsyncOperation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesCreateOrUpdateResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesCreateOrUpdateResponse.java deleted file mode 100644 index 31f7852edb67..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesCreateOrUpdateResponse.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeResourceInner; - -/** Contains all response data for the createOrUpdate operation. */ -public final class MachineLearningComputesCreateOrUpdateResponse - extends ResponseBase { - /** - * Creates an instance of MachineLearningComputesCreateOrUpdateResponse. - * - * @param request the request which resulted in this MachineLearningComputesCreateOrUpdateResponse. - * @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 MachineLearningComputesCreateOrUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - ComputeResourceInner value, MachineLearningComputesCreateOrUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public ComputeResourceInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesDeleteHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesDeleteHeaders.java deleted file mode 100644 index a46c89500e3e..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesDeleteHeaders.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 MachineLearningComputesDeleteHeaders model. */ -@Fluent -public final class MachineLearningComputesDeleteHeaders { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MachineLearningComputesDeleteHeaders.class); - - /* - * The Azure-AsyncOperation property. - */ - @JsonProperty(value = "Azure-AsyncOperation") - private String azureAsyncOperation; - - /* - * The Location property. - */ - @JsonProperty(value = "Location") - private String location; - - /** - * Get the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @return the azureAsyncOperation value. - */ - public String azureAsyncOperation() { - return this.azureAsyncOperation; - } - - /** - * Set the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @param azureAsyncOperation the azureAsyncOperation value to set. - * @return the MachineLearningComputesDeleteHeaders object itself. - */ - public MachineLearningComputesDeleteHeaders withAzureAsyncOperation(String azureAsyncOperation) { - this.azureAsyncOperation = azureAsyncOperation; - return this; - } - - /** - * 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 MachineLearningComputesDeleteHeaders object itself. - */ - public MachineLearningComputesDeleteHeaders 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/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesDeleteResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesDeleteResponse.java deleted file mode 100644 index 6adaa59f4ca0..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesDeleteResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 MachineLearningComputesDeleteResponse - extends ResponseBase { - /** - * Creates an instance of MachineLearningComputesDeleteResponse. - * - * @param request the request which resulted in this MachineLearningComputesDeleteResponse. - * @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 MachineLearningComputesDeleteResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - Void value, MachineLearningComputesDeleteHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServices.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServices.java deleted file mode 100644 index b70471aec356..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServices.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 MachineLearningServices. */ -public interface MachineLearningServices { - /** - * Gets services in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. - */ - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); - - /** - * Gets services in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param modelId The Model Id. - * @param modelName The Model name. - * @param tag The object tag. - * @param tags A set of tags with which to filter the returned services. It is a comma separated string of tags key - * or tags key=value Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned services. It is a comma separated string - * of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param runId runId for model associated with service. - * @param expand Set to True to include Model details. - * @param orderby The option to order the response. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. - */ - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, String skip, - String modelId, String modelName, String tag, String tags, String properties, String runId, Boolean expand, - OrderString orderby, Context context); - - /** - * Get a Service by name. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. - */ - ServiceResource get(String resourceGroupName, String workspaceName, String serviceName); - - /** - * Get a Service by name. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param expand Set to True to include Model details. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String serviceName, - Boolean expand, Context context); - - /** - * Delete a specific Service.. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String serviceName); - - /** - * Delete a specific Service.. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String serviceName, - Context context); - - /** - * Get a Service by name. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. - */ - ServiceResource getById(String id); - - /** - * Get a Service by name. - * - * @param id the resource ID. - * @param expand Set to True to include Model details. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. - */ - Response getByIdWithResponse(String id, Boolean expand, Context context); - - /** - * Delete a specific Service.. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a specific Service.. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ServiceResource resource. - * - * @param name resource name. - * @return the first stage of the new ServiceResource definition. - */ - ServiceResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServicesCreateOrUpdateHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServicesCreateOrUpdateHeaders.java deleted file mode 100644 index b29ece78b30b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServicesCreateOrUpdateHeaders.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 MachineLearningServicesCreateOrUpdateHeaders model. */ -@Fluent -public final class MachineLearningServicesCreateOrUpdateHeaders { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MachineLearningServicesCreateOrUpdateHeaders.class); - - /* - * The Azure-AsyncOperation property. - */ - @JsonProperty(value = "Azure-AsyncOperation") - private String azureAsyncOperation; - - /** - * Get the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @return the azureAsyncOperation value. - */ - public String azureAsyncOperation() { - return this.azureAsyncOperation; - } - - /** - * Set the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @param azureAsyncOperation the azureAsyncOperation value to set. - * @return the MachineLearningServicesCreateOrUpdateHeaders object itself. - */ - public MachineLearningServicesCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { - this.azureAsyncOperation = azureAsyncOperation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServicesCreateOrUpdateResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServicesCreateOrUpdateResponse.java deleted file mode 100644 index 93da81675eea..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServicesCreateOrUpdateResponse.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ServiceResourceInner; - -/** Contains all response data for the createOrUpdate operation. */ -public final class MachineLearningServicesCreateOrUpdateResponse - extends ResponseBase { - /** - * Creates an instance of MachineLearningServicesCreateOrUpdateResponse. - * - * @param request the request which resulted in this MachineLearningServicesCreateOrUpdateResponse. - * @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 MachineLearningServicesCreateOrUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - ServiceResourceInner value, MachineLearningServicesCreateOrUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public ServiceResourceInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Model.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Model.java deleted file mode 100644 index 369c4a31048b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Model.java +++ /dev/null @@ -1,602 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** An Azure Machine Learning Model. */ -@Fluent -public final class Model { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(Model.class); - - /* - * The Model Id. - */ - @JsonProperty(value = "id") - private String id; - - /* - * The Model name. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * The Model framework. - */ - @JsonProperty(value = "framework") - private String framework; - - /* - * The Model framework version. - */ - @JsonProperty(value = "frameworkVersion") - private String frameworkVersion; - - /* - * The Model version assigned by Model Management Service. - */ - @JsonProperty(value = "version") - private Long version; - - /* - * The list of datasets associated with the model. - */ - @JsonProperty(value = "datasets") - private List datasets; - - /* - * The URL of the Model. Usually a SAS URL. - */ - @JsonProperty(value = "url", required = true) - private String url; - - /* - * The MIME type of Model content. For more details about MIME type, please - * open https://www.iana.org/assignments/media-types/media-types.xhtml - */ - @JsonProperty(value = "mimeType", required = true) - private String mimeType; - - /* - * The Model description text. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The Model creation time (UTC). - */ - @JsonProperty(value = "createdTime") - private OffsetDateTime createdTime; - - /* - * The Model last modified time (UTC). - */ - @JsonProperty(value = "modifiedTime") - private OffsetDateTime modifiedTime; - - /* - * Indicates whether we need to unpack the Model during docker Image - * creation. - */ - @JsonProperty(value = "unpack") - private Boolean unpack; - - /* - * The Parent Model Id. - */ - @JsonProperty(value = "parentModelId") - private String parentModelId; - - /* - * The RunId that created this model. - */ - @JsonProperty(value = "runId") - private String runId; - - /* - * The name of the experiment where this model was created. - */ - @JsonProperty(value = "experimentName") - private String experimentName; - - /* - * The Model tag dictionary. Items are mutable. - */ - @JsonProperty(value = "kvTags") - private Map kvTags; - - /* - * The Model property dictionary. Properties are immutable. - */ - @JsonProperty(value = "properties") - private Map properties; - - /* - * Models derived from this model - */ - @JsonProperty(value = "derivedModelIds") - private List derivedModelIds; - - /* - * Sample Input Data for the Model. A reference to a dataset in the - * workspace in the format aml://dataset/{datasetId} - */ - @JsonProperty(value = "sampleInputData") - private String sampleInputData; - - /* - * Sample Output Data for the Model. A reference to a dataset in the - * workspace in the format aml://dataset/{datasetId} - */ - @JsonProperty(value = "sampleOutputData") - private String sampleOutputData; - - /* - * Resource requirements for the model - */ - @JsonProperty(value = "resourceRequirements") - private ContainerResourceRequirements resourceRequirements; - - /** - * Get the id property: The Model Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The Model Id. - * - * @param id the id value to set. - * @return the Model object itself. - */ - public Model withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: The Model name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The Model name. - * - * @param name the name value to set. - * @return the Model object itself. - */ - public Model withName(String name) { - this.name = name; - return this; - } - - /** - * Get the framework property: The Model framework. - * - * @return the framework value. - */ - public String framework() { - return this.framework; - } - - /** - * Set the framework property: The Model framework. - * - * @param framework the framework value to set. - * @return the Model object itself. - */ - public Model withFramework(String framework) { - this.framework = framework; - return this; - } - - /** - * Get the frameworkVersion property: The Model framework version. - * - * @return the frameworkVersion value. - */ - public String frameworkVersion() { - return this.frameworkVersion; - } - - /** - * Set the frameworkVersion property: The Model framework version. - * - * @param frameworkVersion the frameworkVersion value to set. - * @return the Model object itself. - */ - public Model withFrameworkVersion(String frameworkVersion) { - this.frameworkVersion = frameworkVersion; - return this; - } - - /** - * Get the version property: The Model version assigned by Model Management Service. - * - * @return the version value. - */ - public Long version() { - return this.version; - } - - /** - * Set the version property: The Model version assigned by Model Management Service. - * - * @param version the version value to set. - * @return the Model object itself. - */ - public Model withVersion(Long version) { - this.version = version; - return this; - } - - /** - * Get the datasets property: The list of datasets associated with the model. - * - * @return the datasets value. - */ - public List datasets() { - return this.datasets; - } - - /** - * Set the datasets property: The list of datasets associated with the model. - * - * @param datasets the datasets value to set. - * @return the Model object itself. - */ - public Model withDatasets(List datasets) { - this.datasets = datasets; - return this; - } - - /** - * Get the url property: The URL of the Model. Usually a SAS URL. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: The URL of the Model. Usually a SAS URL. - * - * @param url the url value to set. - * @return the Model object itself. - */ - public Model withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the mimeType property: The MIME type of Model content. For more details about MIME type, please open - * https://www.iana.org/assignments/media-types/media-types.xhtml. - * - * @return the mimeType value. - */ - public String mimeType() { - return this.mimeType; - } - - /** - * Set the mimeType property: The MIME type of Model content. For more details about MIME type, please open - * https://www.iana.org/assignments/media-types/media-types.xhtml. - * - * @param mimeType the mimeType value to set. - * @return the Model object itself. - */ - public Model withMimeType(String mimeType) { - this.mimeType = mimeType; - return this; - } - - /** - * Get the description property: The Model description text. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The Model description text. - * - * @param description the description value to set. - * @return the Model object itself. - */ - public Model withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdTime property: The Model creation time (UTC). - * - * @return the createdTime value. - */ - public OffsetDateTime createdTime() { - return this.createdTime; - } - - /** - * Set the createdTime property: The Model creation time (UTC). - * - * @param createdTime the createdTime value to set. - * @return the Model object itself. - */ - public Model withCreatedTime(OffsetDateTime createdTime) { - this.createdTime = createdTime; - return this; - } - - /** - * Get the modifiedTime property: The Model last modified time (UTC). - * - * @return the modifiedTime value. - */ - public OffsetDateTime modifiedTime() { - return this.modifiedTime; - } - - /** - * Set the modifiedTime property: The Model last modified time (UTC). - * - * @param modifiedTime the modifiedTime value to set. - * @return the Model object itself. - */ - public Model withModifiedTime(OffsetDateTime modifiedTime) { - this.modifiedTime = modifiedTime; - return this; - } - - /** - * Get the unpack property: Indicates whether we need to unpack the Model during docker Image creation. - * - * @return the unpack value. - */ - public Boolean unpack() { - return this.unpack; - } - - /** - * Set the unpack property: Indicates whether we need to unpack the Model during docker Image creation. - * - * @param unpack the unpack value to set. - * @return the Model object itself. - */ - public Model withUnpack(Boolean unpack) { - this.unpack = unpack; - return this; - } - - /** - * Get the parentModelId property: The Parent Model Id. - * - * @return the parentModelId value. - */ - public String parentModelId() { - return this.parentModelId; - } - - /** - * Set the parentModelId property: The Parent Model Id. - * - * @param parentModelId the parentModelId value to set. - * @return the Model object itself. - */ - public Model withParentModelId(String parentModelId) { - this.parentModelId = parentModelId; - return this; - } - - /** - * Get the runId property: The RunId that created this model. - * - * @return the runId value. - */ - public String runId() { - return this.runId; - } - - /** - * Set the runId property: The RunId that created this model. - * - * @param runId the runId value to set. - * @return the Model object itself. - */ - public Model withRunId(String runId) { - this.runId = runId; - return this; - } - - /** - * Get the experimentName property: The name of the experiment where this model was created. - * - * @return the experimentName value. - */ - public String experimentName() { - return this.experimentName; - } - - /** - * Set the experimentName property: The name of the experiment where this model was created. - * - * @param experimentName the experimentName value to set. - * @return the Model object itself. - */ - public Model withExperimentName(String experimentName) { - this.experimentName = experimentName; - return this; - } - - /** - * Get the kvTags property: The Model tag dictionary. Items are mutable. - * - * @return the kvTags value. - */ - public Map kvTags() { - return this.kvTags; - } - - /** - * Set the kvTags property: The Model tag dictionary. Items are mutable. - * - * @param kvTags the kvTags value to set. - * @return the Model object itself. - */ - public Model withKvTags(Map kvTags) { - this.kvTags = kvTags; - return this; - } - - /** - * Get the properties property: The Model property dictionary. Properties are immutable. - * - * @return the properties value. - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties property: The Model property dictionary. Properties are immutable. - * - * @param properties the properties value to set. - * @return the Model object itself. - */ - public Model withProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Get the derivedModelIds property: Models derived from this model. - * - * @return the derivedModelIds value. - */ - public List derivedModelIds() { - return this.derivedModelIds; - } - - /** - * Set the derivedModelIds property: Models derived from this model. - * - * @param derivedModelIds the derivedModelIds value to set. - * @return the Model object itself. - */ - public Model withDerivedModelIds(List derivedModelIds) { - this.derivedModelIds = derivedModelIds; - return this; - } - - /** - * Get the sampleInputData property: Sample Input Data for the Model. A reference to a dataset in the workspace in - * the format aml://dataset/{datasetId}. - * - * @return the sampleInputData value. - */ - public String sampleInputData() { - return this.sampleInputData; - } - - /** - * Set the sampleInputData property: Sample Input Data for the Model. A reference to a dataset in the workspace in - * the format aml://dataset/{datasetId}. - * - * @param sampleInputData the sampleInputData value to set. - * @return the Model object itself. - */ - public Model withSampleInputData(String sampleInputData) { - this.sampleInputData = sampleInputData; - return this; - } - - /** - * Get the sampleOutputData property: Sample Output Data for the Model. A reference to a dataset in the workspace in - * the format aml://dataset/{datasetId}. - * - * @return the sampleOutputData value. - */ - public String sampleOutputData() { - return this.sampleOutputData; - } - - /** - * Set the sampleOutputData property: Sample Output Data for the Model. A reference to a dataset in the workspace in - * the format aml://dataset/{datasetId}. - * - * @param sampleOutputData the sampleOutputData value to set. - * @return the Model object itself. - */ - public Model withSampleOutputData(String sampleOutputData) { - this.sampleOutputData = sampleOutputData; - return this; - } - - /** - * Get the resourceRequirements property: Resource requirements for the model. - * - * @return the resourceRequirements value. - */ - public ContainerResourceRequirements resourceRequirements() { - return this.resourceRequirements; - } - - /** - * Set the resourceRequirements property: Resource requirements for the model. - * - * @param resourceRequirements the resourceRequirements value to set. - * @return the Model object itself. - */ - public Model withResourceRequirements(ContainerResourceRequirements resourceRequirements) { - this.resourceRequirements = resourceRequirements; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw logger - .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Model")); - } - if (datasets() != null) { - datasets().forEach(e -> e.validate()); - } - if (url() == null) { - throw logger - .logExceptionAsError(new IllegalArgumentException("Missing required property url in model Model")); - } - if (mimeType() == null) { - throw logger - .logExceptionAsError(new IllegalArgumentException("Missing required property mimeType in model Model")); - } - if (resourceRequirements() != null) { - resourceRequirements().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDataCollection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDataCollection.java deleted file mode 100644 index cae63c0b82c9..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDataCollection.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 Model data collection properties. */ -@Fluent -public class ModelDataCollection { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelDataCollection.class); - - /* - * Option for enabling/disabling Event Hub. - */ - @JsonProperty(value = "eventHubEnabled") - private Boolean eventHubEnabled; - - /* - * Option for enabling/disabling storage. - */ - @JsonProperty(value = "storageEnabled") - private Boolean storageEnabled; - - /** - * Get the eventHubEnabled property: Option for enabling/disabling Event Hub. - * - * @return the eventHubEnabled value. - */ - public Boolean eventHubEnabled() { - return this.eventHubEnabled; - } - - /** - * Set the eventHubEnabled property: Option for enabling/disabling Event Hub. - * - * @param eventHubEnabled the eventHubEnabled value to set. - * @return the ModelDataCollection object itself. - */ - public ModelDataCollection withEventHubEnabled(Boolean eventHubEnabled) { - this.eventHubEnabled = eventHubEnabled; - return this; - } - - /** - * Get the storageEnabled property: Option for enabling/disabling storage. - * - * @return the storageEnabled value. - */ - public Boolean storageEnabled() { - return this.storageEnabled; - } - - /** - * Set the storageEnabled property: Option for enabling/disabling storage. - * - * @param storageEnabled the storageEnabled value to set. - * @return the ModelDataCollection object itself. - */ - public ModelDataCollection withStorageEnabled(Boolean storageEnabled) { - this.storageEnabled = storageEnabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSection.java deleted file mode 100644 index d41a7833cd30..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSection.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 ModelDockerSection model. */ -@Fluent -public class ModelDockerSection { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelDockerSection.class); - - /* - * Base image used for Docker-based runs. Mutually exclusive with - * BaseDockerfile. - */ - @JsonProperty(value = "baseImage") - private String baseImage; - - /* - * Base Dockerfile used for Docker-based runs. Mutually exclusive with - * BaseImage. - */ - @JsonProperty(value = "baseDockerfile") - private String baseDockerfile; - - /* - * Image registry that contains the base image. - */ - @JsonProperty(value = "baseImageRegistry") - private ModelDockerSectionBaseImageRegistry baseImageRegistry; - - /** - * Get the baseImage property: Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile. - * - * @return the baseImage value. - */ - public String baseImage() { - return this.baseImage; - } - - /** - * Set the baseImage property: Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile. - * - * @param baseImage the baseImage value to set. - * @return the ModelDockerSection object itself. - */ - public ModelDockerSection withBaseImage(String baseImage) { - this.baseImage = baseImage; - return this; - } - - /** - * Get the baseDockerfile property: Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage. - * - * @return the baseDockerfile value. - */ - public String baseDockerfile() { - return this.baseDockerfile; - } - - /** - * Set the baseDockerfile property: Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage. - * - * @param baseDockerfile the baseDockerfile value to set. - * @return the ModelDockerSection object itself. - */ - public ModelDockerSection withBaseDockerfile(String baseDockerfile) { - this.baseDockerfile = baseDockerfile; - return this; - } - - /** - * Get the baseImageRegistry property: Image registry that contains the base image. - * - * @return the baseImageRegistry value. - */ - public ModelDockerSectionBaseImageRegistry baseImageRegistry() { - return this.baseImageRegistry; - } - - /** - * Set the baseImageRegistry property: Image registry that contains the base image. - * - * @param baseImageRegistry the baseImageRegistry value to set. - * @return the ModelDockerSection object itself. - */ - public ModelDockerSection withBaseImageRegistry(ModelDockerSectionBaseImageRegistry baseImageRegistry) { - this.baseImageRegistry = baseImageRegistry; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (baseImageRegistry() != null) { - baseImageRegistry().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionBaseImageRegistry.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionBaseImageRegistry.java deleted file mode 100644 index a7e4a6683bb2..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionBaseImageRegistry.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** Image registry that contains the base image. */ -@Immutable -public final class ModelDockerSectionBaseImageRegistry extends ContainerRegistry { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelDockerSectionBaseImageRegistry.class); - - /** {@inheritDoc} */ - @Override - public ModelDockerSectionBaseImageRegistry withAddress(String address) { - super.withAddress(address); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelDockerSectionBaseImageRegistry withUsername(String username) { - super.withUsername(username); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelDockerSectionBaseImageRegistry withPassword(String password) { - super.withPassword(password); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionResponse.java deleted file mode 100644 index 805f850419f4..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionResponse.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 ModelDockerSectionResponse model. */ -@Fluent -public class ModelDockerSectionResponse { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelDockerSectionResponse.class); - - /* - * Base image used for Docker-based runs. Mutually exclusive with - * BaseDockerfile. - */ - @JsonProperty(value = "baseImage") - private String baseImage; - - /* - * Base Dockerfile used for Docker-based runs. Mutually exclusive with - * BaseImage. - */ - @JsonProperty(value = "baseDockerfile") - private String baseDockerfile; - - /* - * Image registry that contains the base image. - */ - @JsonProperty(value = "baseImageRegistry") - private ModelDockerSectionResponseBaseImageRegistry baseImageRegistry; - - /** - * Get the baseImage property: Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile. - * - * @return the baseImage value. - */ - public String baseImage() { - return this.baseImage; - } - - /** - * Set the baseImage property: Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile. - * - * @param baseImage the baseImage value to set. - * @return the ModelDockerSectionResponse object itself. - */ - public ModelDockerSectionResponse withBaseImage(String baseImage) { - this.baseImage = baseImage; - return this; - } - - /** - * Get the baseDockerfile property: Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage. - * - * @return the baseDockerfile value. - */ - public String baseDockerfile() { - return this.baseDockerfile; - } - - /** - * Set the baseDockerfile property: Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage. - * - * @param baseDockerfile the baseDockerfile value to set. - * @return the ModelDockerSectionResponse object itself. - */ - public ModelDockerSectionResponse withBaseDockerfile(String baseDockerfile) { - this.baseDockerfile = baseDockerfile; - return this; - } - - /** - * Get the baseImageRegistry property: Image registry that contains the base image. - * - * @return the baseImageRegistry value. - */ - public ModelDockerSectionResponseBaseImageRegistry baseImageRegistry() { - return this.baseImageRegistry; - } - - /** - * Set the baseImageRegistry property: Image registry that contains the base image. - * - * @param baseImageRegistry the baseImageRegistry value to set. - * @return the ModelDockerSectionResponse object itself. - */ - public ModelDockerSectionResponse - withBaseImageRegistry(ModelDockerSectionResponseBaseImageRegistry baseImageRegistry) { - this.baseImageRegistry = baseImageRegistry; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (baseImageRegistry() != null) { - baseImageRegistry().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionResponseBaseImageRegistry.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionResponseBaseImageRegistry.java deleted file mode 100644 index 664af1ca92f8..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionResponseBaseImageRegistry.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** Image registry that contains the base image. */ -@Immutable -public final class ModelDockerSectionResponseBaseImageRegistry extends ContainerRegistryResponse { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelDockerSectionResponseBaseImageRegistry.class); - - /** {@inheritDoc} */ - @Override - public ModelDockerSectionResponseBaseImageRegistry withAddress(String address) { - super.withAddress(address); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinition.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinition.java deleted file mode 100644 index cabb2b7cbde8..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinition.java +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.Map; - -/** The ModelEnvironmentDefinition model. */ -@Fluent -public class ModelEnvironmentDefinition { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinition.class); - - /* - * The name of the environment. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The environment version. - */ - @JsonProperty(value = "version") - private String version; - - /* - * Settings for a Python environment. - */ - @JsonProperty(value = "python") - private ModelEnvironmentDefinitionPython python; - - /* - * Definition of environment variables to be defined in the environment. - */ - @JsonProperty(value = "environmentVariables") - private Map environmentVariables; - - /* - * The definition of a Docker container. - */ - @JsonProperty(value = "docker") - private ModelEnvironmentDefinitionDocker docker; - - /* - * The configuration for a Spark environment. - */ - @JsonProperty(value = "spark") - private ModelEnvironmentDefinitionSpark spark; - - /* - * Settings for a R environment. - */ - @JsonProperty(value = "r") - private ModelEnvironmentDefinitionR r; - - /* - * The inferencing stack version added to the image. To avoid adding an - * inferencing stack, do not set this value. Valid values: "latest". - */ - @JsonProperty(value = "inferencingStackVersion") - private String inferencingStackVersion; - - /** - * Get the name property: The name of the environment. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the environment. - * - * @param name the name value to set. - * @return the ModelEnvironmentDefinition object itself. - */ - public ModelEnvironmentDefinition withName(String name) { - this.name = name; - return this; - } - - /** - * Get the version property: The environment version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: The environment version. - * - * @param version the version value to set. - * @return the ModelEnvironmentDefinition object itself. - */ - public ModelEnvironmentDefinition withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the python property: Settings for a Python environment. - * - * @return the python value. - */ - public ModelEnvironmentDefinitionPython python() { - return this.python; - } - - /** - * Set the python property: Settings for a Python environment. - * - * @param python the python value to set. - * @return the ModelEnvironmentDefinition object itself. - */ - public ModelEnvironmentDefinition withPython(ModelEnvironmentDefinitionPython python) { - this.python = python; - return this; - } - - /** - * Get the environmentVariables property: Definition of environment variables to be defined in the environment. - * - * @return the environmentVariables value. - */ - public Map environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: Definition of environment variables to be defined in the environment. - * - * @param environmentVariables the environmentVariables value to set. - * @return the ModelEnvironmentDefinition object itself. - */ - public ModelEnvironmentDefinition withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * Get the docker property: The definition of a Docker container. - * - * @return the docker value. - */ - public ModelEnvironmentDefinitionDocker docker() { - return this.docker; - } - - /** - * Set the docker property: The definition of a Docker container. - * - * @param docker the docker value to set. - * @return the ModelEnvironmentDefinition object itself. - */ - public ModelEnvironmentDefinition withDocker(ModelEnvironmentDefinitionDocker docker) { - this.docker = docker; - return this; - } - - /** - * Get the spark property: The configuration for a Spark environment. - * - * @return the spark value. - */ - public ModelEnvironmentDefinitionSpark spark() { - return this.spark; - } - - /** - * Set the spark property: The configuration for a Spark environment. - * - * @param spark the spark value to set. - * @return the ModelEnvironmentDefinition object itself. - */ - public ModelEnvironmentDefinition withSpark(ModelEnvironmentDefinitionSpark spark) { - this.spark = spark; - return this; - } - - /** - * Get the r property: Settings for a R environment. - * - * @return the r value. - */ - public ModelEnvironmentDefinitionR r() { - return this.r; - } - - /** - * Set the r property: Settings for a R environment. - * - * @param r the r value to set. - * @return the ModelEnvironmentDefinition object itself. - */ - public ModelEnvironmentDefinition withR(ModelEnvironmentDefinitionR r) { - this.r = r; - return this; - } - - /** - * Get the inferencingStackVersion property: The inferencing stack version added to the image. To avoid adding an - * inferencing stack, do not set this value. Valid values: "latest". - * - * @return the inferencingStackVersion value. - */ - public String inferencingStackVersion() { - return this.inferencingStackVersion; - } - - /** - * Set the inferencingStackVersion property: The inferencing stack version added to the image. To avoid adding an - * inferencing stack, do not set this value. Valid values: "latest". - * - * @param inferencingStackVersion the inferencingStackVersion value to set. - * @return the ModelEnvironmentDefinition object itself. - */ - public ModelEnvironmentDefinition withInferencingStackVersion(String inferencingStackVersion) { - this.inferencingStackVersion = inferencingStackVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (python() != null) { - python().validate(); - } - if (docker() != null) { - docker().validate(); - } - if (spark() != null) { - spark().validate(); - } - if (r() != null) { - r().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionDocker.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionDocker.java deleted file mode 100644 index 8922b1a24ab7..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionDocker.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The definition of a Docker container. */ -@Immutable -public final class ModelEnvironmentDefinitionDocker extends ModelDockerSection { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionDocker.class); - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionDocker withBaseImage(String baseImage) { - super.withBaseImage(baseImage); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionDocker withBaseDockerfile(String baseDockerfile) { - super.withBaseDockerfile(baseDockerfile); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionDocker - withBaseImageRegistry(ModelDockerSectionBaseImageRegistry baseImageRegistry) { - super.withBaseImageRegistry(baseImageRegistry); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionPython.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionPython.java deleted file mode 100644 index d5b322596d9b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionPython.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** Settings for a Python environment. */ -@Immutable -public final class ModelEnvironmentDefinitionPython extends ModelPythonSection { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionPython.class); - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionPython withInterpreterPath(String interpreterPath) { - super.withInterpreterPath(interpreterPath); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionPython withUserManagedDependencies(Boolean userManagedDependencies) { - super.withUserManagedDependencies(userManagedDependencies); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionPython withCondaDependencies(Object condaDependencies) { - super.withCondaDependencies(condaDependencies); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionPython withBaseCondaEnvironment(String baseCondaEnvironment) { - super.withBaseCondaEnvironment(baseCondaEnvironment); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionR.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionR.java deleted file mode 100644 index 5db4aa06d0a4..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionR.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -/** Settings for a R environment. */ -@Immutable -public final class ModelEnvironmentDefinitionR extends RSection { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionR.class); - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionR withRVersion(String rVersion) { - super.withRVersion(rVersion); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionR withUserManaged(Boolean userManaged) { - super.withUserManaged(userManaged); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionR withRscriptPath(String rscriptPath) { - super.withRscriptPath(rscriptPath); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionR withSnapshotDate(String snapshotDate) { - super.withSnapshotDate(snapshotDate); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionR withCranPackages(List cranPackages) { - super.withCranPackages(cranPackages); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionR withGitHubPackages(List gitHubPackages) { - super.withGitHubPackages(gitHubPackages); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionR withCustomUrlPackages(List customUrlPackages) { - super.withCustomUrlPackages(customUrlPackages); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionR withBioConductorPackages(List bioConductorPackages) { - super.withBioConductorPackages(bioConductorPackages); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponse.java deleted file mode 100644 index f4c46b836e6e..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponse.java +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.Map; - -/** The ModelEnvironmentDefinitionResponse model. */ -@Fluent -public class ModelEnvironmentDefinitionResponse { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionResponse.class); - - /* - * The name of the environment. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The environment version. - */ - @JsonProperty(value = "version") - private String version; - - /* - * Settings for a Python environment. - */ - @JsonProperty(value = "python") - private ModelEnvironmentDefinitionResponsePython python; - - /* - * Definition of environment variables to be defined in the environment. - */ - @JsonProperty(value = "environmentVariables") - private Map environmentVariables; - - /* - * The definition of a Docker container. - */ - @JsonProperty(value = "docker") - private ModelEnvironmentDefinitionResponseDocker docker; - - /* - * The configuration for a Spark environment. - */ - @JsonProperty(value = "spark") - private ModelEnvironmentDefinitionResponseSpark spark; - - /* - * Settings for a R environment. - */ - @JsonProperty(value = "r") - private ModelEnvironmentDefinitionResponseR r; - - /* - * The inferencing stack version added to the image. To avoid adding an - * inferencing stack, do not set this value. Valid values: "latest". - */ - @JsonProperty(value = "inferencingStackVersion") - private String inferencingStackVersion; - - /** - * Get the name property: The name of the environment. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the environment. - * - * @param name the name value to set. - * @return the ModelEnvironmentDefinitionResponse object itself. - */ - public ModelEnvironmentDefinitionResponse withName(String name) { - this.name = name; - return this; - } - - /** - * Get the version property: The environment version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: The environment version. - * - * @param version the version value to set. - * @return the ModelEnvironmentDefinitionResponse object itself. - */ - public ModelEnvironmentDefinitionResponse withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the python property: Settings for a Python environment. - * - * @return the python value. - */ - public ModelEnvironmentDefinitionResponsePython python() { - return this.python; - } - - /** - * Set the python property: Settings for a Python environment. - * - * @param python the python value to set. - * @return the ModelEnvironmentDefinitionResponse object itself. - */ - public ModelEnvironmentDefinitionResponse withPython(ModelEnvironmentDefinitionResponsePython python) { - this.python = python; - return this; - } - - /** - * Get the environmentVariables property: Definition of environment variables to be defined in the environment. - * - * @return the environmentVariables value. - */ - public Map environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: Definition of environment variables to be defined in the environment. - * - * @param environmentVariables the environmentVariables value to set. - * @return the ModelEnvironmentDefinitionResponse object itself. - */ - public ModelEnvironmentDefinitionResponse withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * Get the docker property: The definition of a Docker container. - * - * @return the docker value. - */ - public ModelEnvironmentDefinitionResponseDocker docker() { - return this.docker; - } - - /** - * Set the docker property: The definition of a Docker container. - * - * @param docker the docker value to set. - * @return the ModelEnvironmentDefinitionResponse object itself. - */ - public ModelEnvironmentDefinitionResponse withDocker(ModelEnvironmentDefinitionResponseDocker docker) { - this.docker = docker; - return this; - } - - /** - * Get the spark property: The configuration for a Spark environment. - * - * @return the spark value. - */ - public ModelEnvironmentDefinitionResponseSpark spark() { - return this.spark; - } - - /** - * Set the spark property: The configuration for a Spark environment. - * - * @param spark the spark value to set. - * @return the ModelEnvironmentDefinitionResponse object itself. - */ - public ModelEnvironmentDefinitionResponse withSpark(ModelEnvironmentDefinitionResponseSpark spark) { - this.spark = spark; - return this; - } - - /** - * Get the r property: Settings for a R environment. - * - * @return the r value. - */ - public ModelEnvironmentDefinitionResponseR r() { - return this.r; - } - - /** - * Set the r property: Settings for a R environment. - * - * @param r the r value to set. - * @return the ModelEnvironmentDefinitionResponse object itself. - */ - public ModelEnvironmentDefinitionResponse withR(ModelEnvironmentDefinitionResponseR r) { - this.r = r; - return this; - } - - /** - * Get the inferencingStackVersion property: The inferencing stack version added to the image. To avoid adding an - * inferencing stack, do not set this value. Valid values: "latest". - * - * @return the inferencingStackVersion value. - */ - public String inferencingStackVersion() { - return this.inferencingStackVersion; - } - - /** - * Set the inferencingStackVersion property: The inferencing stack version added to the image. To avoid adding an - * inferencing stack, do not set this value. Valid values: "latest". - * - * @param inferencingStackVersion the inferencingStackVersion value to set. - * @return the ModelEnvironmentDefinitionResponse object itself. - */ - public ModelEnvironmentDefinitionResponse withInferencingStackVersion(String inferencingStackVersion) { - this.inferencingStackVersion = inferencingStackVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (python() != null) { - python().validate(); - } - if (docker() != null) { - docker().validate(); - } - if (spark() != null) { - spark().validate(); - } - if (r() != null) { - r().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseDocker.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseDocker.java deleted file mode 100644 index 8cedead78340..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseDocker.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The definition of a Docker container. */ -@Immutable -public final class ModelEnvironmentDefinitionResponseDocker extends ModelDockerSectionResponse { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionResponseDocker.class); - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseDocker withBaseImage(String baseImage) { - super.withBaseImage(baseImage); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseDocker withBaseDockerfile(String baseDockerfile) { - super.withBaseDockerfile(baseDockerfile); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseDocker - withBaseImageRegistry(ModelDockerSectionResponseBaseImageRegistry baseImageRegistry) { - super.withBaseImageRegistry(baseImageRegistry); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponsePython.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponsePython.java deleted file mode 100644 index e8fe66c1d612..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponsePython.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** Settings for a Python environment. */ -@Immutable -public final class ModelEnvironmentDefinitionResponsePython extends ModelPythonSection { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionResponsePython.class); - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponsePython withInterpreterPath(String interpreterPath) { - super.withInterpreterPath(interpreterPath); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponsePython withUserManagedDependencies(Boolean userManagedDependencies) { - super.withUserManagedDependencies(userManagedDependencies); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponsePython withCondaDependencies(Object condaDependencies) { - super.withCondaDependencies(condaDependencies); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponsePython withBaseCondaEnvironment(String baseCondaEnvironment) { - super.withBaseCondaEnvironment(baseCondaEnvironment); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseR.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseR.java deleted file mode 100644 index 1ff7da170959..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseR.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -/** Settings for a R environment. */ -@Immutable -public final class ModelEnvironmentDefinitionResponseR extends RSectionResponse { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionResponseR.class); - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseR withRVersion(String rVersion) { - super.withRVersion(rVersion); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseR withUserManaged(Boolean userManaged) { - super.withUserManaged(userManaged); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseR withRscriptPath(String rscriptPath) { - super.withRscriptPath(rscriptPath); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseR withSnapshotDate(String snapshotDate) { - super.withSnapshotDate(snapshotDate); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseR withCranPackages(List cranPackages) { - super.withCranPackages(cranPackages); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseR withGitHubPackages(List gitHubPackages) { - super.withGitHubPackages(gitHubPackages); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseR withCustomUrlPackages(List customUrlPackages) { - super.withCustomUrlPackages(customUrlPackages); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseR withBioConductorPackages(List bioConductorPackages) { - super.withBioConductorPackages(bioConductorPackages); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseSpark.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseSpark.java deleted file mode 100644 index c7b2b7607dd7..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseSpark.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -/** The configuration for a Spark environment. */ -@Immutable -public final class ModelEnvironmentDefinitionResponseSpark extends ModelSparkSection { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionResponseSpark.class); - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseSpark withRepositories(List repositories) { - super.withRepositories(repositories); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseSpark withPackages(List packages) { - super.withPackages(packages); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseSpark withPrecachePackages(Boolean precachePackages) { - super.withPrecachePackages(precachePackages); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionSpark.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionSpark.java deleted file mode 100644 index c7bd856973ec..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionSpark.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -/** The configuration for a Spark environment. */ -@Immutable -public final class ModelEnvironmentDefinitionSpark extends ModelSparkSection { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionSpark.class); - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionSpark withRepositories(List repositories) { - super.withRepositories(repositories); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionSpark withPackages(List packages) { - super.withPackages(packages); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionSpark withPrecachePackages(Boolean precachePackages) { - super.withPrecachePackages(precachePackages); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelPythonSection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelPythonSection.java deleted file mode 100644 index 10ffb9f9e23f..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelPythonSection.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 ModelPythonSection model. */ -@Fluent -public class ModelPythonSection { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelPythonSection.class); - - /* - * The python interpreter path to use if an environment build is not - * required. The path specified gets used to call the user script. - */ - @JsonProperty(value = "interpreterPath") - private String interpreterPath; - - /* - * True means that AzureML reuses an existing python environment; False - * means that AzureML will create a python environment based on the Conda - * dependencies specification. - */ - @JsonProperty(value = "userManagedDependencies") - private Boolean userManagedDependencies; - - /* - * A JObject containing Conda dependencies. - */ - @JsonProperty(value = "condaDependencies") - private Object condaDependencies; - - /* - * The baseCondaEnvironment property. - */ - @JsonProperty(value = "baseCondaEnvironment") - private String baseCondaEnvironment; - - /** - * Get the interpreterPath property: The python interpreter path to use if an environment build is not required. The - * path specified gets used to call the user script. - * - * @return the interpreterPath value. - */ - public String interpreterPath() { - return this.interpreterPath; - } - - /** - * Set the interpreterPath property: The python interpreter path to use if an environment build is not required. The - * path specified gets used to call the user script. - * - * @param interpreterPath the interpreterPath value to set. - * @return the ModelPythonSection object itself. - */ - public ModelPythonSection withInterpreterPath(String interpreterPath) { - this.interpreterPath = interpreterPath; - return this; - } - - /** - * Get the userManagedDependencies property: True means that AzureML reuses an existing python environment; False - * means that AzureML will create a python environment based on the Conda dependencies specification. - * - * @return the userManagedDependencies value. - */ - public Boolean userManagedDependencies() { - return this.userManagedDependencies; - } - - /** - * Set the userManagedDependencies property: True means that AzureML reuses an existing python environment; False - * means that AzureML will create a python environment based on the Conda dependencies specification. - * - * @param userManagedDependencies the userManagedDependencies value to set. - * @return the ModelPythonSection object itself. - */ - public ModelPythonSection withUserManagedDependencies(Boolean userManagedDependencies) { - this.userManagedDependencies = userManagedDependencies; - return this; - } - - /** - * Get the condaDependencies property: A JObject containing Conda dependencies. - * - * @return the condaDependencies value. - */ - public Object condaDependencies() { - return this.condaDependencies; - } - - /** - * Set the condaDependencies property: A JObject containing Conda dependencies. - * - * @param condaDependencies the condaDependencies value to set. - * @return the ModelPythonSection object itself. - */ - public ModelPythonSection withCondaDependencies(Object condaDependencies) { - this.condaDependencies = condaDependencies; - return this; - } - - /** - * Get the baseCondaEnvironment property: The baseCondaEnvironment property. - * - * @return the baseCondaEnvironment value. - */ - public String baseCondaEnvironment() { - return this.baseCondaEnvironment; - } - - /** - * Set the baseCondaEnvironment property: The baseCondaEnvironment property. - * - * @param baseCondaEnvironment the baseCondaEnvironment value to set. - * @return the ModelPythonSection object itself. - */ - public ModelPythonSection withBaseCondaEnvironment(String baseCondaEnvironment) { - this.baseCondaEnvironment = baseCondaEnvironment; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelSparkSection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelSparkSection.java deleted file mode 100644 index 94043c6bc10b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelSparkSection.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** The ModelSparkSection model. */ -@Fluent -public class ModelSparkSection { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ModelSparkSection.class); - - /* - * The list of spark repositories. - */ - @JsonProperty(value = "repositories") - private List repositories; - - /* - * The Spark packages to use. - */ - @JsonProperty(value = "packages") - private List packages; - - /* - * Whether to precache the packages. - */ - @JsonProperty(value = "precachePackages") - private Boolean precachePackages; - - /** - * Get the repositories property: The list of spark repositories. - * - * @return the repositories value. - */ - public List repositories() { - return this.repositories; - } - - /** - * Set the repositories property: The list of spark repositories. - * - * @param repositories the repositories value to set. - * @return the ModelSparkSection object itself. - */ - public ModelSparkSection withRepositories(List repositories) { - this.repositories = repositories; - return this; - } - - /** - * Get the packages property: The Spark packages to use. - * - * @return the packages value. - */ - public List packages() { - return this.packages; - } - - /** - * Set the packages property: The Spark packages to use. - * - * @param packages the packages value to set. - * @return the ModelSparkSection object itself. - */ - public ModelSparkSection withPackages(List packages) { - this.packages = packages; - return this; - } - - /** - * Get the precachePackages property: Whether to precache the packages. - * - * @return the precachePackages value. - */ - public Boolean precachePackages() { - return this.precachePackages; - } - - /** - * Set the precachePackages property: Whether to precache the packages. - * - * @param precachePackages the precachePackages value to set. - * @return the ModelSparkSection object itself. - */ - public ModelSparkSection withPrecachePackages(Boolean precachePackages) { - this.precachePackages = precachePackages; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (packages() != null) { - packages().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NodeState.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NodeState.java deleted file mode 100644 index 9a3c2905f35d..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NodeState.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for NodeState. */ -public final class NodeState extends ExpandableStringEnum { - /** Static value idle for NodeState. */ - public static final NodeState IDLE = fromString("idle"); - - /** Static value running for NodeState. */ - public static final NodeState RUNNING = fromString("running"); - - /** Static value preparing for NodeState. */ - public static final NodeState PREPARING = fromString("preparing"); - - /** Static value unusable for NodeState. */ - public static final NodeState UNUSABLE = fromString("unusable"); - - /** Static value leaving for NodeState. */ - public static final NodeState LEAVING = fromString("leaving"); - - /** Static value preempted for NodeState. */ - public static final NodeState PREEMPTED = fromString("preempted"); - - /** - * Creates or finds a NodeState from its string representation. - * - * @param name a name to look for. - * @return the corresponding NodeState. - */ - @JsonCreator - public static NodeState fromString(String name) { - return fromString(name, NodeState.class); - } - - /** @return known NodeState values. */ - public static Collection values() { - return values(NodeState.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NodeStateCounts.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NodeStateCounts.java deleted file mode 100644 index 65014a4dbd52..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NodeStateCounts.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Counts of various compute node states on the amlCompute. */ -@Immutable -public final class NodeStateCounts { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(NodeStateCounts.class); - - /* - * Number of compute nodes in idle state. - */ - @JsonProperty(value = "idleNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer idleNodeCount; - - /* - * Number of compute nodes which are running jobs. - */ - @JsonProperty(value = "runningNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer runningNodeCount; - - /* - * Number of compute nodes which are being prepared. - */ - @JsonProperty(value = "preparingNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer preparingNodeCount; - - /* - * Number of compute nodes which are in unusable state. - */ - @JsonProperty(value = "unusableNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer unusableNodeCount; - - /* - * Number of compute nodes which are leaving the amlCompute. - */ - @JsonProperty(value = "leavingNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer leavingNodeCount; - - /* - * Number of compute nodes which are in preempted state. - */ - @JsonProperty(value = "preemptedNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer preemptedNodeCount; - - /** - * Get the idleNodeCount property: Number of compute nodes in idle state. - * - * @return the idleNodeCount value. - */ - public Integer idleNodeCount() { - return this.idleNodeCount; - } - - /** - * Get the runningNodeCount property: Number of compute nodes which are running jobs. - * - * @return the runningNodeCount value. - */ - public Integer runningNodeCount() { - return this.runningNodeCount; - } - - /** - * Get the preparingNodeCount property: Number of compute nodes which are being prepared. - * - * @return the preparingNodeCount value. - */ - public Integer preparingNodeCount() { - return this.preparingNodeCount; - } - - /** - * Get the unusableNodeCount property: Number of compute nodes which are in unusable state. - * - * @return the unusableNodeCount value. - */ - public Integer unusableNodeCount() { - return this.unusableNodeCount; - } - - /** - * Get the leavingNodeCount property: Number of compute nodes which are leaving the amlCompute. - * - * @return the leavingNodeCount value. - */ - public Integer leavingNodeCount() { - return this.leavingNodeCount; - } - - /** - * Get the preemptedNodeCount property: Number of compute nodes which are in preempted state. - * - * @return the preemptedNodeCount value. - */ - public Integer preemptedNodeCount() { - return this.preemptedNodeCount; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NotebookAccessTokenResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NotebookAccessTokenResult.java deleted file mode 100644 index 1396768480ff..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NotebookAccessTokenResult.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookAccessTokenResultInner; - -/** An immutable client-side representation of NotebookAccessTokenResult. */ -public interface NotebookAccessTokenResult { - /** - * Gets the notebookResourceId property: The notebookResourceId property. - * - * @return the notebookResourceId value. - */ - String notebookResourceId(); - - /** - * Gets the hostname property: The hostName property. - * - * @return the hostname value. - */ - String hostname(); - - /** - * Gets the publicDns property: The publicDns property. - * - * @return the publicDns value. - */ - String publicDns(); - - /** - * Gets the accessToken property: The accessToken property. - * - * @return the accessToken value. - */ - String accessToken(); - - /** - * Gets the tokenType property: The tokenType property. - * - * @return the tokenType value. - */ - String tokenType(); - - /** - * Gets the expiresIn property: The expiresIn property. - * - * @return the expiresIn value. - */ - Integer expiresIn(); - - /** - * Gets the refreshToken property: The refreshToken property. - * - * @return the refreshToken value. - */ - String refreshToken(); - - /** - * Gets the scope property: The scope property. - * - * @return the scope value. - */ - String scope(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookAccessTokenResultInner - * object. - * - * @return the inner object. - */ - NotebookAccessTokenResultInner innerModel(); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NotebookPreparationError.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NotebookPreparationError.java deleted file mode 100644 index 240f90dad889..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NotebookPreparationError.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 NotebookPreparationError model. */ -@Fluent -public final class NotebookPreparationError { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(NotebookPreparationError.class); - - /* - * The errorMessage property. - */ - @JsonProperty(value = "errorMessage") - private String errorMessage; - - /* - * The statusCode property. - */ - @JsonProperty(value = "statusCode") - private Integer statusCode; - - /** - * Get the errorMessage property: The errorMessage property. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Set the errorMessage property: The errorMessage property. - * - * @param errorMessage the errorMessage value to set. - * @return the NotebookPreparationError object itself. - */ - public NotebookPreparationError withErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - return this; - } - - /** - * Get the statusCode property: The statusCode property. - * - * @return the statusCode value. - */ - public Integer statusCode() { - return this.statusCode; - } - - /** - * Set the statusCode property: The statusCode property. - * - * @param statusCode the statusCode value to set. - * @return the NotebookPreparationError object itself. - */ - public NotebookPreparationError withStatusCode(Integer statusCode) { - this.statusCode = statusCode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NotebookResourceInfo.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NotebookResourceInfo.java deleted file mode 100644 index bff9ff7d4ee1..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NotebookResourceInfo.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookResourceInfoInner; - -/** An immutable client-side representation of NotebookResourceInfo. */ -public interface NotebookResourceInfo { - /** - * Gets the fqdn property: The fqdn property. - * - * @return the fqdn value. - */ - String fqdn(); - - /** - * Gets the resourceId property: the data plane resourceId that used to initialize notebook component. - * - * @return the resourceId value. - */ - String resourceId(); - - /** - * Gets the notebookPreparationError property: The error that occurs when preparing notebook. - * - * @return the notebookPreparationError value. - */ - NotebookPreparationError notebookPreparationError(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookResourceInfoInner object. - * - * @return the inner object. - */ - NotebookResourceInfoInner innerModel(); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Notebooks.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Notebooks.java deleted file mode 100644 index 344fa8e143b3..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Notebooks.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Notebooks. */ -public interface Notebooks { - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - NotebookResourceInfo prepare(String resourceGroupName, String workspaceName); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - NotebookResourceInfo prepare(String resourceGroupName, String workspaceName, Context context); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ListNotebookKeysResult listKeys(String resourceGroupName, String workspaceName); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response listKeysWithResponse(String resourceGroupName, String workspaceName, - Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Operation.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Operation.java deleted file mode 100644 index fa7d0fafa7c9..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Operation.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.OperationInner; - -/** An immutable client-side representation of Operation. */ -public interface Operation { - /** - * Gets the name property: Operation name: {provider}/{resource}/{operation}. - * - * @return the name value. - */ - String name(); - - /** - * Gets the display property: Display name of operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OperationDisplay.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OperationDisplay.java deleted file mode 100644 index f31f7af5fe0f..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OperationDisplay.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 name of operation. */ -@Fluent -public final class OperationDisplay { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - - /* - * The resource provider name: Microsoft.MachineLearningExperimentation - */ - @JsonProperty(value = "provider") - private String provider; - - /* - * The resource on which the operation is performed. - */ - @JsonProperty(value = "resource") - private String resource; - - /* - * The operation that users can perform. - */ - @JsonProperty(value = "operation") - private String operation; - - /* - * The description for the operation. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Get the provider property: The resource provider name: Microsoft.MachineLearningExperimentation. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider property: The resource provider name: Microsoft.MachineLearningExperimentation. - * - * @param provider the provider value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource property: The resource on which the operation is performed. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource property: The resource on which the operation is performed. - * - * @param resource the resource value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation property: The operation that users can perform. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation property: The operation that users can perform. - * - * @param operation the operation value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the description property: The description for the operation. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description for the operation. - * - * @param description the description value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay 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/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OperationListResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OperationListResult.java deleted file mode 100644 index 5c7a462f3efc..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OperationListResult.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** An array of operations supported by the resource provider. */ -@Fluent -public final class OperationListResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(OperationListResult.class); - - /* - * List of AML workspace operations supported by the AML workspace resource - * provider. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: List of AML workspace operations supported by the AML workspace resource provider. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of AML workspace operations supported by the AML workspace resource provider. - * - * @param value the value value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult 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/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OperationName.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OperationName.java deleted file mode 100644 index cc881989d492..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OperationName.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OperationName. */ -public final class OperationName extends ExpandableStringEnum { - /** Static value Create for OperationName. */ - public static final OperationName CREATE = fromString("Create"); - - /** Static value Start for OperationName. */ - public static final OperationName START = fromString("Start"); - - /** Static value Stop for OperationName. */ - public static final OperationName STOP = fromString("Stop"); - - /** Static value Restart for OperationName. */ - public static final OperationName RESTART = fromString("Restart"); - - /** Static value Reimage for OperationName. */ - public static final OperationName REIMAGE = fromString("Reimage"); - - /** Static value Delete for OperationName. */ - public static final OperationName DELETE = fromString("Delete"); - - /** - * Creates or finds a OperationName from its string representation. - * - * @param name a name to look for. - * @return the corresponding OperationName. - */ - @JsonCreator - public static OperationName fromString(String name) { - return fromString(name, OperationName.class); - } - - /** @return known OperationName values. */ - public static Collection values() { - return values(OperationName.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OperationStatus.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OperationStatus.java deleted file mode 100644 index 2957b9b00118..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OperationStatus.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 InProgress for OperationStatus. */ - public static final OperationStatus IN_PROGRESS = fromString("InProgress"); - - /** Static value Succeeded for OperationStatus. */ - public static final OperationStatus SUCCEEDED = fromString("Succeeded"); - - /** Static value CreateFailed for OperationStatus. */ - public static final OperationStatus CREATE_FAILED = fromString("CreateFailed"); - - /** Static value StartFailed for OperationStatus. */ - public static final OperationStatus START_FAILED = fromString("StartFailed"); - - /** Static value StopFailed for OperationStatus. */ - public static final OperationStatus STOP_FAILED = fromString("StopFailed"); - - /** Static value RestartFailed for OperationStatus. */ - public static final OperationStatus RESTART_FAILED = fromString("RestartFailed"); - - /** Static value ReimageFailed for OperationStatus. */ - public static final OperationStatus REIMAGE_FAILED = fromString("ReimageFailed"); - - /** Static value DeleteFailed for OperationStatus. */ - public static final OperationStatus DELETE_FAILED = fromString("DeleteFailed"); - - /** - * Creates 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/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Operations.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Operations.java deleted file mode 100644 index 6552b8aaef2b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Operations.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of Operations. */ -public interface Operations { - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of operations supported by the resource provider. - */ - PagedIterable list(); - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of operations supported by the resource provider. - */ - PagedIterable list(Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OrderString.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OrderString.java deleted file mode 100644 index 33abdf8df224..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OrderString.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OrderString. */ -public final class OrderString extends ExpandableStringEnum { - /** Static value CreatedAtDesc for OrderString. */ - public static final OrderString CREATED_AT_DESC = fromString("CreatedAtDesc"); - - /** Static value CreatedAtAsc for OrderString. */ - public static final OrderString CREATED_AT_ASC = fromString("CreatedAtAsc"); - - /** Static value UpdatedAtDesc for OrderString. */ - public static final OrderString UPDATED_AT_DESC = fromString("UpdatedAtDesc"); - - /** Static value UpdatedAtAsc for OrderString. */ - public static final OrderString UPDATED_AT_ASC = fromString("UpdatedAtAsc"); - - /** - * Creates or finds a OrderString from its string representation. - * - * @param name a name to look for. - * @return the corresponding OrderString. - */ - @JsonCreator - public static OrderString fromString(String name) { - return fromString(name, OrderString.class); - } - - /** @return known OrderString values. */ - public static Collection values() { - return values(OrderString.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OsType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OsType.java deleted file mode 100644 index 13e7b7db821e..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OsType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OsType. */ -public final class OsType extends ExpandableStringEnum { - /** Static value Linux for OsType. */ - public static final OsType LINUX = fromString("Linux"); - - /** Static value Windows for OsType. */ - public static final OsType WINDOWS = fromString("Windows"); - - /** - * Creates or finds a OsType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OsType. - */ - @JsonCreator - public static OsType fromString(String name) { - return fromString(name, OsType.class); - } - - /** @return known OsType values. */ - public static Collection values() { - return values(OsType.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PaginatedComputeResourcesList.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PaginatedComputeResourcesList.java deleted file mode 100644 index e7735d5bebfb..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PaginatedComputeResourcesList.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Paginated list of Machine Learning compute objects wrapped in ARM resource envelope. */ -@Fluent -public final class PaginatedComputeResourcesList { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(PaginatedComputeResourcesList.class); - - /* - * An array of Machine Learning compute objects wrapped in ARM resource - * envelope. - */ - @JsonProperty(value = "value") - private List value; - - /* - * A continuation link (absolute URI) to the next page of results in the - * list. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: An array of Machine Learning compute objects wrapped in ARM resource envelope. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of Machine Learning compute objects wrapped in ARM resource envelope. - * - * @param value the value value to set. - * @return the PaginatedComputeResourcesList object itself. - */ - public PaginatedComputeResourcesList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A continuation link (absolute URI) to the next page of results in the list. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: A continuation link (absolute URI) to the next page of results in the list. - * - * @param nextLink the nextLink value to set. - * @return the PaginatedComputeResourcesList object itself. - */ - public PaginatedComputeResourcesList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PaginatedServiceList.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PaginatedServiceList.java deleted file mode 100644 index 2aa65a1b884a..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PaginatedServiceList.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ServiceResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Paginated list of Machine Learning service objects wrapped in ARM resource envelope. */ -@Immutable -public final class PaginatedServiceList { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(PaginatedServiceList.class); - - /* - * An array of Machine Learning compute objects wrapped in ARM resource - * envelope. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * A continuation link (absolute URI) to the next page of results in the - * list. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: An array of Machine Learning compute objects wrapped in ARM resource envelope. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * 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; - } - - /** - * 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/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PaginatedWorkspaceConnectionsList.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PaginatedWorkspaceConnectionsList.java deleted file mode 100644 index 3df8e5ee639c..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PaginatedWorkspaceConnectionsList.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceConnectionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Paginated list of Workspace connection objects. */ -@Fluent -public final class PaginatedWorkspaceConnectionsList { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(PaginatedWorkspaceConnectionsList.class); - - /* - * An array of Workspace connection objects. - */ - @JsonProperty(value = "value") - private List value; - - /* - * A continuation link (absolute URI) to the next page of results in the - * list. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: An array of Workspace connection objects. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of Workspace connection objects. - * - * @param value the value value to set. - * @return the PaginatedWorkspaceConnectionsList object itself. - */ - public PaginatedWorkspaceConnectionsList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A continuation link (absolute URI) to the next page of results in the list. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: A continuation link (absolute URI) to the next page of results in the list. - * - * @param nextLink the nextLink value to set. - * @return the PaginatedWorkspaceConnectionsList object itself. - */ - public PaginatedWorkspaceConnectionsList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Password.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Password.java deleted file mode 100644 index c37b360fd77b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Password.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** The Password model. */ -@Immutable -public final class Password { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(Password.class); - - /* - * The name property. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * The value property. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private String value; - - /** - * Get the name property: The name property. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the value property: The value property. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PersonalComputeInstanceSettings.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PersonalComputeInstanceSettings.java deleted file mode 100644 index 6d7967d12eba..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PersonalComputeInstanceSettings.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Settings for a personal compute instance. */ -@Fluent -public final class PersonalComputeInstanceSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(PersonalComputeInstanceSettings.class); - - /* - * A user explicitly assigned to a personal compute instance. - */ - @JsonProperty(value = "assignedUser") - private AssignedUser assignedUser; - - /** - * Get the assignedUser property: A user explicitly assigned to a personal compute instance. - * - * @return the assignedUser value. - */ - public AssignedUser assignedUser() { - return this.assignedUser; - } - - /** - * Set the assignedUser property: A user explicitly assigned to a personal compute instance. - * - * @param assignedUser the assignedUser value to set. - * @return the PersonalComputeInstanceSettings object itself. - */ - public PersonalComputeInstanceSettings withAssignedUser(AssignedUser assignedUser) { - this.assignedUser = assignedUser; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (assignedUser() != null) { - assignedUser().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpoint.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpoint.java deleted file mode 100644 index 89d6d08fa658..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpoint.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** The Private Endpoint resource. */ -@Immutable -public final class PrivateEndpoint { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(PrivateEndpoint.class); - - /* - * The ARM identifier for Private Endpoint - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * The ARM identifier for Subnet resource that private endpoint links to - */ - @JsonProperty(value = "subnetArmId", access = JsonProperty.Access.WRITE_ONLY) - private String subnetArmId; - - /** - * Get the id property: The ARM identifier for Private Endpoint. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the subnetArmId property: The ARM identifier for Subnet resource that private endpoint links to. - * - * @return the subnetArmId value. - */ - public String subnetArmId() { - return this.subnetArmId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnection.java deleted file mode 100644 index 4954912b8de4..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnection.java +++ /dev/null @@ -1,342 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.PrivateEndpointConnectionInner; -import java.util.Map; - -/** An immutable client-side representation of PrivateEndpointConnection. */ -public interface PrivateEndpointConnection { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the 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 privateEndpoint property: The resource of private end point. - * - * @return the privateEndpoint value. - */ - PrivateEndpoint privateEndpoint(); - - /** - * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the - * connection between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); - - /** - * Gets the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @return the provisioningState value. - */ - PrivateEndpointConnectionProvisioningState provisioningState(); - - /** - * Gets the identity property: The identity of the resource. - * - * @return the identity value. - */ - Identity identity(); - - /** - * Gets the sku property: The sku of the workspace. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the systemData property: Read only system data. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.PrivateEndpointConnectionInner - * object. - * - * @return the inner object. - */ - PrivateEndpointConnectionInner innerModel(); - - /** The entirety of the PrivateEndpointConnection definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** The PrivateEndpointConnection definition stages. */ - interface DefinitionStages { - /** The first stage of the PrivateEndpointConnection definition. */ - interface Blank extends WithLocation { - } - - /** The stage of the PrivateEndpointConnection definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - - /** The stage of the PrivateEndpointConnection definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the PrivateEndpointConnection definition which contains all the minimum required properties for - * the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithPrivateEndpoint, - DefinitionStages.WithPrivateLinkServiceConnectionState, DefinitionStages.WithIdentity, - DefinitionStages.WithSku { - /** - * Executes the create request. - * - * @return the created resource. - */ - PrivateEndpointConnection create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - PrivateEndpointConnection create(Context context); - } - - /** The stage of the PrivateEndpointConnection definition allowing to specify 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 PrivateEndpointConnection definition allowing to specify privateEndpoint. */ - interface WithPrivateEndpoint { - /** - * Specifies the privateEndpoint property: The resource of private end point.. - * - * @param privateEndpoint The resource of private end point. - * @return the next definition stage. - */ - WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); - } - - /** - * The stage of the PrivateEndpointConnection definition allowing to specify privateLinkServiceConnectionState. - */ - interface WithPrivateLinkServiceConnectionState { - /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. - * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. - * @return the next definition stage. - */ - WithCreate withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState); - } - - /** The stage of the PrivateEndpointConnection definition allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: The identity of the resource.. - * - * @param identity The identity of the resource. - * @return the next definition stage. - */ - WithCreate withIdentity(Identity identity); - } - - /** The stage of the PrivateEndpointConnection definition allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: The sku of the workspace.. - * - * @param sku The sku of the workspace. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - } - - /** - * Begins update for the PrivateEndpointConnection resource. - * - * @return the stage of resource update. - */ - PrivateEndpointConnection.Update update(); - - /** The template for PrivateEndpointConnection update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithPrivateEndpoint, - UpdateStages.WithPrivateLinkServiceConnectionState, UpdateStages.WithIdentity, UpdateStages.WithSku { - /** - * Executes the update request. - * - * @return the updated resource. - */ - PrivateEndpointConnection apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - PrivateEndpointConnection apply(Context context); - } - - /** The PrivateEndpointConnection update stages. */ - interface UpdateStages { - /** The stage of the PrivateEndpointConnection update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** The stage of the PrivateEndpointConnection update allowing to specify privateEndpoint. */ - interface WithPrivateEndpoint { - /** - * Specifies the privateEndpoint property: The resource of private end point.. - * - * @param privateEndpoint The resource of private end point. - * @return the next definition stage. - */ - Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); - } - - /** The stage of the PrivateEndpointConnection update allowing to specify privateLinkServiceConnectionState. */ - interface WithPrivateLinkServiceConnectionState { - /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. - * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. - * @return the next definition stage. - */ - Update withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState); - } - - /** The stage of the PrivateEndpointConnection update allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: The identity of the resource.. - * - * @param identity The identity of the resource. - * @return the next definition stage. - */ - Update withIdentity(Identity identity); - } - - /** The stage of the PrivateEndpointConnection update allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: The sku of the workspace.. - * - * @param sku The sku of the workspace. - * @return the next definition stage. - */ - Update withSku(Sku sku); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - PrivateEndpointConnection refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - PrivateEndpointConnection refresh(Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnectionProvisioningState.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnectionProvisioningState.java deleted file mode 100644 index 5ef042590e13..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnectionProvisioningState.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PrivateEndpointConnectionProvisioningState. */ -public final class PrivateEndpointConnectionProvisioningState - extends ExpandableStringEnum { - /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ - public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Creating for PrivateEndpointConnectionProvisioningState. */ - public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); - - /** Static value Deleting for PrivateEndpointConnectionProvisioningState. */ - public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); - - /** Static value Failed for PrivateEndpointConnectionProvisioningState. */ - public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); - - /** - * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointConnectionProvisioningState. - */ - @JsonCreator - public static PrivateEndpointConnectionProvisioningState fromString(String name) { - return fromString(name, PrivateEndpointConnectionProvisioningState.class); - } - - /** @return known PrivateEndpointConnectionProvisioningState values. */ - public static Collection values() { - return values(PrivateEndpointConnectionProvisioningState.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnections.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnections.java deleted file mode 100644 index 7903e735e6bc..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnections.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of PrivateEndpointConnections. */ -public interface PrivateEndpointConnections { - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. - */ - PrivateEndpointConnection get(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context); - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. - */ - PrivateEndpointConnection getById(String id); - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new PrivateEndpointConnection resource. - * - * @param name resource name. - * @return the first stage of the new PrivateEndpointConnection definition. - */ - PrivateEndpointConnection.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointServiceConnectionStatus.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointServiceConnectionStatus.java deleted file mode 100644 index 63de7ad21ed2..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointServiceConnectionStatus.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PrivateEndpointServiceConnectionStatus. */ -public final class PrivateEndpointServiceConnectionStatus - extends ExpandableStringEnum { - /** Static value Pending for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); - - /** Static value Approved for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); - - /** Static value Rejected for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); - - /** Static value Disconnected for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus DISCONNECTED = fromString("Disconnected"); - - /** Static value Timeout for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus TIMEOUT = fromString("Timeout"); - - /** - * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointServiceConnectionStatus. - */ - @JsonCreator - public static PrivateEndpointServiceConnectionStatus fromString(String name) { - return fromString(name, PrivateEndpointServiceConnectionStatus.class); - } - - /** @return known PrivateEndpointServiceConnectionStatus values. */ - public static Collection values() { - return values(PrivateEndpointServiceConnectionStatus.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResource.java deleted file mode 100644 index bfb64561f937..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResource.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** A private link resource. */ -@JsonFlatten -@Fluent -public class PrivateLinkResource extends Resource { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(PrivateLinkResource.class); - - /* - * The private link resource group id. - */ - @JsonProperty(value = "properties.groupId", access = JsonProperty.Access.WRITE_ONLY) - private String groupId; - - /* - * The private link resource required member names. - */ - @JsonProperty(value = "properties.requiredMembers", access = JsonProperty.Access.WRITE_ONLY) - private List requiredMembers; - - /* - * The private link resource Private link DNS zone name. - */ - @JsonProperty(value = "properties.requiredZoneNames") - private List requiredZoneNames; - - /* - * The identity of the resource. - */ - @JsonProperty(value = "identity") - private Identity identity; - - /* - * The sku of the workspace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * Read only system data - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - public String groupId() { - return this.groupId; - } - - /** - * Get the requiredMembers property: The private link resource required member names. - * - * @return the requiredMembers value. - */ - public List requiredMembers() { - return this.requiredMembers; - } - - /** - * Get the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @return the requiredZoneNames value. - */ - public List requiredZoneNames() { - return this.requiredZoneNames; - } - - /** - * Set the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResource object itself. - */ - public PrivateLinkResource withRequiredZoneNames(List requiredZoneNames) { - this.requiredZoneNames = requiredZoneNames; - return this; - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public Identity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the PrivateLinkResource object itself. - */ - public PrivateLinkResource withIdentity(Identity identity) { - this.identity = identity; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the PrivateLinkResource object itself. - */ - public PrivateLinkResource withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Read only system data. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public PrivateLinkResource withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public PrivateLinkResource withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResourceListResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResourceListResult.java deleted file mode 100644 index 7b9272ea375e..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResourceListResult.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.PrivateLinkResourceListResultInner; -import java.util.List; - -/** An immutable client-side representation of PrivateLinkResourceListResult. */ -public interface PrivateLinkResourceListResult { - /** - * Gets the value property: Array of private link resources. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.PrivateLinkResourceListResultInner - * object. - * - * @return the inner object. - */ - PrivateLinkResourceListResultInner innerModel(); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResources.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResources.java deleted file mode 100644 index a0841afa7482..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResources.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of PrivateLinkResources. */ -public interface PrivateLinkResources { - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace. - */ - PrivateLinkResourceListResult listByWorkspace(String resourceGroupName, String workspaceName); - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace. - */ - Response listByWorkspaceWithResponse(String resourceGroupName, String workspaceName, - Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkServiceConnectionState.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkServiceConnectionState.java deleted file mode 100644 index 4a600f57cd1c..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkServiceConnectionState.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** A collection of information about the state of the connection between service consumer and provider. */ -@Fluent -public final class PrivateLinkServiceConnectionState { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(PrivateLinkServiceConnectionState.class); - - /* - * Indicates whether the connection has been Approved/Rejected/Removed by - * the owner of the service. - */ - @JsonProperty(value = "status") - private PrivateEndpointServiceConnectionStatus status; - - /* - * The reason for approval/rejection of the connection. - */ - @JsonProperty(value = "description") - private String description; - - /* - * A message indicating if changes on the service provider require any - * updates on the consumer. - */ - @JsonProperty(value = "actionsRequired") - private String actionsRequired; - - /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @return the status value. - */ - public PrivateEndpointServiceConnectionStatus status() { - return this.status; - } - - /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @param status the status value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) { - this.status = status; - return this; - } - - /** - * Get the description property: The reason for approval/rejection of the connection. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The reason for approval/rejection of the connection. - * - * @param description the description value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @return the actionsRequired value. - */ - public String actionsRequired() { - return this.actionsRequired; - } - - /** - * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @param actionsRequired the actionsRequired value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { - this.actionsRequired = actionsRequired; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ProvisioningState.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ProvisioningState.java deleted file mode 100644 index b809c9bf6e81..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ProvisioningState.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ProvisioningState. */ -public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Unknown for ProvisioningState. */ - public static final ProvisioningState UNKNOWN = fromString("Unknown"); - - /** Static value Updating for ProvisioningState. */ - public static final ProvisioningState UPDATING = fromString("Updating"); - - /** Static value Creating for ProvisioningState. */ - public static final ProvisioningState CREATING = fromString("Creating"); - - /** Static value Deleting for ProvisioningState. */ - public static final ProvisioningState DELETING = fromString("Deleting"); - - /** Static value Succeeded for ProvisioningState. */ - public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for ProvisioningState. */ - public static final ProvisioningState FAILED = fromString("Failed"); - - /** Static value Canceled for ProvisioningState. */ - public static final ProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates or finds a ProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProvisioningState. - */ - @JsonCreator - public static ProvisioningState fromString(String name) { - return fromString(name, ProvisioningState.class); - } - - /** @return known ProvisioningState values. */ - public static Collection values() { - return values(ProvisioningState.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/QuotaBaseProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/QuotaBaseProperties.java deleted file mode 100644 index 086f3b0e6b18..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/QuotaBaseProperties.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 properties for Quota update or retrieval. */ -@Fluent -public final class QuotaBaseProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(QuotaBaseProperties.class); - - /* - * Specifies the resource ID. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Specifies the resource type. - */ - @JsonProperty(value = "type") - private String type; - - /* - * The maximum permitted quota of the resource. - */ - @JsonProperty(value = "limit") - private Long limit; - - /* - * An enum describing the unit of quota measurement. - */ - @JsonProperty(value = "unit") - private QuotaUnit unit; - - /** - * Get the id property: Specifies the resource ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Specifies the resource ID. - * - * @param id the id value to set. - * @return the QuotaBaseProperties object itself. - */ - public QuotaBaseProperties withId(String id) { - this.id = id; - return this; - } - - /** - * Get the type property: Specifies the resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Specifies the resource type. - * - * @param type the type value to set. - * @return the QuotaBaseProperties object itself. - */ - public QuotaBaseProperties withType(String type) { - this.type = type; - return this; - } - - /** - * Get the limit property: The maximum permitted quota of the resource. - * - * @return the limit value. - */ - public Long limit() { - return this.limit; - } - - /** - * Set the limit property: The maximum permitted quota of the resource. - * - * @param limit the limit value to set. - * @return the QuotaBaseProperties object itself. - */ - public QuotaBaseProperties withLimit(Long limit) { - this.limit = limit; - return this; - } - - /** - * Get the unit property: An enum describing the unit of quota measurement. - * - * @return the unit value. - */ - public QuotaUnit unit() { - return this.unit; - } - - /** - * Set the unit property: An enum describing the unit of quota measurement. - * - * @param unit the unit value to set. - * @return the QuotaBaseProperties object itself. - */ - public QuotaBaseProperties withUnit(QuotaUnit unit) { - this.unit = unit; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/QuotaUnit.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/QuotaUnit.java deleted file mode 100644 index 77b07e964ee5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/QuotaUnit.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for QuotaUnit. */ -public final class QuotaUnit extends ExpandableStringEnum { - /** Static value Count for QuotaUnit. */ - public static final QuotaUnit COUNT = fromString("Count"); - - /** - * Creates or finds a QuotaUnit from its string representation. - * - * @param name a name to look for. - * @return the corresponding QuotaUnit. - */ - @JsonCreator - public static QuotaUnit fromString(String name) { - return fromString(name, QuotaUnit.class); - } - - /** @return known QuotaUnit values. */ - public static Collection values() { - return values(QuotaUnit.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/QuotaUpdateParameters.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/QuotaUpdateParameters.java deleted file mode 100644 index 21c0efe19d2c..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/QuotaUpdateParameters.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Quota update parameters. */ -@Fluent -public final class QuotaUpdateParameters { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(QuotaUpdateParameters.class); - - /* - * The list for update quota. - */ - @JsonProperty(value = "value") - private List value; - - /* - * Region of workspace quota to be updated. - */ - @JsonProperty(value = "location") - private String location; - - /** - * Get the value property: The list for update quota. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list for update quota. - * - * @param value the value value to set. - * @return the QuotaUpdateParameters object itself. - */ - public QuotaUpdateParameters withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the location property: Region of workspace quota to be updated. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Region of workspace quota to be updated. - * - * @param location the location value to set. - * @return the QuotaUpdateParameters object itself. - */ - public QuotaUpdateParameters withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Quotas.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Quotas.java deleted file mode 100644 index ec9c7c6c57f5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Quotas.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Quotas. */ -public interface Quotas { - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota. - */ - UpdateWorkspaceQuotasResult update(String location, QuotaUpdateParameters parameters); - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota. - */ - Response updateWithResponse(String location, QuotaUpdateParameters parameters, - Context context); - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily. - */ - PagedIterable list(String location); - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily. - */ - PagedIterable list(String location, Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RCranPackage.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RCranPackage.java deleted file mode 100644 index 9a5536b8665c..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RCranPackage.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 RCranPackage model. */ -@Fluent -public final class RCranPackage { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(RCranPackage.class); - - /* - * The package name. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The repository name. - */ - @JsonProperty(value = "repository") - private String repository; - - /** - * Get the name property: The package name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The package name. - * - * @param name the name value to set. - * @return the RCranPackage object itself. - */ - public RCranPackage withName(String name) { - this.name = name; - return this; - } - - /** - * Get the repository property: The repository name. - * - * @return the repository value. - */ - public String repository() { - return this.repository; - } - - /** - * Set the repository property: The repository name. - * - * @param repository the repository value to set. - * @return the RCranPackage object itself. - */ - public RCranPackage withRepository(String repository) { - this.repository = repository; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RGitHubPackage.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RGitHubPackage.java deleted file mode 100644 index 3eac47d03870..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RGitHubPackage.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 RGitHubPackage model. */ -@Fluent -public final class RGitHubPackage { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(RGitHubPackage.class); - - /* - * Repository address in the format username/repo[/subdir][@ref|#pull]. - */ - @JsonProperty(value = "repository") - private String repository; - - /* - * Personal access token to install from a private repo - */ - @JsonProperty(value = "authToken") - private String authToken; - - /** - * Get the repository property: Repository address in the format username/repo[/subdir][@ref|#pull]. - * - * @return the repository value. - */ - public String repository() { - return this.repository; - } - - /** - * Set the repository property: Repository address in the format username/repo[/subdir][@ref|#pull]. - * - * @param repository the repository value to set. - * @return the RGitHubPackage object itself. - */ - public RGitHubPackage withRepository(String repository) { - this.repository = repository; - return this; - } - - /** - * Get the authToken property: Personal access token to install from a private repo. - * - * @return the authToken value. - */ - public String authToken() { - return this.authToken; - } - - /** - * Set the authToken property: Personal access token to install from a private repo. - * - * @param authToken the authToken value to set. - * @return the RGitHubPackage object itself. - */ - public RGitHubPackage withAuthToken(String authToken) { - this.authToken = authToken; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RGitHubPackageResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RGitHubPackageResponse.java deleted file mode 100644 index 59b8070d4345..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RGitHubPackageResponse.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 RGitHubPackageResponse model. */ -@Fluent -public final class RGitHubPackageResponse { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(RGitHubPackageResponse.class); - - /* - * Repository address in the format username/repo[/subdir][@ref|#pull]. - */ - @JsonProperty(value = "repository") - private String repository; - - /** - * Get the repository property: Repository address in the format username/repo[/subdir][@ref|#pull]. - * - * @return the repository value. - */ - public String repository() { - return this.repository; - } - - /** - * Set the repository property: Repository address in the format username/repo[/subdir][@ref|#pull]. - * - * @param repository the repository value to set. - * @return the RGitHubPackageResponse object itself. - */ - public RGitHubPackageResponse withRepository(String repository) { - this.repository = repository; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RSection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RSection.java deleted file mode 100644 index 069ca77b87d1..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RSection.java +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** The RSection model. */ -@Fluent -public class RSection { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(RSection.class); - - /* - * The version of R to be installed - */ - @JsonProperty(value = "rVersion") - private String rVersion; - - /* - * Indicates whether the environment is managed by user or by AzureML. - */ - @JsonProperty(value = "userManaged") - private Boolean userManaged; - - /* - * The Rscript path to use if an environment build is not required. - * The path specified gets used to call the user script. - */ - @JsonProperty(value = "rscriptPath") - private String rscriptPath; - - /* - * Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17" - */ - @JsonProperty(value = "snapshotDate") - private String snapshotDate; - - /* - * The CRAN packages to use. - */ - @JsonProperty(value = "cranPackages") - private List cranPackages; - - /* - * The packages directly from GitHub. - */ - @JsonProperty(value = "gitHubPackages") - private List gitHubPackages; - - /* - * The packages from custom urls. - */ - @JsonProperty(value = "customUrlPackages") - private List customUrlPackages; - - /* - * The packages from Bioconductor. - */ - @JsonProperty(value = "bioConductorPackages") - private List bioConductorPackages; - - /** - * Get the rVersion property: The version of R to be installed. - * - * @return the rVersion value. - */ - public String rVersion() { - return this.rVersion; - } - - /** - * Set the rVersion property: The version of R to be installed. - * - * @param rVersion the rVersion value to set. - * @return the RSection object itself. - */ - public RSection withRVersion(String rVersion) { - this.rVersion = rVersion; - return this; - } - - /** - * Get the userManaged property: Indicates whether the environment is managed by user or by AzureML. - * - * @return the userManaged value. - */ - public Boolean userManaged() { - return this.userManaged; - } - - /** - * Set the userManaged property: Indicates whether the environment is managed by user or by AzureML. - * - * @param userManaged the userManaged value to set. - * @return the RSection object itself. - */ - public RSection withUserManaged(Boolean userManaged) { - this.userManaged = userManaged; - return this; - } - - /** - * Get the rscriptPath property: The Rscript path to use if an environment build is not required. The path specified - * gets used to call the user script. - * - * @return the rscriptPath value. - */ - public String rscriptPath() { - return this.rscriptPath; - } - - /** - * Set the rscriptPath property: The Rscript path to use if an environment build is not required. The path specified - * gets used to call the user script. - * - * @param rscriptPath the rscriptPath value to set. - * @return the RSection object itself. - */ - public RSection withRscriptPath(String rscriptPath) { - this.rscriptPath = rscriptPath; - return this; - } - - /** - * Get the snapshotDate property: Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17". - * - * @return the snapshotDate value. - */ - public String snapshotDate() { - return this.snapshotDate; - } - - /** - * Set the snapshotDate property: Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17". - * - * @param snapshotDate the snapshotDate value to set. - * @return the RSection object itself. - */ - public RSection withSnapshotDate(String snapshotDate) { - this.snapshotDate = snapshotDate; - return this; - } - - /** - * Get the cranPackages property: The CRAN packages to use. - * - * @return the cranPackages value. - */ - public List cranPackages() { - return this.cranPackages; - } - - /** - * Set the cranPackages property: The CRAN packages to use. - * - * @param cranPackages the cranPackages value to set. - * @return the RSection object itself. - */ - public RSection withCranPackages(List cranPackages) { - this.cranPackages = cranPackages; - return this; - } - - /** - * Get the gitHubPackages property: The packages directly from GitHub. - * - * @return the gitHubPackages value. - */ - public List gitHubPackages() { - return this.gitHubPackages; - } - - /** - * Set the gitHubPackages property: The packages directly from GitHub. - * - * @param gitHubPackages the gitHubPackages value to set. - * @return the RSection object itself. - */ - public RSection withGitHubPackages(List gitHubPackages) { - this.gitHubPackages = gitHubPackages; - return this; - } - - /** - * Get the customUrlPackages property: The packages from custom urls. - * - * @return the customUrlPackages value. - */ - public List customUrlPackages() { - return this.customUrlPackages; - } - - /** - * Set the customUrlPackages property: The packages from custom urls. - * - * @param customUrlPackages the customUrlPackages value to set. - * @return the RSection object itself. - */ - public RSection withCustomUrlPackages(List customUrlPackages) { - this.customUrlPackages = customUrlPackages; - return this; - } - - /** - * Get the bioConductorPackages property: The packages from Bioconductor. - * - * @return the bioConductorPackages value. - */ - public List bioConductorPackages() { - return this.bioConductorPackages; - } - - /** - * Set the bioConductorPackages property: The packages from Bioconductor. - * - * @param bioConductorPackages the bioConductorPackages value to set. - * @return the RSection object itself. - */ - public RSection withBioConductorPackages(List bioConductorPackages) { - this.bioConductorPackages = bioConductorPackages; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (cranPackages() != null) { - cranPackages().forEach(e -> e.validate()); - } - if (gitHubPackages() != null) { - gitHubPackages().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RSectionResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RSectionResponse.java deleted file mode 100644 index 00c8e5e5ead6..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RSectionResponse.java +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** The RSectionResponse model. */ -@Fluent -public class RSectionResponse { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(RSectionResponse.class); - - /* - * The version of R to be installed - */ - @JsonProperty(value = "rVersion") - private String rVersion; - - /* - * Indicates whether the environment is managed by user or by AzureML. - */ - @JsonProperty(value = "userManaged") - private Boolean userManaged; - - /* - * The Rscript path to use if an environment build is not required. - * The path specified gets used to call the user script. - */ - @JsonProperty(value = "rscriptPath") - private String rscriptPath; - - /* - * Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17" - */ - @JsonProperty(value = "snapshotDate") - private String snapshotDate; - - /* - * The CRAN packages to use. - */ - @JsonProperty(value = "cranPackages") - private List cranPackages; - - /* - * The packages directly from GitHub. - */ - @JsonProperty(value = "gitHubPackages") - private List gitHubPackages; - - /* - * The packages from custom urls. - */ - @JsonProperty(value = "customUrlPackages") - private List customUrlPackages; - - /* - * The packages from Bioconductor. - */ - @JsonProperty(value = "bioConductorPackages") - private List bioConductorPackages; - - /** - * Get the rVersion property: The version of R to be installed. - * - * @return the rVersion value. - */ - public String rVersion() { - return this.rVersion; - } - - /** - * Set the rVersion property: The version of R to be installed. - * - * @param rVersion the rVersion value to set. - * @return the RSectionResponse object itself. - */ - public RSectionResponse withRVersion(String rVersion) { - this.rVersion = rVersion; - return this; - } - - /** - * Get the userManaged property: Indicates whether the environment is managed by user or by AzureML. - * - * @return the userManaged value. - */ - public Boolean userManaged() { - return this.userManaged; - } - - /** - * Set the userManaged property: Indicates whether the environment is managed by user or by AzureML. - * - * @param userManaged the userManaged value to set. - * @return the RSectionResponse object itself. - */ - public RSectionResponse withUserManaged(Boolean userManaged) { - this.userManaged = userManaged; - return this; - } - - /** - * Get the rscriptPath property: The Rscript path to use if an environment build is not required. The path specified - * gets used to call the user script. - * - * @return the rscriptPath value. - */ - public String rscriptPath() { - return this.rscriptPath; - } - - /** - * Set the rscriptPath property: The Rscript path to use if an environment build is not required. The path specified - * gets used to call the user script. - * - * @param rscriptPath the rscriptPath value to set. - * @return the RSectionResponse object itself. - */ - public RSectionResponse withRscriptPath(String rscriptPath) { - this.rscriptPath = rscriptPath; - return this; - } - - /** - * Get the snapshotDate property: Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17". - * - * @return the snapshotDate value. - */ - public String snapshotDate() { - return this.snapshotDate; - } - - /** - * Set the snapshotDate property: Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17". - * - * @param snapshotDate the snapshotDate value to set. - * @return the RSectionResponse object itself. - */ - public RSectionResponse withSnapshotDate(String snapshotDate) { - this.snapshotDate = snapshotDate; - return this; - } - - /** - * Get the cranPackages property: The CRAN packages to use. - * - * @return the cranPackages value. - */ - public List cranPackages() { - return this.cranPackages; - } - - /** - * Set the cranPackages property: The CRAN packages to use. - * - * @param cranPackages the cranPackages value to set. - * @return the RSectionResponse object itself. - */ - public RSectionResponse withCranPackages(List cranPackages) { - this.cranPackages = cranPackages; - return this; - } - - /** - * Get the gitHubPackages property: The packages directly from GitHub. - * - * @return the gitHubPackages value. - */ - public List gitHubPackages() { - return this.gitHubPackages; - } - - /** - * Set the gitHubPackages property: The packages directly from GitHub. - * - * @param gitHubPackages the gitHubPackages value to set. - * @return the RSectionResponse object itself. - */ - public RSectionResponse withGitHubPackages(List gitHubPackages) { - this.gitHubPackages = gitHubPackages; - return this; - } - - /** - * Get the customUrlPackages property: The packages from custom urls. - * - * @return the customUrlPackages value. - */ - public List customUrlPackages() { - return this.customUrlPackages; - } - - /** - * Set the customUrlPackages property: The packages from custom urls. - * - * @param customUrlPackages the customUrlPackages value to set. - * @return the RSectionResponse object itself. - */ - public RSectionResponse withCustomUrlPackages(List customUrlPackages) { - this.customUrlPackages = customUrlPackages; - return this; - } - - /** - * Get the bioConductorPackages property: The packages from Bioconductor. - * - * @return the bioConductorPackages value. - */ - public List bioConductorPackages() { - return this.bioConductorPackages; - } - - /** - * Set the bioConductorPackages property: The packages from Bioconductor. - * - * @param bioConductorPackages the bioConductorPackages value to set. - * @return the RSectionResponse object itself. - */ - public RSectionResponse withBioConductorPackages(List bioConductorPackages) { - this.bioConductorPackages = bioConductorPackages; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (cranPackages() != null) { - cranPackages().forEach(e -> e.validate()); - } - if (gitHubPackages() != null) { - gitHubPackages().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ReasonCode.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ReasonCode.java deleted file mode 100644 index 9931d7233a58..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ReasonCode.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ReasonCode. */ -public final class ReasonCode extends ExpandableStringEnum { - /** Static value NotSpecified for ReasonCode. */ - public static final ReasonCode NOT_SPECIFIED = fromString("NotSpecified"); - - /** Static value NotAvailableForRegion for ReasonCode. */ - public static final ReasonCode NOT_AVAILABLE_FOR_REGION = fromString("NotAvailableForRegion"); - - /** Static value NotAvailableForSubscription for ReasonCode. */ - public static final ReasonCode NOT_AVAILABLE_FOR_SUBSCRIPTION = fromString("NotAvailableForSubscription"); - - /** - * Creates or finds a ReasonCode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ReasonCode. - */ - @JsonCreator - public static ReasonCode fromString(String name) { - return fromString(name, ReasonCode.class); - } - - /** @return known ReasonCode values. */ - public static Collection values() { - return values(ReasonCode.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RegistryListCredentialsResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RegistryListCredentialsResult.java deleted file mode 100644 index cf2d92ee8c2e..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RegistryListCredentialsResult.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** The RegistryListCredentialsResult model. */ -@Fluent -public final class RegistryListCredentialsResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(RegistryListCredentialsResult.class); - - /* - * The location property. - */ - @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) - private String location; - - /* - * The username property. - */ - @JsonProperty(value = "username", access = JsonProperty.Access.WRITE_ONLY) - private String username; - - /* - * The passwords property. - */ - @JsonProperty(value = "passwords") - private List passwords; - - /** - * Get the location property: The location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Get the username property: The username property. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Get the passwords property: The passwords property. - * - * @return the passwords value. - */ - public List passwords() { - return this.passwords; - } - - /** - * Set the passwords property: The passwords property. - * - * @param passwords the passwords value to set. - * @return the RegistryListCredentialsResult object itself. - */ - public RegistryListCredentialsResult withPasswords(List passwords) { - this.passwords = passwords; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (passwords() != null) { - passwords().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RemoteLoginPortPublicAccess.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RemoteLoginPortPublicAccess.java deleted file mode 100644 index b95cf89dd767..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RemoteLoginPortPublicAccess.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for RemoteLoginPortPublicAccess. */ -public final class RemoteLoginPortPublicAccess extends ExpandableStringEnum { - /** Static value Enabled for RemoteLoginPortPublicAccess. */ - public static final RemoteLoginPortPublicAccess ENABLED = fromString("Enabled"); - - /** Static value Disabled for RemoteLoginPortPublicAccess. */ - public static final RemoteLoginPortPublicAccess DISABLED = fromString("Disabled"); - - /** Static value NotSpecified for RemoteLoginPortPublicAccess. */ - public static final RemoteLoginPortPublicAccess NOT_SPECIFIED = fromString("NotSpecified"); - - /** - * Creates or finds a RemoteLoginPortPublicAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding RemoteLoginPortPublicAccess. - */ - @JsonCreator - public static RemoteLoginPortPublicAccess fromString(String name) { - return fromString(name, RemoteLoginPortPublicAccess.class); - } - - /** @return known RemoteLoginPortPublicAccess values. */ - public static Collection values() { - return values(RemoteLoginPortPublicAccess.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceId.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceId.java deleted file mode 100644 index 939bb19c4a04..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceId.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet. */ -@Fluent -public final class ResourceId { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ResourceId.class); - - /* - * The ID of the resource - */ - @JsonProperty(value = "id", required = true) - private String id; - - /** - * Get the id property: The ID of the resource. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The ID of the resource. - * - * @param id the id value to set. - * @return the ResourceId object itself. - */ - public ResourceId withId(String id) { - this.id = id; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw logger - .logExceptionAsError(new IllegalArgumentException("Missing required property id in model ResourceId")); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceIdentityType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceIdentityType.java deleted file mode 100644 index 79f39a96ad54..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceIdentityType.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for ResourceIdentityType. */ -public enum ResourceIdentityType { - /** Enum value SystemAssigned. */ - SYSTEM_ASSIGNED("SystemAssigned"), - - /** Enum value SystemAssigned,UserAssigned. */ - SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned,UserAssigned"), - - /** Enum value UserAssigned. */ - USER_ASSIGNED("UserAssigned"), - - /** Enum value None. */ - NONE("None"); - - /** The actual serialized value for a ResourceIdentityType instance. */ - private final String value; - - ResourceIdentityType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ResourceIdentityType instance. - * - * @param value the serialized value to parse. - * @return the parsed ResourceIdentityType object, or null if unable to parse. - */ - @JsonCreator - public static ResourceIdentityType fromString(String value) { - ResourceIdentityType[] items = ResourceIdentityType.values(); - for (ResourceIdentityType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceName.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceName.java deleted file mode 100644 index 9c0de6d73307..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceName.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** The Resource Name. */ -@Immutable -public final class ResourceName { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ResourceName.class); - - /* - * The name of the resource. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private String value; - - /* - * The localized name of the resource. - */ - @JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY) - private String localizedValue; - - /** - * Get the value property: The name of the resource. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Get the localizedValue property: The localized name of the resource. - * - * @return the localizedValue value. - */ - public String localizedValue() { - return this.localizedValue; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceQuota.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceQuota.java deleted file mode 100644 index 4d49fe276b8a..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceQuota.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.ResourceQuotaInner; - -/** An immutable client-side representation of ResourceQuota. */ -public interface ResourceQuota { - /** - * Gets the id property: Specifies the resource ID. - * - * @return the id value. - */ - String id(); - - /** - * Gets the amlWorkspaceLocation property: Region of the AML workspace in the id. - * - * @return the amlWorkspaceLocation value. - */ - String amlWorkspaceLocation(); - - /** - * Gets the type property: Specifies the resource type. - * - * @return the type value. - */ - String type(); - - /** - * Gets the name property: Name of the resource. - * - * @return the name value. - */ - ResourceName name(); - - /** - * Gets the limit property: The maximum permitted quota of the resource. - * - * @return the limit value. - */ - Long limit(); - - /** - * Gets the unit property: An enum describing the unit of quota measurement. - * - * @return the unit value. - */ - QuotaUnit unit(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.ResourceQuotaInner object. - * - * @return the inner object. - */ - ResourceQuotaInner innerModel(); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceSkuLocationInfo.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceSkuLocationInfo.java deleted file mode 100644 index 042aa00f6c02..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceSkuLocationInfo.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; -import java.util.List; - -/** The ResourceSkuLocationInfo model. */ -@Immutable -public final class ResourceSkuLocationInfo { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ResourceSkuLocationInfo.class); - - /* - * Location of the SKU - */ - @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) - private String location; - - /* - * List of availability zones where the SKU is supported. - */ - @JsonProperty(value = "zones", access = JsonProperty.Access.WRITE_ONLY) - private List zones; - - /* - * Details of capabilities available to a SKU in specific zones. - */ - @JsonProperty(value = "zoneDetails", access = JsonProperty.Access.WRITE_ONLY) - private List zoneDetails; - - /** - * Get the location property: Location of the SKU. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Get the zones property: List of availability zones where the SKU is supported. - * - * @return the zones value. - */ - public List zones() { - return this.zones; - } - - /** - * Get the zoneDetails property: Details of capabilities available to a SKU in specific zones. - * - * @return the zoneDetails value. - */ - public List zoneDetails() { - return this.zoneDetails; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (zoneDetails() != null) { - zoneDetails().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceSkuZoneDetails.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceSkuZoneDetails.java deleted file mode 100644 index 9f3fef8dc6f2..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceSkuZoneDetails.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; -import java.util.List; - -/** Describes The zonal capabilities of a SKU. */ -@Immutable -public final class ResourceSkuZoneDetails { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ResourceSkuZoneDetails.class); - - /* - * The set of zones that the SKU is available in with the specified - * capabilities. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private List name; - - /* - * A list of capabilities that are available for the SKU in the specified - * list of zones. - */ - @JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY) - private List capabilities; - - /** - * Get the name property: The set of zones that the SKU is available in with the specified capabilities. - * - * @return the name value. - */ - public List name() { - return this.name; - } - - /** - * Get the capabilities property: A list of capabilities that are available for the SKU in the specified list of - * zones. - * - * @return the capabilities value. - */ - public List capabilities() { - return this.capabilities; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (capabilities() != null) { - capabilities().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Restriction.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Restriction.java deleted file mode 100644 index efe13af73bda..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Restriction.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** The restriction because of which SKU cannot be used. */ -@Fluent -public final class Restriction { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(Restriction.class); - - /* - * The type of restrictions. As of now only possible value for this is - * location. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /* - * The value of restrictions. If the restriction type is set to location. - * This would be different locations where the SKU is restricted. - */ - @JsonProperty(value = "values", access = JsonProperty.Access.WRITE_ONLY) - private List values; - - /* - * The reason for the restriction. - */ - @JsonProperty(value = "reasonCode") - private ReasonCode reasonCode; - - /** - * Get the type property: The type of restrictions. As of now only possible value for this is location. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the values property: The value of restrictions. If the restriction type is set to location. This would be - * different locations where the SKU is restricted. - * - * @return the values value. - */ - public List values() { - return this.values; - } - - /** - * Get the reasonCode property: The reason for the restriction. - * - * @return the reasonCode value. - */ - public ReasonCode reasonCode() { - return this.reasonCode; - } - - /** - * Set the reasonCode property: The reason for the restriction. - * - * @param reasonCode the reasonCode value to set. - * @return the Restriction object itself. - */ - public Restriction withReasonCode(ReasonCode reasonCode) { - this.reasonCode = reasonCode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScaleSettings.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScaleSettings.java deleted file mode 100644 index c91f00c54fcd..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScaleSettings.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.time.Duration; - -/** scale settings for AML Compute. */ -@Fluent -public final class ScaleSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ScaleSettings.class); - - /* - * Max number of nodes to use - */ - @JsonProperty(value = "maxNodeCount", required = true) - private int maxNodeCount; - - /* - * Min number of nodes to use - */ - @JsonProperty(value = "minNodeCount") - private Integer minNodeCount; - - /* - * Node Idle Time before scaling down amlCompute. This string needs to be - * in the RFC Format. - */ - @JsonProperty(value = "nodeIdleTimeBeforeScaleDown") - private Duration nodeIdleTimeBeforeScaleDown; - - /** - * Get the maxNodeCount property: Max number of nodes to use. - * - * @return the maxNodeCount value. - */ - public int maxNodeCount() { - return this.maxNodeCount; - } - - /** - * Set the maxNodeCount property: Max number of nodes to use. - * - * @param maxNodeCount the maxNodeCount value to set. - * @return the ScaleSettings object itself. - */ - public ScaleSettings withMaxNodeCount(int maxNodeCount) { - this.maxNodeCount = maxNodeCount; - return this; - } - - /** - * Get the minNodeCount property: Min number of nodes to use. - * - * @return the minNodeCount value. - */ - public Integer minNodeCount() { - return this.minNodeCount; - } - - /** - * Set the minNodeCount property: Min number of nodes to use. - * - * @param minNodeCount the minNodeCount value to set. - * @return the ScaleSettings object itself. - */ - public ScaleSettings withMinNodeCount(Integer minNodeCount) { - this.minNodeCount = minNodeCount; - return this; - } - - /** - * Get the nodeIdleTimeBeforeScaleDown property: Node Idle Time before scaling down amlCompute. This string needs to - * be in the RFC Format. - * - * @return the nodeIdleTimeBeforeScaleDown value. - */ - public Duration nodeIdleTimeBeforeScaleDown() { - return this.nodeIdleTimeBeforeScaleDown; - } - - /** - * Set the nodeIdleTimeBeforeScaleDown property: Node Idle Time before scaling down amlCompute. This string needs to - * be in the RFC Format. - * - * @param nodeIdleTimeBeforeScaleDown the nodeIdleTimeBeforeScaleDown value to set. - * @return the ScaleSettings object itself. - */ - public ScaleSettings withNodeIdleTimeBeforeScaleDown(Duration nodeIdleTimeBeforeScaleDown) { - this.nodeIdleTimeBeforeScaleDown = nodeIdleTimeBeforeScaleDown; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScriptReference.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScriptReference.java deleted file mode 100644 index c0c6b85ee436..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScriptReference.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Script reference. */ -@Fluent -public final class ScriptReference { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ScriptReference.class); - - /* - * The storage source of the script: inline, workspace. - */ - @JsonProperty(value = "scriptSource") - private String scriptSource; - - /* - * The location of scripts in the mounted volume. - */ - @JsonProperty(value = "scriptData") - private String scriptData; - - /* - * Optional command line arguments passed to the script to run. - */ - @JsonProperty(value = "scriptArguments") - private String scriptArguments; - - /* - * Optional time period passed to timeout command. - */ - @JsonProperty(value = "timeout") - private String timeout; - - /** - * Get the scriptSource property: The storage source of the script: inline, workspace. - * - * @return the scriptSource value. - */ - public String scriptSource() { - return this.scriptSource; - } - - /** - * Set the scriptSource property: The storage source of the script: inline, workspace. - * - * @param scriptSource the scriptSource value to set. - * @return the ScriptReference object itself. - */ - public ScriptReference withScriptSource(String scriptSource) { - this.scriptSource = scriptSource; - return this; - } - - /** - * Get the scriptData property: The location of scripts in the mounted volume. - * - * @return the scriptData value. - */ - public String scriptData() { - return this.scriptData; - } - - /** - * Set the scriptData property: The location of scripts in the mounted volume. - * - * @param scriptData the scriptData value to set. - * @return the ScriptReference object itself. - */ - public ScriptReference withScriptData(String scriptData) { - this.scriptData = scriptData; - return this; - } - - /** - * Get the scriptArguments property: Optional command line arguments passed to the script to run. - * - * @return the scriptArguments value. - */ - public String scriptArguments() { - return this.scriptArguments; - } - - /** - * Set the scriptArguments property: Optional command line arguments passed to the script to run. - * - * @param scriptArguments the scriptArguments value to set. - * @return the ScriptReference object itself. - */ - public ScriptReference withScriptArguments(String scriptArguments) { - this.scriptArguments = scriptArguments; - return this; - } - - /** - * Get the timeout property: Optional time period passed to timeout command. - * - * @return the timeout value. - */ - public String timeout() { - return this.timeout; - } - - /** - * Set the timeout property: Optional time period passed to timeout command. - * - * @param timeout the timeout value to set. - * @return the ScriptReference object itself. - */ - public ScriptReference withTimeout(String timeout) { - this.timeout = timeout; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScriptsToExecute.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScriptsToExecute.java deleted file mode 100644 index 64f6f5c063b7..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScriptsToExecute.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Customized setup scripts. */ -@Fluent -public final class ScriptsToExecute { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ScriptsToExecute.class); - - /* - * Script that's run every time the machine starts. - */ - @JsonProperty(value = "startupScript") - private ScriptReference startupScript; - - /* - * Script that's run only once during provision of the compute. - */ - @JsonProperty(value = "creationScript") - private ScriptReference creationScript; - - /** - * Get the startupScript property: Script that's run every time the machine starts. - * - * @return the startupScript value. - */ - public ScriptReference startupScript() { - return this.startupScript; - } - - /** - * Set the startupScript property: Script that's run every time the machine starts. - * - * @param startupScript the startupScript value to set. - * @return the ScriptsToExecute object itself. - */ - public ScriptsToExecute withStartupScript(ScriptReference startupScript) { - this.startupScript = startupScript; - return this; - } - - /** - * Get the creationScript property: Script that's run only once during provision of the compute. - * - * @return the creationScript value. - */ - public ScriptReference creationScript() { - return this.creationScript; - } - - /** - * Set the creationScript property: Script that's run only once during provision of the compute. - * - * @param creationScript the creationScript value to set. - * @return the ScriptsToExecute object itself. - */ - public ScriptsToExecute withCreationScript(ScriptReference creationScript) { - this.creationScript = creationScript; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (startupScript() != null) { - startupScript().validate(); - } - if (creationScript() != null) { - creationScript().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceManagedResourcesSettings.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceManagedResourcesSettings.java deleted file mode 100644 index 1cfc02614481..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceManagedResourcesSettings.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 ServiceManagedResourcesSettings model. */ -@Fluent -public final class ServiceManagedResourcesSettings { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ServiceManagedResourcesSettings.class); - - /* - * The settings for the service managed cosmosdb account. - */ - @JsonProperty(value = "cosmosDb") - private CosmosDbSettings cosmosDb; - - /** - * Get the cosmosDb property: The settings for the service managed cosmosdb account. - * - * @return the cosmosDb value. - */ - public CosmosDbSettings cosmosDb() { - return this.cosmosDb; - } - - /** - * Set the cosmosDb property: The settings for the service managed cosmosdb account. - * - * @param cosmosDb the cosmosDb value to set. - * @return the ServiceManagedResourcesSettings object itself. - */ - public ServiceManagedResourcesSettings withCosmosDb(CosmosDbSettings cosmosDb) { - this.cosmosDb = cosmosDb; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (cosmosDb() != null) { - cosmosDb().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResource.java deleted file mode 100644 index 001953006490..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResource.java +++ /dev/null @@ -1,320 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ServiceResourceInner; -import java.util.Map; - -/** An immutable client-side representation of ServiceResource. */ -public interface ServiceResource { - /** - * 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 properties property: Service properties. - * - * @return the properties value. - */ - ServiceResponseBase properties(); - - /** - * Gets the identity property: The identity of the resource. - * - * @return the identity value. - */ - Identity identity(); - - /** - * Gets the sku property: The sku of the workspace. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the systemData property: Read only system data. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.ServiceResourceInner object. - * - * @return the inner object. - */ - ServiceResourceInner innerModel(); - - /** The entirety of the ServiceResource definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** The ServiceResource definition stages. */ - interface DefinitionStages { - /** The first stage of the ServiceResource definition. */ - interface Blank extends WithParentResource { - } - - /** The stage of the ServiceResource definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the ServiceResource definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithLocation, DefinitionStages.WithDescription, DefinitionStages.WithKvTags, - DefinitionStages.WithProperties, DefinitionStages.WithKeys, DefinitionStages.WithEnvironmentImageRequest { - /** - * Executes the create request. - * - * @return the created resource. - */ - ServiceResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ServiceResource create(Context context); - } - - /** The stage of the ServiceResource definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The name of the Azure location/region. - * @return the next definition stage. - */ - WithCreate withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The name of the Azure location/region. - * @return the next definition stage. - */ - WithCreate withRegion(String location); - } - - /** The stage of the ServiceResource definition allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: The description of the service.. - * - * @param description The description of the service. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - - /** The stage of the ServiceResource definition allowing to specify kvTags. */ - interface WithKvTags { - /** - * Specifies the kvTags property: The service tag dictionary. Tags are mutable.. - * - * @param kvTags The service tag dictionary. Tags are mutable. - * @return the next definition stage. - */ - WithCreate withKvTags(Map kvTags); - } - - /** The stage of the ServiceResource definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: The service properties dictionary. Properties are immutable.. - * - * @param properties The service properties dictionary. Properties are immutable. - * @return the next definition stage. - */ - WithCreate withProperties(Map properties); - } - - /** The stage of the ServiceResource definition allowing to specify keys. */ - interface WithKeys { - /** - * Specifies the keys property: The authentication keys.. - * - * @param keys The authentication keys. - * @return the next definition stage. - */ - WithCreate withKeys(CreateServiceRequestKeys keys); - } - - /** The stage of the ServiceResource definition allowing to specify environmentImageRequest. */ - interface WithEnvironmentImageRequest { - /** - * Specifies the environmentImageRequest property: The Environment, models and assets needed for - * inferencing.. - * - * @param environmentImageRequest The Environment, models and assets needed for inferencing. - * @return the next definition stage. - */ - WithCreate withEnvironmentImageRequest(CreateServiceRequestEnvironmentImageRequest environmentImageRequest); - } - } - - /** - * Begins update for the ServiceResource resource. - * - * @return the stage of resource update. - */ - ServiceResource.Update update(); - - /** The template for ServiceResource update. */ - interface Update extends UpdateStages.WithDescription, UpdateStages.WithKvTags, UpdateStages.WithProperties, - UpdateStages.WithKeys, UpdateStages.WithEnvironmentImageRequest { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ServiceResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ServiceResource apply(Context context); - } - - /** The ServiceResource update stages. */ - interface UpdateStages { - /** The stage of the ServiceResource update allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: The description of the service.. - * - * @param description The description of the service. - * @return the next definition stage. - */ - Update withDescription(String description); - } - - /** The stage of the ServiceResource update allowing to specify kvTags. */ - interface WithKvTags { - /** - * Specifies the kvTags property: The service tag dictionary. Tags are mutable.. - * - * @param kvTags The service tag dictionary. Tags are mutable. - * @return the next definition stage. - */ - Update withKvTags(Map kvTags); - } - - /** The stage of the ServiceResource update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: The service properties dictionary. Properties are immutable.. - * - * @param properties The service properties dictionary. Properties are immutable. - * @return the next definition stage. - */ - Update withProperties(Map properties); - } - - /** The stage of the ServiceResource update allowing to specify keys. */ - interface WithKeys { - /** - * Specifies the keys property: The authentication keys.. - * - * @param keys The authentication keys. - * @return the next definition stage. - */ - Update withKeys(CreateServiceRequestKeys keys); - } - - /** The stage of the ServiceResource update allowing to specify environmentImageRequest. */ - interface WithEnvironmentImageRequest { - /** - * Specifies the environmentImageRequest property: The Environment, models and assets needed for - * inferencing.. - * - * @param environmentImageRequest The Environment, models and assets needed for inferencing. - * @return the next definition stage. - */ - Update withEnvironmentImageRequest(CreateServiceRequestEnvironmentImageRequest environmentImageRequest); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ServiceResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ServiceResource refresh(Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResponseBase.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResponseBase.java deleted file mode 100644 index 4bd48fbb9406..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResponseBase.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** - * The base service response. The correct inherited response based on computeType will be returned (ex. - * ACIServiceResponse). - */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "computeType", - defaultImpl = ServiceResponseBase.class) -@JsonTypeName("ServiceResponseBase") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "ACI", value = AciServiceResponse.class), - @JsonSubTypes.Type(name = "Custom", value = AksVariantResponse.class) }) -@Fluent -public class ServiceResponseBase { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ServiceResponseBase.class); - - /* - * The service description. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The service tag dictionary. Tags are mutable. - */ - @JsonProperty(value = "kvTags") - private Map kvTags; - - /* - * The service property dictionary. Properties are immutable. - */ - @JsonProperty(value = "properties") - private Map properties; - - /* - * The current state of the service. - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private WebServiceState state; - - /* - * The error details. - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private ServiceResponseBaseError error; - - /* - * The deployment type for the service. - */ - @JsonProperty(value = "deploymentType") - private DeploymentType deploymentType; - - /** - * Get the description property: The service description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The service description. - * - * @param description the description value to set. - * @return the ServiceResponseBase object itself. - */ - public ServiceResponseBase withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the kvTags property: The service tag dictionary. Tags are mutable. - * - * @return the kvTags value. - */ - public Map kvTags() { - return this.kvTags; - } - - /** - * Set the kvTags property: The service tag dictionary. Tags are mutable. - * - * @param kvTags the kvTags value to set. - * @return the ServiceResponseBase object itself. - */ - public ServiceResponseBase withKvTags(Map kvTags) { - this.kvTags = kvTags; - return this; - } - - /** - * Get the properties property: The service property dictionary. Properties are immutable. - * - * @return the properties value. - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties property: The service property dictionary. Properties are immutable. - * - * @param properties the properties value to set. - * @return the ServiceResponseBase object itself. - */ - public ServiceResponseBase withProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Get the state property: The current state of the service. - * - * @return the state value. - */ - public WebServiceState state() { - return this.state; - } - - /** - * Get the error property: The error details. - * - * @return the error value. - */ - public ServiceResponseBaseError error() { - return this.error; - } - - /** - * Get the deploymentType property: The deployment type for the service. - * - * @return the deploymentType value. - */ - public DeploymentType deploymentType() { - return this.deploymentType; - } - - /** - * Set the deploymentType property: The deployment type for the service. - * - * @param deploymentType the deploymentType value to set. - * @return the ServiceResponseBase object itself. - */ - public ServiceResponseBase withDeploymentType(DeploymentType deploymentType) { - this.deploymentType = deploymentType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (error() != null) { - error().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResponseBaseError.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResponseBaseError.java deleted file mode 100644 index b748c4719c26..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResponseBaseError.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The error details. */ -@Immutable -public final class ServiceResponseBaseError extends ManagementError { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ServiceResponseBaseError.class); - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SetupScripts.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SetupScripts.java deleted file mode 100644 index a2cb4f463335..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SetupScripts.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Details of customized scripts to execute for setting up the cluster. */ -@Fluent -public final class SetupScripts { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SetupScripts.class); - - /* - * Customized setup scripts - */ - @JsonProperty(value = "scripts") - private ScriptsToExecute scripts; - - /** - * Get the scripts property: Customized setup scripts. - * - * @return the scripts value. - */ - public ScriptsToExecute scripts() { - return this.scripts; - } - - /** - * Set the scripts property: Customized setup scripts. - * - * @param scripts the scripts value to set. - * @return the SetupScripts object itself. - */ - public SetupScripts withScripts(ScriptsToExecute scripts) { - this.scripts = scripts; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scripts() != null) { - scripts().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SharedPrivateLinkResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SharedPrivateLinkResource.java deleted file mode 100644 index f88984be7be7..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SharedPrivateLinkResource.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The SharedPrivateLinkResource model. */ -@JsonFlatten -@Fluent -public class SharedPrivateLinkResource { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SharedPrivateLinkResource.class); - - /* - * Unique name of the private link. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The resource id that private link links to. - */ - @JsonProperty(value = "properties.privateLinkResourceId") - private String privateLinkResourceId; - - /* - * The private link resource group id. - */ - @JsonProperty(value = "properties.groupId") - private String groupId; - - /* - * Request message. - */ - @JsonProperty(value = "properties.requestMessage") - private String requestMessage; - - /* - * Indicates whether the connection has been Approved/Rejected/Removed by - * the owner of the service. - */ - @JsonProperty(value = "properties.status") - private PrivateEndpointServiceConnectionStatus status; - - /** - * Get the name property: Unique name of the private link. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Unique name of the private link. - * - * @param name the name value to set. - * @return the SharedPrivateLinkResource object itself. - */ - public SharedPrivateLinkResource withName(String name) { - this.name = name; - return this; - } - - /** - * Get the privateLinkResourceId property: The resource id that private link links to. - * - * @return the privateLinkResourceId value. - */ - public String privateLinkResourceId() { - return this.privateLinkResourceId; - } - - /** - * Set the privateLinkResourceId property: The resource id that private link links to. - * - * @param privateLinkResourceId the privateLinkResourceId value to set. - * @return the SharedPrivateLinkResource object itself. - */ - public SharedPrivateLinkResource withPrivateLinkResourceId(String privateLinkResourceId) { - this.privateLinkResourceId = privateLinkResourceId; - return this; - } - - /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - public String groupId() { - return this.groupId; - } - - /** - * Set the groupId property: The private link resource group id. - * - * @param groupId the groupId value to set. - * @return the SharedPrivateLinkResource object itself. - */ - public SharedPrivateLinkResource withGroupId(String groupId) { - this.groupId = groupId; - return this; - } - - /** - * Get the requestMessage property: Request message. - * - * @return the requestMessage value. - */ - public String requestMessage() { - return this.requestMessage; - } - - /** - * Set the requestMessage property: Request message. - * - * @param requestMessage the requestMessage value to set. - * @return the SharedPrivateLinkResource object itself. - */ - public SharedPrivateLinkResource withRequestMessage(String requestMessage) { - this.requestMessage = requestMessage; - return this; - } - - /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @return the status value. - */ - public PrivateEndpointServiceConnectionStatus status() { - return this.status; - } - - /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @param status the status value to set. - * @return the SharedPrivateLinkResource object itself. - */ - public SharedPrivateLinkResource withStatus(PrivateEndpointServiceConnectionStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Sku.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Sku.java deleted file mode 100644 index 10aa20d5ff5f..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Sku.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Sku of the resource. */ -@Fluent -public final class Sku { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(Sku.class); - - /* - * Name of the sku - */ - @JsonProperty(value = "name") - private String name; - - /* - * Tier of the sku like Basic or Enterprise - */ - @JsonProperty(value = "tier") - private String tier; - - /** - * Get the name property: Name of the sku. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the sku. - * - * @param name the name value to set. - * @return the Sku object itself. - */ - public Sku withName(String name) { - this.name = name; - return this; - } - - /** - * Get the tier property: Tier of the sku like Basic or Enterprise. - * - * @return the tier value. - */ - public String tier() { - return this.tier; - } - - /** - * Set the tier property: Tier of the sku like Basic or Enterprise. - * - * @param tier the tier value to set. - * @return the Sku object itself. - */ - public Sku withTier(String tier) { - this.tier = tier; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SkuCapability.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SkuCapability.java deleted file mode 100644 index 179e313ca1e1..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SkuCapability.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Features/user capabilities associated with the sku. */ -@Fluent -public final class SkuCapability { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SkuCapability.class); - - /* - * Capability/Feature ID - */ - @JsonProperty(value = "name") - private String name; - - /* - * Details about the feature/capability - */ - @JsonProperty(value = "value") - private String value; - - /** - * Get the name property: Capability/Feature ID. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Capability/Feature ID. - * - * @param name the name value to set. - * @return the SkuCapability object itself. - */ - public SkuCapability withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: Details about the feature/capability. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Details about the feature/capability. - * - * @param value the value value to set. - * @return the SkuCapability object itself. - */ - public SkuCapability withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SkuListResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SkuListResult.java deleted file mode 100644 index 40de47b09258..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SkuListResult.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceSkuInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of skus with features. */ -@Fluent -public final class SkuListResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SkuListResult.class); - - /* - * The value property. - */ - @JsonProperty(value = "value") - private List value; - - /* - * The URI to fetch the next page of Workspace Skus. Call ListNext() with - * this URI to fetch the next page of Workspace Skus - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: The value property. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the SkuListResult object itself. - */ - public SkuListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URI to fetch the next page of Workspace Skus. Call ListNext() with this URI to - * fetch the next page of Workspace Skus. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The URI to fetch the next page of Workspace Skus. Call ListNext() with this URI to - * fetch the next page of Workspace Skus. - * - * @param nextLink the nextLink value to set. - * @return the SkuListResult object itself. - */ - public SkuListResult 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/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SparkMavenPackage.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SparkMavenPackage.java deleted file mode 100644 index e1fc4ff58688..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SparkMavenPackage.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 SparkMavenPackage model. */ -@Fluent -public final class SparkMavenPackage { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SparkMavenPackage.class); - - /* - * The group property. - */ - @JsonProperty(value = "group") - private String group; - - /* - * The artifact property. - */ - @JsonProperty(value = "artifact") - private String artifact; - - /* - * The version property. - */ - @JsonProperty(value = "version") - private String version; - - /** - * Get the group property: The group property. - * - * @return the group value. - */ - public String group() { - return this.group; - } - - /** - * Set the group property: The group property. - * - * @param group the group value to set. - * @return the SparkMavenPackage object itself. - */ - public SparkMavenPackage withGroup(String group) { - this.group = group; - return this; - } - - /** - * Get the artifact property: The artifact property. - * - * @return the artifact value. - */ - public String artifact() { - return this.artifact; - } - - /** - * Set the artifact property: The artifact property. - * - * @param artifact the artifact value to set. - * @return the SparkMavenPackage object itself. - */ - public SparkMavenPackage withArtifact(String artifact) { - this.artifact = artifact; - return this; - } - - /** - * Get the version property: The version property. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: The version property. - * - * @param version the version value to set. - * @return the SparkMavenPackage object itself. - */ - public SparkMavenPackage withVersion(String version) { - this.version = version; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SshPublicAccess.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SshPublicAccess.java deleted file mode 100644 index 24403e44b926..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SshPublicAccess.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SshPublicAccess. */ -public final class SshPublicAccess extends ExpandableStringEnum { - /** Static value Enabled for SshPublicAccess. */ - public static final SshPublicAccess ENABLED = fromString("Enabled"); - - /** Static value Disabled for SshPublicAccess. */ - public static final SshPublicAccess DISABLED = fromString("Disabled"); - - /** - * Creates or finds a SshPublicAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding SshPublicAccess. - */ - @JsonCreator - public static SshPublicAccess fromString(String name) { - return fromString(name, SshPublicAccess.class); - } - - /** @return known SshPublicAccess values. */ - public static Collection values() { - return values(SshPublicAccess.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SslConfiguration.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SslConfiguration.java deleted file mode 100644 index 73ce6a852952..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SslConfiguration.java +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 ssl configuration for scoring. */ -@Fluent -public final class SslConfiguration { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SslConfiguration.class); - - /* - * Enable or disable ssl for scoring - */ - @JsonProperty(value = "status") - private SslConfigurationStatus status; - - /* - * Cert data - */ - @JsonProperty(value = "cert") - private String cert; - - /* - * Key data - */ - @JsonProperty(value = "key") - private String key; - - /* - * CNAME of the cert - */ - @JsonProperty(value = "cname") - private String cname; - - /* - * Leaf domain label of public endpoint - */ - @JsonProperty(value = "leafDomainLabel") - private String leafDomainLabel; - - /* - * Indicates whether to overwrite existing domain label. - */ - @JsonProperty(value = "overwriteExistingDomain") - private Boolean overwriteExistingDomain; - - /** - * Get the status property: Enable or disable ssl for scoring. - * - * @return the status value. - */ - public SslConfigurationStatus status() { - return this.status; - } - - /** - * Set the status property: Enable or disable ssl for scoring. - * - * @param status the status value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withStatus(SslConfigurationStatus status) { - this.status = status; - return this; - } - - /** - * Get the cert property: Cert data. - * - * @return the cert value. - */ - public String cert() { - return this.cert; - } - - /** - * Set the cert property: Cert data. - * - * @param cert the cert value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withCert(String cert) { - this.cert = cert; - return this; - } - - /** - * Get the key property: Key data. - * - * @return the key value. - */ - public String key() { - return this.key; - } - - /** - * Set the key property: Key data. - * - * @param key the key value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withKey(String key) { - this.key = key; - return this; - } - - /** - * Get the cname property: CNAME of the cert. - * - * @return the cname value. - */ - public String cname() { - return this.cname; - } - - /** - * Set the cname property: CNAME of the cert. - * - * @param cname the cname value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withCname(String cname) { - this.cname = cname; - return this; - } - - /** - * Get the leafDomainLabel property: Leaf domain label of public endpoint. - * - * @return the leafDomainLabel value. - */ - public String leafDomainLabel() { - return this.leafDomainLabel; - } - - /** - * Set the leafDomainLabel property: Leaf domain label of public endpoint. - * - * @param leafDomainLabel the leafDomainLabel value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withLeafDomainLabel(String leafDomainLabel) { - this.leafDomainLabel = leafDomainLabel; - return this; - } - - /** - * Get the overwriteExistingDomain property: Indicates whether to overwrite existing domain label. - * - * @return the overwriteExistingDomain value. - */ - public Boolean overwriteExistingDomain() { - return this.overwriteExistingDomain; - } - - /** - * Set the overwriteExistingDomain property: Indicates whether to overwrite existing domain label. - * - * @param overwriteExistingDomain the overwriteExistingDomain value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withOverwriteExistingDomain(Boolean overwriteExistingDomain) { - this.overwriteExistingDomain = overwriteExistingDomain; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SslConfigurationStatus.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SslConfigurationStatus.java deleted file mode 100644 index ae0426df8885..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SslConfigurationStatus.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SslConfigurationStatus. */ -public final class SslConfigurationStatus extends ExpandableStringEnum { - /** Static value Disabled for SslConfigurationStatus. */ - public static final SslConfigurationStatus DISABLED = fromString("Disabled"); - - /** Static value Enabled for SslConfigurationStatus. */ - public static final SslConfigurationStatus ENABLED = fromString("Enabled"); - - /** Static value Auto for SslConfigurationStatus. */ - public static final SslConfigurationStatus AUTO = fromString("Auto"); - - /** - * Creates or finds a SslConfigurationStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding SslConfigurationStatus. - */ - @JsonCreator - public static SslConfigurationStatus fromString(String name) { - return fromString(name, SslConfigurationStatus.class); - } - - /** @return known SslConfigurationStatus values. */ - public static Collection values() { - return values(SslConfigurationStatus.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Status.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Status.java deleted file mode 100644 index 3f402488d0d1..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Status.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 Undefined for Status. */ - public static final Status UNDEFINED = fromString("Undefined"); - - /** Static value Success for Status. */ - public static final Status SUCCESS = fromString("Success"); - - /** Static value Failure for Status. */ - public static final Status FAILURE = fromString("Failure"); - - /** Static value InvalidQuotaBelowClusterMinimum for Status. */ - public static final Status INVALID_QUOTA_BELOW_CLUSTER_MINIMUM = fromString("InvalidQuotaBelowClusterMinimum"); - - /** Static value InvalidQuotaExceedsSubscriptionLimit for Status. */ - public static final Status INVALID_QUOTA_EXCEEDS_SUBSCRIPTION_LIMIT - = fromString("InvalidQuotaExceedsSubscriptionLimit"); - - /** Static value InvalidVMFamilyName for Status. */ - public static final Status INVALID_VMFAMILY_NAME = fromString("InvalidVMFamilyName"); - - /** Static value OperationNotSupportedForSku for Status. */ - public static final Status OPERATION_NOT_SUPPORTED_FOR_SKU = fromString("OperationNotSupportedForSku"); - - /** Static value OperationNotEnabledForRegion for Status. */ - public static final Status OPERATION_NOT_ENABLED_FOR_REGION = fromString("OperationNotEnabledForRegion"); - - /** - * Creates 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/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/StorageAccounts.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/StorageAccounts.java deleted file mode 100644 index ae2778875caf..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/StorageAccounts.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of StorageAccounts. */ -public interface StorageAccounts { - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ListStorageAccountKeysResult listKeys(String resourceGroupName, String workspaceName); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response listKeysWithResponse(String resourceGroupName, String workspaceName, - Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SynapseSpark.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SynapseSpark.java deleted file mode 100644 index 516614c971f5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SynapseSpark.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A SynapseSpark compute. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("SynapseSpark") -@Fluent -public final class SynapseSpark extends Compute { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SynapseSpark.class); - - /* - * AKS properties - */ - @JsonProperty(value = "properties") - private SynapseSparkPoolPropertiesAutoGenerated properties; - - /** - * Get the properties property: AKS properties. - * - * @return the properties value. - */ - public SynapseSparkPoolPropertiesAutoGenerated properties() { - return this.properties; - } - - /** - * Set the properties property: AKS properties. - * - * @param properties the properties value to set. - * @return the SynapseSpark object itself. - */ - public SynapseSpark withProperties(SynapseSparkPoolPropertiesAutoGenerated properties) { - this.properties = properties; - return this; - } - - /** {@inheritDoc} */ - @Override - public SynapseSpark withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public SynapseSpark withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public SynapseSpark withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public SynapseSpark withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SynapseSparkPoolProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SynapseSparkPoolProperties.java deleted file mode 100644 index d33376f50075..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SynapseSparkPoolProperties.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 specific to Synapse Spark pools. */ -@Fluent -public class SynapseSparkPoolProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SynapseSparkPoolProperties.class); - - /* - * AKS properties - */ - @JsonProperty(value = "properties") - private SynapseSparkPoolPropertiesAutoGenerated properties; - - /** - * Get the properties property: AKS properties. - * - * @return the properties value. - */ - public SynapseSparkPoolPropertiesAutoGenerated properties() { - return this.properties; - } - - /** - * Set the properties property: AKS properties. - * - * @param properties the properties value to set. - * @return the SynapseSparkPoolProperties object itself. - */ - public SynapseSparkPoolProperties withProperties(SynapseSparkPoolPropertiesAutoGenerated properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SynapseSparkPoolPropertiesAutoGenerated.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SynapseSparkPoolPropertiesAutoGenerated.java deleted file mode 100644 index 9bd08d2a9f87..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SynapseSparkPoolPropertiesAutoGenerated.java +++ /dev/null @@ -1,291 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** AKS properties. */ -@Fluent -public final class SynapseSparkPoolPropertiesAutoGenerated { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SynapseSparkPoolPropertiesAutoGenerated.class); - - /* - * Auto scale properties. - */ - @JsonProperty(value = "autoScaleProperties") - private AutoScaleProperties autoScaleProperties; - - /* - * Auto pause properties. - */ - @JsonProperty(value = "autoPauseProperties") - private AutoPauseProperties autoPauseProperties; - - /* - * Spark version. - */ - @JsonProperty(value = "sparkVersion") - private String sparkVersion; - - /* - * The number of compute nodes currently assigned to the compute. - */ - @JsonProperty(value = "nodeCount") - private Integer nodeCount; - - /* - * Node size. - */ - @JsonProperty(value = "nodeSize") - private String nodeSize; - - /* - * Node size family. - */ - @JsonProperty(value = "nodeSizeFamily") - private String nodeSizeFamily; - - /* - * Azure subscription identifier. - */ - @JsonProperty(value = "subscriptionId") - private String subscriptionId; - - /* - * Name of the resource group in which workspace is located. - */ - @JsonProperty(value = "resourceGroup") - private String resourceGroup; - - /* - * Name of Azure Machine Learning workspace. - */ - @JsonProperty(value = "workspaceName") - private String workspaceName; - - /* - * Pool name. - */ - @JsonProperty(value = "poolName") - private String poolName; - - /** - * Get the autoScaleProperties property: Auto scale properties. - * - * @return the autoScaleProperties value. - */ - public AutoScaleProperties autoScaleProperties() { - return this.autoScaleProperties; - } - - /** - * Set the autoScaleProperties property: Auto scale properties. - * - * @param autoScaleProperties the autoScaleProperties value to set. - * @return the SynapseSparkPoolPropertiesAutoGenerated object itself. - */ - public SynapseSparkPoolPropertiesAutoGenerated withAutoScaleProperties(AutoScaleProperties autoScaleProperties) { - this.autoScaleProperties = autoScaleProperties; - return this; - } - - /** - * Get the autoPauseProperties property: Auto pause properties. - * - * @return the autoPauseProperties value. - */ - public AutoPauseProperties autoPauseProperties() { - return this.autoPauseProperties; - } - - /** - * Set the autoPauseProperties property: Auto pause properties. - * - * @param autoPauseProperties the autoPauseProperties value to set. - * @return the SynapseSparkPoolPropertiesAutoGenerated object itself. - */ - public SynapseSparkPoolPropertiesAutoGenerated withAutoPauseProperties(AutoPauseProperties autoPauseProperties) { - this.autoPauseProperties = autoPauseProperties; - return this; - } - - /** - * Get the sparkVersion property: Spark version. - * - * @return the sparkVersion value. - */ - public String sparkVersion() { - return this.sparkVersion; - } - - /** - * Set the sparkVersion property: Spark version. - * - * @param sparkVersion the sparkVersion value to set. - * @return the SynapseSparkPoolPropertiesAutoGenerated object itself. - */ - public SynapseSparkPoolPropertiesAutoGenerated withSparkVersion(String sparkVersion) { - this.sparkVersion = sparkVersion; - return this; - } - - /** - * Get the nodeCount property: The number of compute nodes currently assigned to the compute. - * - * @return the nodeCount value. - */ - public Integer nodeCount() { - return this.nodeCount; - } - - /** - * Set the nodeCount property: The number of compute nodes currently assigned to the compute. - * - * @param nodeCount the nodeCount value to set. - * @return the SynapseSparkPoolPropertiesAutoGenerated object itself. - */ - public SynapseSparkPoolPropertiesAutoGenerated withNodeCount(Integer nodeCount) { - this.nodeCount = nodeCount; - return this; - } - - /** - * Get the nodeSize property: Node size. - * - * @return the nodeSize value. - */ - public String nodeSize() { - return this.nodeSize; - } - - /** - * Set the nodeSize property: Node size. - * - * @param nodeSize the nodeSize value to set. - * @return the SynapseSparkPoolPropertiesAutoGenerated object itself. - */ - public SynapseSparkPoolPropertiesAutoGenerated withNodeSize(String nodeSize) { - this.nodeSize = nodeSize; - return this; - } - - /** - * Get the nodeSizeFamily property: Node size family. - * - * @return the nodeSizeFamily value. - */ - public String nodeSizeFamily() { - return this.nodeSizeFamily; - } - - /** - * Set the nodeSizeFamily property: Node size family. - * - * @param nodeSizeFamily the nodeSizeFamily value to set. - * @return the SynapseSparkPoolPropertiesAutoGenerated object itself. - */ - public SynapseSparkPoolPropertiesAutoGenerated withNodeSizeFamily(String nodeSizeFamily) { - this.nodeSizeFamily = nodeSizeFamily; - return this; - } - - /** - * Get the subscriptionId property: Azure subscription identifier. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure subscription identifier. - * - * @param subscriptionId the subscriptionId value to set. - * @return the SynapseSparkPoolPropertiesAutoGenerated object itself. - */ - public SynapseSparkPoolPropertiesAutoGenerated withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroup property: Name of the resource group in which workspace is located. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup property: Name of the resource group in which workspace is located. - * - * @param resourceGroup the resourceGroup value to set. - * @return the SynapseSparkPoolPropertiesAutoGenerated object itself. - */ - public SynapseSparkPoolPropertiesAutoGenerated withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - - /** - * Get the workspaceName property: Name of Azure Machine Learning workspace. - * - * @return the workspaceName value. - */ - public String workspaceName() { - return this.workspaceName; - } - - /** - * Set the workspaceName property: Name of Azure Machine Learning workspace. - * - * @param workspaceName the workspaceName value to set. - * @return the SynapseSparkPoolPropertiesAutoGenerated object itself. - */ - public SynapseSparkPoolPropertiesAutoGenerated withWorkspaceName(String workspaceName) { - this.workspaceName = workspaceName; - return this; - } - - /** - * Get the poolName property: Pool name. - * - * @return the poolName value. - */ - public String poolName() { - return this.poolName; - } - - /** - * Set the poolName property: Pool name. - * - * @param poolName the poolName value to set. - * @return the SynapseSparkPoolPropertiesAutoGenerated object itself. - */ - public SynapseSparkPoolPropertiesAutoGenerated withPoolName(String poolName) { - this.poolName = poolName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (autoScaleProperties() != null) { - autoScaleProperties().validate(); - } - if (autoPauseProperties() != null) { - autoPauseProperties().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SystemService.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SystemService.java deleted file mode 100644 index dde366cfc74b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SystemService.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** A system service running on a compute. */ -@Immutable -public final class SystemService { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SystemService.class); - - /* - * The type of this system service. - */ - @JsonProperty(value = "systemServiceType", access = JsonProperty.Access.WRITE_ONLY) - private String systemServiceType; - - /* - * Public IP address - */ - @JsonProperty(value = "publicIpAddress", access = JsonProperty.Access.WRITE_ONLY) - private String publicIpAddress; - - /* - * The version for this type. - */ - @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) - private String version; - - /** - * Get the systemServiceType property: The type of this system service. - * - * @return the systemServiceType value. - */ - public String systemServiceType() { - return this.systemServiceType; - } - - /** - * Get the publicIpAddress property: Public IP address. - * - * @return the publicIpAddress value. - */ - public String publicIpAddress() { - return this.publicIpAddress; - } - - /** - * Get the version property: The version for this type. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UnderlyingResourceAction.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UnderlyingResourceAction.java deleted file mode 100644 index ed2a28becd3e..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UnderlyingResourceAction.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for UnderlyingResourceAction. */ -public final class UnderlyingResourceAction extends ExpandableStringEnum { - /** Static value Delete for UnderlyingResourceAction. */ - public static final UnderlyingResourceAction DELETE = fromString("Delete"); - - /** Static value Detach for UnderlyingResourceAction. */ - public static final UnderlyingResourceAction DETACH = fromString("Detach"); - - /** - * Creates or finds a UnderlyingResourceAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding UnderlyingResourceAction. - */ - @JsonCreator - public static UnderlyingResourceAction fromString(String name) { - return fromString(name, UnderlyingResourceAction.class); - } - - /** @return known UnderlyingResourceAction values. */ - public static Collection values() { - return values(UnderlyingResourceAction.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UnitOfMeasure.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UnitOfMeasure.java deleted file mode 100644 index ea58f459588d..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UnitOfMeasure.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for UnitOfMeasure. */ -public final class UnitOfMeasure extends ExpandableStringEnum { - /** Static value OneHour for UnitOfMeasure. */ - public static final UnitOfMeasure ONE_HOUR = fromString("OneHour"); - - /** - * Creates or finds a UnitOfMeasure from its string representation. - * - * @param name a name to look for. - * @return the corresponding UnitOfMeasure. - */ - @JsonCreator - public static UnitOfMeasure fromString(String name) { - return fromString(name, UnitOfMeasure.class); - } - - /** @return known UnitOfMeasure values. */ - public static Collection values() { - return values(UnitOfMeasure.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UpdateWorkspaceQuotas.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UpdateWorkspaceQuotas.java deleted file mode 100644 index 19bc7d685aee..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UpdateWorkspaceQuotas.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 properties for update Quota response. */ -@Fluent -public final class UpdateWorkspaceQuotas { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(UpdateWorkspaceQuotas.class); - - /* - * Specifies the resource ID. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * Specifies the resource type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /* - * The maximum permitted quota of the resource. - */ - @JsonProperty(value = "limit") - private Long limit; - - /* - * An enum describing the unit of quota measurement. - */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) - private QuotaUnit unit; - - /* - * Status of update workspace quota. - */ - @JsonProperty(value = "status") - private Status status; - - /** - * Get the id property: Specifies the resource ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the type property: Specifies the resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the limit property: The maximum permitted quota of the resource. - * - * @return the limit value. - */ - public Long limit() { - return this.limit; - } - - /** - * Set the limit property: The maximum permitted quota of the resource. - * - * @param limit the limit value to set. - * @return the UpdateWorkspaceQuotas object itself. - */ - public UpdateWorkspaceQuotas withLimit(Long limit) { - this.limit = limit; - return this; - } - - /** - * Get the unit property: An enum describing the unit of quota measurement. - * - * @return the unit value. - */ - public QuotaUnit unit() { - return this.unit; - } - - /** - * Get the status property: Status of update workspace quota. - * - * @return the status value. - */ - public Status status() { - return this.status; - } - - /** - * Set the status property: Status of update workspace quota. - * - * @param status the status value to set. - * @return the UpdateWorkspaceQuotas object itself. - */ - public UpdateWorkspaceQuotas withStatus(Status status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UpdateWorkspaceQuotasResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UpdateWorkspaceQuotasResult.java deleted file mode 100644 index d7c455359557..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UpdateWorkspaceQuotasResult.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.UpdateWorkspaceQuotasResultInner; -import java.util.List; - -/** An immutable client-side representation of UpdateWorkspaceQuotasResult. */ -public interface UpdateWorkspaceQuotasResult { - /** - * Gets the value property: The list of workspace quota update result. - * - * @return the value value. - */ - List value(); - - /** - * Gets the nextLink property: The URI to fetch the next page of workspace quota update result. Call ListNext() with - * this to fetch the next page of Workspace Quota update result. - * - * @return the nextLink value. - */ - String nextLink(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.UpdateWorkspaceQuotasResultInner - * object. - * - * @return the inner object. - */ - UpdateWorkspaceQuotasResultInner innerModel(); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Usage.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Usage.java deleted file mode 100644 index cb7296ab288a..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Usage.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.UsageInner; - -/** An immutable client-side representation of Usage. */ -public interface Usage { - /** - * Gets the id property: Specifies the resource ID. - * - * @return the id value. - */ - String id(); - - /** - * Gets the amlWorkspaceLocation property: Region of the AML workspace in the id. - * - * @return the amlWorkspaceLocation value. - */ - String amlWorkspaceLocation(); - - /** - * Gets the type property: Specifies the resource type. - * - * @return the type value. - */ - String type(); - - /** - * Gets the unit property: An enum describing the unit of usage measurement. - * - * @return the unit value. - */ - UsageUnit unit(); - - /** - * Gets the currentValue property: The current usage of the resource. - * - * @return the currentValue value. - */ - Long currentValue(); - - /** - * Gets the limit property: The maximum permitted usage of the resource. - * - * @return the limit value. - */ - Long limit(); - - /** - * Gets the name property: The name of the type of usage. - * - * @return the name value. - */ - UsageName name(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.UsageInner object. - * - * @return the inner object. - */ - UsageInner innerModel(); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UsageName.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UsageName.java deleted file mode 100644 index f787694faf67..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UsageName.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** The Usage Names. */ -@Immutable -public final class UsageName { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(UsageName.class); - - /* - * The name of the resource. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private String value; - - /* - * The localized name of the resource. - */ - @JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY) - private String localizedValue; - - /** - * Get the value property: The name of the resource. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Get the localizedValue property: The localized name of the resource. - * - * @return the localizedValue value. - */ - public String localizedValue() { - return this.localizedValue; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UsageUnit.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UsageUnit.java deleted file mode 100644 index 84603281cc8a..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UsageUnit.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for UsageUnit. */ -public final class UsageUnit extends ExpandableStringEnum { - /** Static value Count for UsageUnit. */ - public static final UsageUnit COUNT = fromString("Count"); - - /** - * Creates or finds a UsageUnit from its string representation. - * - * @param name a name to look for. - * @return the corresponding UsageUnit. - */ - @JsonCreator - public static UsageUnit fromString(String name) { - return fromString(name, UsageUnit.class); - } - - /** @return known UsageUnit values. */ - public static Collection values() { - return values(UsageUnit.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Usages.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Usages.java deleted file mode 100644 index 5c7ed7c6a09c..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Usages.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of Usages. */ -public interface Usages { - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for AML resources for given subscription and location. - */ - PagedIterable list(String location); - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for AML resources for given subscription and location. - */ - PagedIterable list(String location, Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UserAccountCredentials.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UserAccountCredentials.java deleted file mode 100644 index ca2b39efcaa6..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UserAccountCredentials.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Settings for user account that gets created on each on the nodes of a compute. */ -@Fluent -public final class UserAccountCredentials { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(UserAccountCredentials.class); - - /* - * Name of the administrator user account which can be used to SSH to - * nodes. - */ - @JsonProperty(value = "adminUserName", required = true) - private String adminUsername; - - /* - * SSH public key of the administrator user account. - */ - @JsonProperty(value = "adminUserSshPublicKey") - private String adminUserSshPublicKey; - - /* - * Password of the administrator user account. - */ - @JsonProperty(value = "adminUserPassword") - private String adminUserPassword; - - /** - * Get the adminUsername property: Name of the administrator user account which can be used to SSH to nodes. - * - * @return the adminUsername value. - */ - public String adminUsername() { - return this.adminUsername; - } - - /** - * Set the adminUsername property: Name of the administrator user account which can be used to SSH to nodes. - * - * @param adminUsername the adminUsername value to set. - * @return the UserAccountCredentials object itself. - */ - public UserAccountCredentials withAdminUsername(String adminUsername) { - this.adminUsername = adminUsername; - return this; - } - - /** - * Get the adminUserSshPublicKey property: SSH public key of the administrator user account. - * - * @return the adminUserSshPublicKey value. - */ - public String adminUserSshPublicKey() { - return this.adminUserSshPublicKey; - } - - /** - * Set the adminUserSshPublicKey property: SSH public key of the administrator user account. - * - * @param adminUserSshPublicKey the adminUserSshPublicKey value to set. - * @return the UserAccountCredentials object itself. - */ - public UserAccountCredentials withAdminUserSshPublicKey(String adminUserSshPublicKey) { - this.adminUserSshPublicKey = adminUserSshPublicKey; - return this; - } - - /** - * Get the adminUserPassword property: Password of the administrator user account. - * - * @return the adminUserPassword value. - */ - public String adminUserPassword() { - return this.adminUserPassword; - } - - /** - * Set the adminUserPassword property: Password of the administrator user account. - * - * @param adminUserPassword the adminUserPassword value to set. - * @return the UserAccountCredentials object itself. - */ - public UserAccountCredentials withAdminUserPassword(String adminUserPassword) { - this.adminUserPassword = adminUserPassword; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (adminUsername() == null) { - throw logger.logExceptionAsError(new IllegalArgumentException( - "Missing required property adminUsername in model UserAccountCredentials")); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UserAssignedIdentity.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UserAssignedIdentity.java deleted file mode 100644 index cbd13771dd3b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UserAssignedIdentity.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** User Assigned Identity. */ -@Immutable -public class UserAssignedIdentity { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(UserAssignedIdentity.class); - - /* - * The principal ID of the user assigned identity. - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private String principalId; - - /* - * The tenant ID of the user assigned identity. - */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /* - * The clientId(aka appId) of the user assigned identity. - */ - @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) - private String clientId; - - /** - * Get the principalId property: The principal ID of the user assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of the user assigned identity. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the clientId property: The clientId(aka appId) of the user assigned identity. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VMPriceOSType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VMPriceOSType.java deleted file mode 100644 index 4979b2019f71..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VMPriceOSType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for VMPriceOSType. */ -public final class VMPriceOSType extends ExpandableStringEnum { - /** Static value Linux for VMPriceOSType. */ - public static final VMPriceOSType LINUX = fromString("Linux"); - - /** Static value Windows for VMPriceOSType. */ - public static final VMPriceOSType WINDOWS = fromString("Windows"); - - /** - * Creates or finds a VMPriceOSType from its string representation. - * - * @param name a name to look for. - * @return the corresponding VMPriceOSType. - */ - @JsonCreator - public static VMPriceOSType fromString(String name) { - return fromString(name, VMPriceOSType.class); - } - - /** @return known VMPriceOSType values. */ - public static Collection values() { - return values(VMPriceOSType.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VMTier.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VMTier.java deleted file mode 100644 index cf5726026147..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VMTier.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for VMTier. */ -public final class VMTier extends ExpandableStringEnum { - /** Static value Standard for VMTier. */ - public static final VMTier STANDARD = fromString("Standard"); - - /** Static value LowPriority for VMTier. */ - public static final VMTier LOW_PRIORITY = fromString("LowPriority"); - - /** Static value Spot for VMTier. */ - public static final VMTier SPOT = fromString("Spot"); - - /** - * Creates or finds a VMTier from its string representation. - * - * @param name a name to look for. - * @return the corresponding VMTier. - */ - @JsonCreator - public static VMTier fromString(String name) { - return fromString(name, VMTier.class); - } - - /** @return known VMTier values. */ - public static Collection values() { - return values(VMTier.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ValueFormat.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ValueFormat.java deleted file mode 100644 index 0ed4fcb43609..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ValueFormat.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ValueFormat. */ -public final class ValueFormat extends ExpandableStringEnum { - /** Static value JSON for ValueFormat. */ - public static final ValueFormat JSON = fromString("JSON"); - - /** - * Creates or finds a ValueFormat from its string representation. - * - * @param name a name to look for. - * @return the corresponding ValueFormat. - */ - @JsonCreator - public static ValueFormat fromString(String name) { - return fromString(name, ValueFormat.class); - } - - /** @return known ValueFormat values. */ - public static Collection values() { - return values(ValueFormat.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VariantType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VariantType.java deleted file mode 100644 index 7e03450aef11..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VariantType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for VariantType. */ -public final class VariantType extends ExpandableStringEnum { - /** Static value Control for VariantType. */ - public static final VariantType CONTROL = fromString("Control"); - - /** Static value Treatment for VariantType. */ - public static final VariantType TREATMENT = fromString("Treatment"); - - /** - * Creates or finds a VariantType from its string representation. - * - * @param name a name to look for. - * @return the corresponding VariantType. - */ - @JsonCreator - public static VariantType fromString(String name) { - return fromString(name, VariantType.class); - } - - /** @return known VariantType values. */ - public static Collection values() { - return values(VariantType.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachine.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachine.java deleted file mode 100644 index c90d2e2b404c..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachine.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A Machine Learning compute based on Azure Virtual Machines. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("VirtualMachine") -@Fluent -public final class VirtualMachine extends Compute { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(VirtualMachine.class); - - /* - * The properties property. - */ - @JsonProperty(value = "properties") - private VirtualMachineProperties properties; - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public VirtualMachineProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the VirtualMachine object itself. - */ - public VirtualMachine withProperties(VirtualMachineProperties properties) { - this.properties = properties; - return this; - } - - /** {@inheritDoc} */ - @Override - public VirtualMachine withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public VirtualMachine withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public VirtualMachine withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public VirtualMachine withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineImage.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineImage.java deleted file mode 100644 index 97203be8c117..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineImage.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Virtual Machine image for Windows AML Compute. */ -@Fluent -public final class VirtualMachineImage { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(VirtualMachineImage.class); - - /* - * Virtual Machine image path - */ - @JsonProperty(value = "id", required = true) - private String id; - - /** - * Get the id property: Virtual Machine image path. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Virtual Machine image path. - * - * @param id the id value to set. - * @return the VirtualMachineImage object itself. - */ - public VirtualMachineImage withId(String id) { - this.id = id; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw logger.logExceptionAsError( - new IllegalArgumentException("Missing required property id in model VirtualMachineImage")); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineProperties.java deleted file mode 100644 index 64d238c639d5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineProperties.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 VirtualMachineProperties model. */ -@Fluent -public final class VirtualMachineProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(VirtualMachineProperties.class); - - /* - * Virtual Machine size - */ - @JsonProperty(value = "virtualMachineSize") - private String virtualMachineSize; - - /* - * Port open for ssh connections. - */ - @JsonProperty(value = "sshPort") - private Integer sshPort; - - /* - * Public IP address of the virtual machine. - */ - @JsonProperty(value = "address") - private String address; - - /* - * Admin credentials for virtual machine - */ - @JsonProperty(value = "administratorAccount") - private VirtualMachineSshCredentials administratorAccount; - - /* - * Indicates whether this compute will be used for running notebooks. - */ - @JsonProperty(value = "isNotebookInstanceCompute") - private Boolean isNotebookInstanceCompute; - - /** - * Get the virtualMachineSize property: Virtual Machine size. - * - * @return the virtualMachineSize value. - */ - public String virtualMachineSize() { - return this.virtualMachineSize; - } - - /** - * Set the virtualMachineSize property: Virtual Machine size. - * - * @param virtualMachineSize the virtualMachineSize value to set. - * @return the VirtualMachineProperties object itself. - */ - public VirtualMachineProperties withVirtualMachineSize(String virtualMachineSize) { - this.virtualMachineSize = virtualMachineSize; - return this; - } - - /** - * Get the sshPort property: Port open for ssh connections. - * - * @return the sshPort value. - */ - public Integer sshPort() { - return this.sshPort; - } - - /** - * Set the sshPort property: Port open for ssh connections. - * - * @param sshPort the sshPort value to set. - * @return the VirtualMachineProperties object itself. - */ - public VirtualMachineProperties withSshPort(Integer sshPort) { - this.sshPort = sshPort; - return this; - } - - /** - * Get the address property: Public IP address of the virtual machine. - * - * @return the address value. - */ - public String address() { - return this.address; - } - - /** - * Set the address property: Public IP address of the virtual machine. - * - * @param address the address value to set. - * @return the VirtualMachineProperties object itself. - */ - public VirtualMachineProperties withAddress(String address) { - this.address = address; - return this; - } - - /** - * Get the administratorAccount property: Admin credentials for virtual machine. - * - * @return the administratorAccount value. - */ - public VirtualMachineSshCredentials administratorAccount() { - return this.administratorAccount; - } - - /** - * Set the administratorAccount property: Admin credentials for virtual machine. - * - * @param administratorAccount the administratorAccount value to set. - * @return the VirtualMachineProperties object itself. - */ - public VirtualMachineProperties withAdministratorAccount(VirtualMachineSshCredentials administratorAccount) { - this.administratorAccount = administratorAccount; - return this; - } - - /** - * Get the isNotebookInstanceCompute property: Indicates whether this compute will be used for running notebooks. - * - * @return the isNotebookInstanceCompute value. - */ - public Boolean isNotebookInstanceCompute() { - return this.isNotebookInstanceCompute; - } - - /** - * Set the isNotebookInstanceCompute property: Indicates whether this compute will be used for running notebooks. - * - * @param isNotebookInstanceCompute the isNotebookInstanceCompute value to set. - * @return the VirtualMachineProperties object itself. - */ - public VirtualMachineProperties withIsNotebookInstanceCompute(Boolean isNotebookInstanceCompute) { - this.isNotebookInstanceCompute = isNotebookInstanceCompute; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administratorAccount() != null) { - administratorAccount().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSecrets.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSecrets.java deleted file mode 100644 index 10bff3cd325b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSecrets.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeSecretsInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Secrets related to a Machine Learning compute based on AKS. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("VirtualMachine") -@Fluent -public final class VirtualMachineSecrets extends ComputeSecretsInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(VirtualMachineSecrets.class); - - /* - * Admin credentials for virtual machine. - */ - @JsonProperty(value = "administratorAccount") - private VirtualMachineSshCredentials administratorAccount; - - /** - * Get the administratorAccount property: Admin credentials for virtual machine. - * - * @return the administratorAccount value. - */ - public VirtualMachineSshCredentials administratorAccount() { - return this.administratorAccount; - } - - /** - * Set the administratorAccount property: Admin credentials for virtual machine. - * - * @param administratorAccount the administratorAccount value to set. - * @return the VirtualMachineSecrets object itself. - */ - public VirtualMachineSecrets withAdministratorAccount(VirtualMachineSshCredentials administratorAccount) { - this.administratorAccount = administratorAccount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (administratorAccount() != null) { - administratorAccount().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSize.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSize.java deleted file mode 100644 index ebeae3d70ea7..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSize.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Describes the properties of a VM size. */ -@Fluent -public final class VirtualMachineSize { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(VirtualMachineSize.class); - - /* - * The name of the virtual machine size. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * The family name of the virtual machine size. - */ - @JsonProperty(value = "family", access = JsonProperty.Access.WRITE_ONLY) - private String family; - - /* - * The number of vCPUs supported by the virtual machine size. - */ - @JsonProperty(value = "vCPUs", access = JsonProperty.Access.WRITE_ONLY) - private Integer vCPUs; - - /* - * The number of gPUs supported by the virtual machine size. - */ - @JsonProperty(value = "gpus", access = JsonProperty.Access.WRITE_ONLY) - private Integer gpus; - - /* - * The OS VHD disk size, in MB, allowed by the virtual machine size. - */ - @JsonProperty(value = "osVhdSizeMB", access = JsonProperty.Access.WRITE_ONLY) - private Integer osVhdSizeMB; - - /* - * The resource volume size, in MB, allowed by the virtual machine size. - */ - @JsonProperty(value = "maxResourceVolumeMB", access = JsonProperty.Access.WRITE_ONLY) - private Integer maxResourceVolumeMB; - - /* - * The amount of memory, in GB, supported by the virtual machine size. - */ - @JsonProperty(value = "memoryGB", access = JsonProperty.Access.WRITE_ONLY) - private Double memoryGB; - - /* - * Specifies if the virtual machine size supports low priority VMs. - */ - @JsonProperty(value = "lowPriorityCapable", access = JsonProperty.Access.WRITE_ONLY) - private Boolean lowPriorityCapable; - - /* - * Specifies if the virtual machine size supports premium IO. - */ - @JsonProperty(value = "premiumIO", access = JsonProperty.Access.WRITE_ONLY) - private Boolean premiumIO; - - /* - * The estimated price information for using a VM. - */ - @JsonProperty(value = "estimatedVMPrices") - private EstimatedVMPrices estimatedVMPrices; - - /** - * Get the name property: The name of the virtual machine size. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the family property: The family name of the virtual machine size. - * - * @return the family value. - */ - public String family() { - return this.family; - } - - /** - * Get the vCPUs property: The number of vCPUs supported by the virtual machine size. - * - * @return the vCPUs value. - */ - public Integer vCPUs() { - return this.vCPUs; - } - - /** - * Get the gpus property: The number of gPUs supported by the virtual machine size. - * - * @return the gpus value. - */ - public Integer gpus() { - return this.gpus; - } - - /** - * Get the osVhdSizeMB property: The OS VHD disk size, in MB, allowed by the virtual machine size. - * - * @return the osVhdSizeMB value. - */ - public Integer osVhdSizeMB() { - return this.osVhdSizeMB; - } - - /** - * Get the maxResourceVolumeMB property: The resource volume size, in MB, allowed by the virtual machine size. - * - * @return the maxResourceVolumeMB value. - */ - public Integer maxResourceVolumeMB() { - return this.maxResourceVolumeMB; - } - - /** - * Get the memoryGB property: The amount of memory, in GB, supported by the virtual machine size. - * - * @return the memoryGB value. - */ - public Double memoryGB() { - return this.memoryGB; - } - - /** - * Get the lowPriorityCapable property: Specifies if the virtual machine size supports low priority VMs. - * - * @return the lowPriorityCapable value. - */ - public Boolean lowPriorityCapable() { - return this.lowPriorityCapable; - } - - /** - * Get the premiumIO property: Specifies if the virtual machine size supports premium IO. - * - * @return the premiumIO value. - */ - public Boolean premiumIO() { - return this.premiumIO; - } - - /** - * Get the estimatedVMPrices property: The estimated price information for using a VM. - * - * @return the estimatedVMPrices value. - */ - public EstimatedVMPrices estimatedVMPrices() { - return this.estimatedVMPrices; - } - - /** - * Set the estimatedVMPrices property: The estimated price information for using a VM. - * - * @param estimatedVMPrices the estimatedVMPrices value to set. - * @return the VirtualMachineSize object itself. - */ - public VirtualMachineSize withEstimatedVMPrices(EstimatedVMPrices estimatedVMPrices) { - this.estimatedVMPrices = estimatedVMPrices; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (estimatedVMPrices() != null) { - estimatedVMPrices().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSizeListResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSizeListResult.java deleted file mode 100644 index 12e9a041a0e0..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSizeListResult.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.VirtualMachineSizeListResultInner; -import java.util.List; - -/** An immutable client-side representation of VirtualMachineSizeListResult. */ -public interface VirtualMachineSizeListResult { - /** - * Gets the amlCompute property: The list of virtual machine sizes supported by AmlCompute. - * - * @return the amlCompute value. - */ - List amlCompute(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.VirtualMachineSizeListResultInner - * object. - * - * @return the inner object. - */ - VirtualMachineSizeListResultInner innerModel(); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSizes.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSizes.java deleted file mode 100644 index e91502cc5ac6..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSizes.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of VirtualMachineSizes. */ -public interface VirtualMachineSizes { - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response. - */ - VirtualMachineSizeListResult list(String location); - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response. - */ - Response listWithResponse(String location, Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSshCredentials.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSshCredentials.java deleted file mode 100644 index 74a5781ad82d..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSshCredentials.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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; - -/** Admin credentials for virtual machine. */ -@Fluent -public final class VirtualMachineSshCredentials { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(VirtualMachineSshCredentials.class); - - /* - * Username of admin account - */ - @JsonProperty(value = "username") - private String username; - - /* - * Password of admin account - */ - @JsonProperty(value = "password") - private String password; - - /* - * Public key data - */ - @JsonProperty(value = "publicKeyData") - private String publicKeyData; - - /* - * Private key data - */ - @JsonProperty(value = "privateKeyData") - private String privateKeyData; - - /** - * Get the username property: Username of admin account. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: Username of admin account. - * - * @param username the username value to set. - * @return the VirtualMachineSshCredentials object itself. - */ - public VirtualMachineSshCredentials withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: Password of admin account. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: Password of admin account. - * - * @param password the password value to set. - * @return the VirtualMachineSshCredentials object itself. - */ - public VirtualMachineSshCredentials withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the publicKeyData property: Public key data. - * - * @return the publicKeyData value. - */ - public String publicKeyData() { - return this.publicKeyData; - } - - /** - * Set the publicKeyData property: Public key data. - * - * @param publicKeyData the publicKeyData value to set. - * @return the VirtualMachineSshCredentials object itself. - */ - public VirtualMachineSshCredentials withPublicKeyData(String publicKeyData) { - this.publicKeyData = publicKeyData; - return this; - } - - /** - * Get the privateKeyData property: Private key data. - * - * @return the privateKeyData value. - */ - public String privateKeyData() { - return this.privateKeyData; - } - - /** - * Set the privateKeyData property: Private key data. - * - * @param privateKeyData the privateKeyData value to set. - * @return the VirtualMachineSshCredentials object itself. - */ - public VirtualMachineSshCredentials withPrivateKeyData(String privateKeyData) { - this.privateKeyData = privateKeyData; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VmPriority.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VmPriority.java deleted file mode 100644 index 3b068ed422dc..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VmPriority.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for VmPriority. */ -public final class VmPriority extends ExpandableStringEnum { - /** Static value Dedicated for VmPriority. */ - public static final VmPriority DEDICATED = fromString("Dedicated"); - - /** Static value LowPriority for VmPriority. */ - public static final VmPriority LOW_PRIORITY = fromString("LowPriority"); - - /** - * Creates or finds a VmPriority from its string representation. - * - * @param name a name to look for. - * @return the corresponding VmPriority. - */ - @JsonCreator - public static VmPriority fromString(String name) { - return fromString(name, VmPriority.class); - } - - /** @return known VmPriority values. */ - public static Collection values() { - return values(VmPriority.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VnetConfiguration.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VnetConfiguration.java deleted file mode 100644 index 5d8cfffd7817..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VnetConfiguration.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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 VnetConfiguration model. */ -@Fluent -public class VnetConfiguration { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(VnetConfiguration.class); - - /* - * The name of the virtual network. - */ - @JsonProperty(value = "vnetName") - private String vnetName; - - /* - * The name of the virtual network subnet. - */ - @JsonProperty(value = "subnetName") - private String subnetName; - - /** - * Get the vnetName property: The name of the virtual network. - * - * @return the vnetName value. - */ - public String vnetName() { - return this.vnetName; - } - - /** - * Set the vnetName property: The name of the virtual network. - * - * @param vnetName the vnetName value to set. - * @return the VnetConfiguration object itself. - */ - public VnetConfiguration withVnetName(String vnetName) { - this.vnetName = vnetName; - return this; - } - - /** - * Get the subnetName property: The name of the virtual network subnet. - * - * @return the subnetName value. - */ - public String subnetName() { - return this.subnetName; - } - - /** - * Set the subnetName property: The name of the virtual network subnet. - * - * @param subnetName the subnetName value to set. - * @return the VnetConfiguration object itself. - */ - public VnetConfiguration withSubnetName(String subnetName) { - this.subnetName = subnetName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WebServiceState.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WebServiceState.java deleted file mode 100644 index 59b9ccccc2a5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WebServiceState.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for WebServiceState. */ -public final class WebServiceState extends ExpandableStringEnum { - /** Static value Transitioning for WebServiceState. */ - public static final WebServiceState TRANSITIONING = fromString("Transitioning"); - - /** Static value Healthy for WebServiceState. */ - public static final WebServiceState HEALTHY = fromString("Healthy"); - - /** Static value Unhealthy for WebServiceState. */ - public static final WebServiceState UNHEALTHY = fromString("Unhealthy"); - - /** Static value Failed for WebServiceState. */ - public static final WebServiceState FAILED = fromString("Failed"); - - /** Static value Unschedulable for WebServiceState. */ - public static final WebServiceState UNSCHEDULABLE = fromString("Unschedulable"); - - /** - * Creates or finds a WebServiceState from its string representation. - * - * @param name a name to look for. - * @return the corresponding WebServiceState. - */ - @JsonCreator - public static WebServiceState fromString(String name) { - return fromString(name, WebServiceState.class); - } - - /** @return known WebServiceState values. */ - public static Collection values() { - return values(WebServiceState.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Workspace.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Workspace.java deleted file mode 100644 index 45599f7f2021..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Workspace.java +++ /dev/null @@ -1,721 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceInner; -import java.util.List; -import java.util.Map; - -/** An immutable client-side representation of Workspace. */ -public interface Workspace { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the 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 workspaceId property: The immutable id associated with this workspace. - * - * @return the workspaceId value. - */ - String workspaceId(); - - /** - * Gets the description property: The description of this workspace. - * - * @return the description value. - */ - String description(); - - /** - * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @return the friendlyName value. - */ - String friendlyName(); - - /** - * Gets the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @return the keyVault value. - */ - String keyVault(); - - /** - * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. This - * cannot be changed once the workspace has been created. - * - * @return the applicationInsights value. - */ - String applicationInsights(); - - /** - * Gets the containerRegistry property: ARM id of the container registry associated with this workspace. This cannot - * be changed once the workspace has been created. - * - * @return the containerRegistry value. - */ - String containerRegistry(); - - /** - * Gets the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @return the storageAccount value. - */ - String storageAccount(); - - /** - * Gets the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning - * experimentation services. - * - * @return the discoveryUrl value. - */ - String discoveryUrl(); - - /** - * Gets the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the encryption property: The encryption settings of Azure ML workspace. - * - * @return the encryption value. - */ - EncryptionProperty encryption(); - - /** - * Gets the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. - * - * @return the hbiWorkspace value. - */ - Boolean hbiWorkspace(); - - /** - * Gets the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. - * - * @return the serviceProvisionedResourceGroup value. - */ - String serviceProvisionedResourceGroup(); - - /** - * Gets the privateLinkCount property: Count of private connections in the workspace. - * - * @return the privateLinkCount value. - */ - Integer privateLinkCount(); - - /** - * Gets the imageBuildCompute property: The compute name for image build. - * - * @return the imageBuildCompute value. - */ - String imageBuildCompute(); - - /** - * Gets the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when - * behind VNet. - * - * @return the allowPublicAccessWhenBehindVnet value. - */ - Boolean allowPublicAccessWhenBehindVnet(); - - /** - * Gets the privateEndpointConnections property: The list of private endpoint connections in the workspace. - * - * @return the privateEndpointConnections value. - */ - List privateEndpointConnections(); - - /** - * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @return the sharedPrivateLinkResources value. - */ - List sharedPrivateLinkResources(); - - /** - * Gets the notebookInfo property: The notebook info of Azure ML workspace. - * - * @return the notebookInfo value. - */ - NotebookResourceInfo notebookInfo(); - - /** - * Gets the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @return the serviceManagedResourcesSettings value. - */ - ServiceManagedResourcesSettings serviceManagedResourcesSettings(); - - /** - * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. - */ - String primaryUserAssignedIdentity(); - - /** - * Gets the tenantId property: The tenant id associated with this workspace. - * - * @return the tenantId value. - */ - String tenantId(); - - /** - * Gets the identity property: The identity of the resource. - * - * @return the identity value. - */ - Identity identity(); - - /** - * Gets the sku property: The sku of the workspace. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the systemData property: Read only system data. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceInner object. - * - * @return the inner object. - */ - WorkspaceInner innerModel(); - - /** The entirety of the Workspace definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** The Workspace definition stages. */ - interface DefinitionStages { - /** The first stage of the Workspace definition. */ - interface Blank extends WithLocation { - } - - /** The stage of the Workspace 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 Workspace definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the Workspace definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithDescription, - DefinitionStages.WithFriendlyName, DefinitionStages.WithKeyVault, DefinitionStages.WithApplicationInsights, - DefinitionStages.WithContainerRegistry, DefinitionStages.WithStorageAccount, - DefinitionStages.WithDiscoveryUrl, DefinitionStages.WithEncryption, DefinitionStages.WithHbiWorkspace, - DefinitionStages.WithImageBuildCompute, DefinitionStages.WithAllowPublicAccessWhenBehindVnet, - DefinitionStages.WithSharedPrivateLinkResources, DefinitionStages.WithServiceManagedResourcesSettings, - DefinitionStages.WithPrimaryUserAssignedIdentity, DefinitionStages.WithIdentity, DefinitionStages.WithSku { - /** - * Executes the create request. - * - * @return the created resource. - */ - Workspace create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Workspace create(Context context); - } - - /** The stage of the Workspace definition allowing to specify 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 Workspace definition allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: The description of this workspace.. - * - * @param description The description of this workspace. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - - /** The stage of the Workspace definition allowing to specify friendlyName. */ - interface WithFriendlyName { - /** - * Specifies the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @param friendlyName The friendly name for this workspace. This name in mutable. - * @return the next definition stage. - */ - WithCreate withFriendlyName(String friendlyName); - } - - /** The stage of the Workspace definition allowing to specify keyVault. */ - interface WithKeyVault { - /** - * Specifies the keyVault property: ARM id of the key vault associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @param keyVault ARM id of the key vault associated with this workspace. This cannot be changed once the - * workspace has been created. - * @return the next definition stage. - */ - WithCreate withKeyVault(String keyVault); - } - - /** The stage of the Workspace definition allowing to specify applicationInsights. */ - interface WithApplicationInsights { - /** - * Specifies the applicationInsights property: ARM id of the application insights associated with this - * workspace. This cannot be changed once the workspace has been created. - * - * @param applicationInsights ARM id of the application insights associated with this workspace. This cannot - * be changed once the workspace has been created. - * @return the next definition stage. - */ - WithCreate withApplicationInsights(String applicationInsights); - } - - /** The stage of the Workspace definition allowing to specify containerRegistry. */ - interface WithContainerRegistry { - /** - * Specifies the containerRegistry property: ARM id of the container registry associated with this - * workspace. This cannot be changed once the workspace has been created. - * - * @param containerRegistry ARM id of the container registry associated with this workspace. This cannot be - * changed once the workspace has been created. - * @return the next definition stage. - */ - WithCreate withContainerRegistry(String containerRegistry); - } - - /** The stage of the Workspace definition allowing to specify storageAccount. */ - interface WithStorageAccount { - /** - * Specifies the storageAccount property: ARM id of the storage account associated with this workspace. This - * cannot be changed once the workspace has been created. - * - * @param storageAccount ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * @return the next definition stage. - */ - WithCreate withStorageAccount(String storageAccount); - } - - /** The stage of the Workspace definition allowing to specify discoveryUrl. */ - interface WithDiscoveryUrl { - /** - * Specifies the discoveryUrl property: Url for the discovery service to identify regional endpoints for - * machine learning experimentation services. - * - * @param discoveryUrl Url for the discovery service to identify regional endpoints for machine learning - * experimentation services. - * @return the next definition stage. - */ - WithCreate withDiscoveryUrl(String discoveryUrl); - } - - /** The stage of the Workspace definition allowing to specify encryption. */ - interface WithEncryption { - /** - * Specifies the encryption property: The encryption settings of Azure ML workspace.. - * - * @param encryption The encryption settings of Azure ML workspace. - * @return the next definition stage. - */ - WithCreate withEncryption(EncryptionProperty encryption); - } - - /** The stage of the Workspace definition allowing to specify hbiWorkspace. */ - interface WithHbiWorkspace { - /** - * Specifies the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic - * data collected by the service. - * - * @param hbiWorkspace The flag to signal HBI data in the workspace and reduce diagnostic data collected by - * the service. - * @return the next definition stage. - */ - WithCreate withHbiWorkspace(Boolean hbiWorkspace); - } - - /** The stage of the Workspace definition allowing to specify imageBuildCompute. */ - interface WithImageBuildCompute { - /** - * Specifies the imageBuildCompute property: The compute name for image build. - * - * @param imageBuildCompute The compute name for image build. - * @return the next definition stage. - */ - WithCreate withImageBuildCompute(String imageBuildCompute); - } - - /** The stage of the Workspace definition allowing to specify allowPublicAccessWhenBehindVnet. */ - interface WithAllowPublicAccessWhenBehindVnet { - /** - * Specifies the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public - * access when behind VNet.. - * - * @param allowPublicAccessWhenBehindVnet The flag to indicate whether to allow public access when behind - * VNet. - * @return the next definition stage. - */ - WithCreate withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet); - } - - /** The stage of the Workspace definition allowing to specify sharedPrivateLinkResources. */ - interface WithSharedPrivateLinkResources { - /** - * Specifies the sharedPrivateLinkResources property: The list of shared private link resources in this - * workspace.. - * - * @param sharedPrivateLinkResources The list of shared private link resources in this workspace. - * @return the next definition stage. - */ - WithCreate withSharedPrivateLinkResources(List sharedPrivateLinkResources); - } - - /** The stage of the Workspace definition allowing to specify serviceManagedResourcesSettings. */ - interface WithServiceManagedResourcesSettings { - /** - * Specifies the serviceManagedResourcesSettings property: The service managed resource settings.. - * - * @param serviceManagedResourcesSettings The service managed resource settings. - * @return the next definition stage. - */ - WithCreate - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings); - } - - /** The stage of the Workspace definition allowing to specify primaryUserAssignedIdentity. */ - interface WithPrimaryUserAssignedIdentity { - /** - * Specifies the primaryUserAssignedIdentity property: The user assigned identity resource id that - * represents the workspace identity.. - * - * @param primaryUserAssignedIdentity The user assigned identity resource id that represents the workspace - * identity. - * @return the next definition stage. - */ - WithCreate withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity); - } - - /** The stage of the Workspace definition allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: The identity of the resource.. - * - * @param identity The identity of the resource. - * @return the next definition stage. - */ - WithCreate withIdentity(Identity identity); - } - - /** The stage of the Workspace definition allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: The sku of the workspace.. - * - * @param sku The sku of the workspace. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - } - - /** - * Begins update for the Workspace resource. - * - * @return the stage of resource update. - */ - Workspace.Update update(); - - /** The template for Workspace update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, UpdateStages.WithIdentity, - UpdateStages.WithDescription, UpdateStages.WithFriendlyName, UpdateStages.WithImageBuildCompute, - UpdateStages.WithServiceManagedResourcesSettings, UpdateStages.WithPrimaryUserAssignedIdentity { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Workspace apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Workspace apply(Context context); - } - - /** The Workspace update stages. */ - interface UpdateStages { - /** The stage of the Workspace update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: The resource tags for the machine learning workspace.. - * - * @param tags The resource tags for the machine learning workspace. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** The stage of the Workspace update allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: The sku of the workspace.. - * - * @param sku The sku of the workspace. - * @return the next definition stage. - */ - Update withSku(Sku sku); - } - - /** The stage of the Workspace update allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: The identity of the resource.. - * - * @param identity The identity of the resource. - * @return the next definition stage. - */ - Update withIdentity(Identity identity); - } - - /** The stage of the Workspace update allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: The description of this workspace.. - * - * @param description The description of this workspace. - * @return the next definition stage. - */ - Update withDescription(String description); - } - - /** The stage of the Workspace update allowing to specify friendlyName. */ - interface WithFriendlyName { - /** - * Specifies the friendlyName property: The friendly name for this workspace.. - * - * @param friendlyName The friendly name for this workspace. - * @return the next definition stage. - */ - Update withFriendlyName(String friendlyName); - } - - /** The stage of the Workspace update allowing to specify imageBuildCompute. */ - interface WithImageBuildCompute { - /** - * Specifies the imageBuildCompute property: The compute name for image build. - * - * @param imageBuildCompute The compute name for image build. - * @return the next definition stage. - */ - Update withImageBuildCompute(String imageBuildCompute); - } - - /** The stage of the Workspace update allowing to specify serviceManagedResourcesSettings. */ - interface WithServiceManagedResourcesSettings { - /** - * Specifies the serviceManagedResourcesSettings property: The service managed resource settings.. - * - * @param serviceManagedResourcesSettings The service managed resource settings. - * @return the next definition stage. - */ - Update withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings); - } - - /** The stage of the Workspace update allowing to specify primaryUserAssignedIdentity. */ - interface WithPrimaryUserAssignedIdentity { - /** - * Specifies the primaryUserAssignedIdentity property: The user assigned identity resource id that - * represents the workspace identity.. - * - * @param primaryUserAssignedIdentity The user assigned identity resource id that represents the workspace - * identity. - * @return the next definition stage. - */ - Update withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Workspace refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Workspace refresh(Context context); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ListWorkspaceKeysResult listKeys(); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response listKeysWithResponse(Context context); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void resyncKeys(); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void resyncKeys(Context context); - - /** - * return notebook access token and refresh token. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - NotebookAccessTokenResult listNotebookAccessToken(); - - /** - * return notebook access token and refresh token. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response listNotebookAccessTokenWithResponse(Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnection.java deleted file mode 100644 index 99b20f9eb2a4..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnection.java +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceConnectionInner; - -/** An immutable client-side representation of WorkspaceConnection. */ -public interface WorkspaceConnection { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the category property: Category of the workspace connection. - * - * @return the category value. - */ - String category(); - - /** - * Gets the target property: Target of the workspace connection. - * - * @return the target value. - */ - String target(); - - /** - * Gets the authType property: Authorization type of the workspace connection. - * - * @return the authType value. - */ - String authType(); - - /** - * Gets the value property: Value details of the workspace connection. - * - * @return the value value. - */ - String value(); - - /** - * Gets the valueFormat property: format for the workspace connection value. - * - * @return the valueFormat value. - */ - ValueFormat valueFormat(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceConnectionInner object. - * - * @return the inner object. - */ - WorkspaceConnectionInner innerModel(); - - /** The entirety of the WorkspaceConnection definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** The WorkspaceConnection definition stages. */ - interface DefinitionStages { - /** The first stage of the WorkspaceConnection definition. */ - interface Blank extends WithParentResource { - } - - /** The stage of the WorkspaceConnection definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - - /** - * The stage of the WorkspaceConnection definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithName, DefinitionStages.WithCategory, DefinitionStages.WithTarget, - DefinitionStages.WithAuthType, DefinitionStages.WithValue, DefinitionStages.WithValueFormat { - /** - * Executes the create request. - * - * @return the created resource. - */ - WorkspaceConnection create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - WorkspaceConnection create(Context context); - } - - /** The stage of the WorkspaceConnection definition allowing to specify name. */ - interface WithName { - /** - * Specifies the name property: Friendly name of the workspace connection. - * - * @param name Friendly name of the workspace connection. - * @return the next definition stage. - */ - WithCreate withName(String name); - } - - /** The stage of the WorkspaceConnection definition allowing to specify category. */ - interface WithCategory { - /** - * Specifies the category property: Category of the workspace connection.. - * - * @param category Category of the workspace connection. - * @return the next definition stage. - */ - WithCreate withCategory(String category); - } - - /** The stage of the WorkspaceConnection definition allowing to specify target. */ - interface WithTarget { - /** - * Specifies the target property: Target of the workspace connection.. - * - * @param target Target of the workspace connection. - * @return the next definition stage. - */ - WithCreate withTarget(String target); - } - - /** The stage of the WorkspaceConnection definition allowing to specify authType. */ - interface WithAuthType { - /** - * Specifies the authType property: Authorization type of the workspace connection.. - * - * @param authType Authorization type of the workspace connection. - * @return the next definition stage. - */ - WithCreate withAuthType(String authType); - } - - /** The stage of the WorkspaceConnection definition allowing to specify value. */ - interface WithValue { - /** - * Specifies the value property: Value details of the workspace connection.. - * - * @param value Value details of the workspace connection. - * @return the next definition stage. - */ - WithCreate withValue(String value); - } - - /** The stage of the WorkspaceConnection definition allowing to specify valueFormat. */ - interface WithValueFormat { - /** - * Specifies the valueFormat property: format for the workspace connection value. - * - * @param valueFormat format for the workspace connection value. - * @return the next definition stage. - */ - WithCreate withValueFormat(ValueFormat valueFormat); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - WorkspaceConnection refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - WorkspaceConnection refresh(Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnectionDto.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnectionDto.java deleted file mode 100644 index c8629ee37261..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnectionDto.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** object used for creating workspace connection. */ -@JsonFlatten -@Fluent -public class WorkspaceConnectionDto { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(WorkspaceConnectionDto.class); - - /* - * Friendly name of the workspace connection - */ - @JsonProperty(value = "name") - private String name; - - /* - * Category of the workspace connection. - */ - @JsonProperty(value = "properties.category") - private String category; - - /* - * Target of the workspace connection. - */ - @JsonProperty(value = "properties.target") - private String target; - - /* - * Authorization type of the workspace connection. - */ - @JsonProperty(value = "properties.authType") - private String authType; - - /* - * Value details of the workspace connection. - */ - @JsonProperty(value = "properties.value") - private String value; - - /* - * format for the workspace connection value - */ - @JsonProperty(value = "properties.valueFormat") - private ValueFormat valueFormat; - - /** - * Get the name property: Friendly name of the workspace connection. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Friendly name of the workspace connection. - * - * @param name the name value to set. - * @return the WorkspaceConnectionDto object itself. - */ - public WorkspaceConnectionDto withName(String name) { - this.name = name; - return this; - } - - /** - * Get the category property: Category of the workspace connection. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: Category of the workspace connection. - * - * @param category the category value to set. - * @return the WorkspaceConnectionDto object itself. - */ - public WorkspaceConnectionDto withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the target property: Target of the workspace connection. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Set the target property: Target of the workspace connection. - * - * @param target the target value to set. - * @return the WorkspaceConnectionDto object itself. - */ - public WorkspaceConnectionDto withTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the authType property: Authorization type of the workspace connection. - * - * @return the authType value. - */ - public String authType() { - return this.authType; - } - - /** - * Set the authType property: Authorization type of the workspace connection. - * - * @param authType the authType value to set. - * @return the WorkspaceConnectionDto object itself. - */ - public WorkspaceConnectionDto withAuthType(String authType) { - this.authType = authType; - return this; - } - - /** - * Get the value property: Value details of the workspace connection. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Value details of the workspace connection. - * - * @param value the value value to set. - * @return the WorkspaceConnectionDto object itself. - */ - public WorkspaceConnectionDto withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the valueFormat property: format for the workspace connection value. - * - * @return the valueFormat value. - */ - public ValueFormat valueFormat() { - return this.valueFormat; - } - - /** - * Set the valueFormat property: format for the workspace connection value. - * - * @param valueFormat the valueFormat value to set. - * @return the WorkspaceConnectionDto object itself. - */ - public WorkspaceConnectionDto withValueFormat(ValueFormat valueFormat) { - this.valueFormat = valueFormat; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnections.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnections.java deleted file mode 100644 index 9ae6df4e242e..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnections.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of WorkspaceConnections. */ -public interface WorkspaceConnections { - /** - * List all connections under a AML workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Workspace connection objects. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List all connections under a AML workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Workspace connection objects. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String target, - String category, Context context); - - /** - * Get the detail of a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. - */ - WorkspaceConnection get(String resourceGroupName, String workspaceName, String connectionName); - - /** - * Get the detail of a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String connectionName, - Context context); - - /** - * Delete a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String connectionName); - - /** - * Delete a workspace connection. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String connectionName, - Context context); - - /** - * Get the detail of a workspace connection. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. - */ - WorkspaceConnection getById(String id); - - /** - * Get the detail of a workspace connection. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the detail of a workspace connection. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a workspace connection. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a workspace connection. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new WorkspaceConnection resource. - * - * @param name resource name. - * @return the first stage of the new WorkspaceConnection definition. - */ - WorkspaceConnection.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceFeatures.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceFeatures.java deleted file mode 100644 index 8ddcb302fee7..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceFeatures.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of WorkspaceFeatures. */ -public interface WorkspaceFeatures { - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response. - */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceListResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceListResult.java deleted file mode 100644 index bc2190d0572f..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceListResult.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The result of a request to list machine learning workspaces. */ -@Fluent -public final class WorkspaceListResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(WorkspaceListResult.class); - - /* - * The list of machine learning workspaces. Since this list may be - * incomplete, the nextLink field should be used to request the next list - * of machine learning workspaces. - */ - @JsonProperty(value = "value") - private List value; - - /* - * The URI that can be used to request the next list of machine learning - * workspaces. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: The list of machine learning workspaces. Since this list may be incomplete, the nextLink - * field should be used to request the next list of machine learning workspaces. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of machine learning workspaces. Since this list may be incomplete, the nextLink - * field should be used to request the next list of machine learning workspaces. - * - * @param value the value value to set. - * @return the WorkspaceListResult object itself. - */ - public WorkspaceListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URI that can be used to request the next list of machine learning workspaces. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The URI that can be used to request the next list of machine learning workspaces. - * - * @param nextLink the nextLink value to set. - * @return the WorkspaceListResult object itself. - */ - public WorkspaceListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceOperations.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceOperations.java deleted file mode 100644 index 6dbc7ddb14c7..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceOperations.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of WorkspaceOperations. */ -public interface WorkspaceOperations { - /** - * Lists all skus with associated features. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of skus with features. - */ - PagedIterable listSkus(); - - /** - * Lists all skus with associated features. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of skus with features. - */ - PagedIterable listSkus(Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceSku.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceSku.java deleted file mode 100644 index 8c2e752a7882..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceSku.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceSkuInner; -import java.util.List; - -/** An immutable client-side representation of WorkspaceSku. */ -public interface WorkspaceSku { - /** - * Gets the locations property: The set of locations that the SKU is available. This will be supported and - * registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). - * - * @return the locations value. - */ - List locations(); - - /** - * Gets the locationInfo property: A list of locations and availability zones in those locations where the SKU is - * available. - * - * @return the locationInfo value. - */ - List locationInfo(); - - /** - * Gets the tier property: Sku Tier like Basic or Enterprise. - * - * @return the tier value. - */ - String tier(); - - /** - * Gets the resourceType property: The resourceType property. - * - * @return the resourceType value. - */ - String resourceType(); - - /** - * Gets the name property: The name property. - * - * @return the name value. - */ - String name(); - - /** - * Gets the capabilities property: List of features/user capabilities associated with the sku. - * - * @return the capabilities value. - */ - List capabilities(); - - /** - * Gets the restrictions property: The restrictions because of which SKU cannot be used. This is empty if there are - * no restrictions. - * - * @return the restrictions value. - */ - List restrictions(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceSkuInner object. - * - * @return the inner object. - */ - WorkspaceSkuInner innerModel(); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceUpdateParameters.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceUpdateParameters.java deleted file mode 100644 index f0845297bc54..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceUpdateParameters.java +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The parameters for updating a machine learning workspace. */ -@JsonFlatten -@Fluent -public class WorkspaceUpdateParameters { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(WorkspaceUpdateParameters.class); - - /* - * The resource tags for the machine learning workspace. - */ - @JsonProperty(value = "tags") - private Map tags; - - /* - * The sku of the workspace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * The identity of the resource. - */ - @JsonProperty(value = "identity") - private Identity identity; - - /* - * The description of this workspace. - */ - @JsonProperty(value = "properties.description") - private String description; - - /* - * The friendly name for this workspace. - */ - @JsonProperty(value = "properties.friendlyName") - private String friendlyName; - - /* - * The compute name for image build - */ - @JsonProperty(value = "properties.imageBuildCompute") - private String imageBuildCompute; - - /* - * The service managed resource settings. - */ - @JsonProperty(value = "properties.serviceManagedResourcesSettings") - private ServiceManagedResourcesSettings serviceManagedResourcesSettings; - - /* - * The user assigned identity resource id that represents the workspace - * identity. - */ - @JsonProperty(value = "properties.primaryUserAssignedIdentity") - private String primaryUserAssignedIdentity; - - /** - * Get the tags property: The resource tags for the machine learning workspace. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The resource tags for the machine learning workspace. - * - * @param tags the tags value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public Identity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withIdentity(Identity identity) { - this.identity = identity; - return this; - } - - /** - * Get the description property: The description of this workspace. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of this workspace. - * - * @param description the description value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the friendlyName property: The friendly name for this workspace. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: The friendly name for this workspace. - * - * @param friendlyName the friendlyName value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; - return this; - } - - /** - * Get the imageBuildCompute property: The compute name for image build. - * - * @return the imageBuildCompute value. - */ - public String imageBuildCompute() { - return this.imageBuildCompute; - } - - /** - * Set the imageBuildCompute property: The compute name for image build. - * - * @param imageBuildCompute the imageBuildCompute value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withImageBuildCompute(String imageBuildCompute) { - this.imageBuildCompute = imageBuildCompute; - return this; - } - - /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @return the serviceManagedResourcesSettings value. - */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.serviceManagedResourcesSettings; - } - - /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { - this.serviceManagedResourcesSettings = serviceManagedResourcesSettings; - return this; - } - - /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. - */ - public String primaryUserAssignedIdentity() { - return this.primaryUserAssignedIdentity; - } - - /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (serviceManagedResourcesSettings() != null) { - serviceManagedResourcesSettings().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Workspaces.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Workspaces.java deleted file mode 100644 index a96da05f5d09..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Workspaces.java +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Workspaces. */ -public interface Workspaces { - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. - */ - Workspace getByResourceGroup(String resourceGroupName, String workspaceName); - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context); - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String workspaceName); - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, Context context); - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName Name of the resource group in which workspace 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 result of a request to list machine learning workspaces. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ListWorkspaceKeysResult listKeys(String resourceGroupName, String workspaceName); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response listKeysWithResponse(String resourceGroupName, String workspaceName, - Context context); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void resyncKeys(String resourceGroupName, String workspaceName); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void resyncKeys(String resourceGroupName, String workspaceName, Context context); - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - PagedIterable list(); - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces. - */ - PagedIterable list(String skip, Context context); - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupName, String workspaceName); - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response listNotebookAccessTokenWithResponse(String resourceGroupName, - String workspaceName, Context context); - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. - */ - Workspace getById(String id); - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a machine learning workspace. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a machine learning workspace. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Workspace resource. - * - * @param name resource name. - * @return the first stage of the new Workspace definition. - */ - Workspace.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/package-info.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/package-info.java deleted file mode 100644 index bc5711bfdf96..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the data models for AzureMachineLearningWorkspaces. These APIs allow end users to operate on Azure - * Machine Learning Workspace resources. - */ -package com.azure.resourcemanager.machinelearningservices.models; diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/package-info.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/package-info.java deleted file mode 100644 index 80ad88cd206f..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the classes for AzureMachineLearningWorkspaces. These APIs allow end users to operate on Azure - * Machine Learning Workspace resources. - */ -package com.azure.resourcemanager.machinelearningservices; diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/module-info.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/module-info.java deleted file mode 100644 index ce1fc252fd50..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/module-info.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -module com.azure.resourcemanager.machinelearningservices { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.machinelearningservices; - exports com.azure.resourcemanager.machinelearningservices.fluent; - exports com.azure.resourcemanager.machinelearningservices.fluent.models; - exports com.azure.resourcemanager.machinelearningservices.models; - - opens com.azure.resourcemanager.machinelearningservices.fluent.models - to com.azure.core, com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.machinelearningservices.models to com.azure.core, com.fasterxml.jackson.databind; -} diff --git a/sdk/machinelearningservices/ci.yml b/sdk/machinelearningservices/ci.yml deleted file mode 100644 index 3b98c7721bd2..000000000000 --- a/sdk/machinelearningservices/ci.yml +++ /dev/null @@ -1,39 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - -trigger: - branches: - include: - - main - - hotfix/* - - release/* - paths: - include: - - sdk/machinelearningservices/ci.yml - - sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/ - exclude: - - sdk/machinelearningservices/pom.xml - - sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/pom.xml - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/machinelearningservices/ci.yml - - sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/ - exclude: - - sdk/machinelearningservices/pom.xml - - sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/pom.xml - -extends: - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: machinelearningservices - Artifacts: - - name: azure-resourcemanager-machinelearningservices - groupId: com.azure.resourcemanager - safeName: azureresourcemanagermachinelearningservices diff --git a/sdk/machinelearningservices/pom.xml b/sdk/machinelearningservices/pom.xml deleted file mode 100644 index 932c50bb67d8..000000000000 --- a/sdk/machinelearningservices/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - com.azure - azure-machinelearningservices-service - pom - 1.0.0 - - - azure-resourcemanager-machinelearningservices - - diff --git a/sdk/resourcemanager/autocent.js b/sdk/resourcemanager/autocent.js index 4ecd427744d7..11f2536becac 100644 --- a/sdk/resourcemanager/autocent.js +++ b/sdk/resourcemanager/autocent.js @@ -13,9 +13,7 @@ const pkgRegEx2 = /Package\s+tag\s+(.+)\. - com.azure.resourcemanager - azure-resourcemanager-storageimportexport - 1.0.0-beta.3 - -``` -[//]: # ({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] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. - -### Authentication - -Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package. - -Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. - -Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: - -```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); -TokenCredential credential = new DefaultAzureCredentialBuilder() - .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) - .build(); -StorageImportExportManager manager = StorageImportExportManager - .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/storageimportexport/azure-resourcemanager-storageimportexport/SAMPLE.md) - - -## Troubleshooting - -## Next steps - -## Contributing - -For details on contributing to this repository, see the [contributing guide][cg]. - -This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . - -When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. - -This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. - - -[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS -[docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ -[azure_subscription]: https://azure.microsoft.com/free/ -[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity -[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials -[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 -[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md -[coc]: https://opensource.microsoft.com/codeofconduct/ -[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fstorageimportexport%2Fazure-resourcemanager-storageimportexport%2FREADME.png) diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/SAMPLE.md b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/SAMPLE.md deleted file mode 100644 index ee4f91c3090d..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/SAMPLE.md +++ /dev/null @@ -1,365 +0,0 @@ -# Code snippets and samples - - -## BitLockerKeys - -- [List](#bitlockerkeys_list) - -## Jobs - -- [Create](#jobs_create) -- [Delete](#jobs_delete) -- [GetByResourceGroup](#jobs_getbyresourcegroup) -- [List](#jobs_list) -- [ListByResourceGroup](#jobs_listbyresourcegroup) -- [Update](#jobs_update) - -## Locations - -- [Get](#locations_get) -- [List](#locations_list) - -## Operations - -- [List](#operations_list) -### BitLockerKeys_List - -```java -/** - * Samples for BitLockerKeys List. - */ -public final class BitLockerKeysListSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/ - * ListBitLockerKeys.json - */ - /** - * Sample code: List BitLocker Keys for drives in a job. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void listBitLockerKeysForDrivesInAJob( - com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.bitLockerKeys().list("myJob", "myResourceGroup", com.azure.core.util.Context.NONE); - } -} -``` - -### Jobs_Create - -```java -import com.azure.resourcemanager.storageimportexport.models.DriveStatus; -import com.azure.resourcemanager.storageimportexport.models.Export; -import com.azure.resourcemanager.storageimportexport.models.JobDetails; -import com.azure.resourcemanager.storageimportexport.models.ReturnAddress; -import com.azure.resourcemanager.storageimportexport.models.ReturnShipping; -import java.util.Arrays; - -/** - * Samples for Jobs Create. - */ -public final class JobsCreateSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/CreateJob. - * json - */ - /** - * Sample code: Create import job. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void - createImportJob(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.jobs() - .define("myJob") - .withExistingResourceGroup("myResourceGroup") - .withRegion("West US") - .withProperties(new JobDetails().withStorageAccountId( - "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/test") - .withJobType("Import") - .withReturnAddress(new ReturnAddress().withRecipientName("Test") - .withStreetAddress1("Street1") - .withStreetAddress2("street2") - .withCity("Redmond") - .withStateOrProvince("wa") - .withPostalCode("fakeTokenPlaceholder") - .withCountryOrRegion("USA") - .withPhone("4250000000") - .withEmail("Test@contoso.com")) - .withReturnShipping(new ReturnShipping().withCarrierName("FedEx").withCarrierAccountNumber("989ffff")) - .withDiagnosticsPath("waimportexport") - .withLogLevel("Verbose") - .withBackupDriveManifest(true) - .withDriveList(Arrays.asList(new DriveStatus().withDriveId("9CA995BB") - .withBitLockerKey("fakeTokenPlaceholder") - .withManifestFile("\\8a0c23f7-14b7-470a-9633-fcd46590a1bc.manifest") - .withManifestHash("4228EC5D8E048CB9B515338C789314BE8D0B2FDBC7C7A0308E1C826242CDE74E") - .withDriveHeaderHash( - "0:1048576:FB6B6ED500D49DA6E0D723C98D42C657F2881CC13357C28DCECA6A524F1292501571A321238540E621AB5BD9C9A32637615919A75593E6CB5C1515DAE341CABF;135266304:143360:C957A189AFC38C4E80731252301EB91427CE55E61448FA3C73C6FDDE70ABBC197947EC8D0249A2C639BB10B95957D5820A4BE8DFBBF76FFFA688AE5CE0D42EC3")))) - .create(); - } - - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/ - * CreateExportJob.json - */ - /** - * Sample code: Create export job. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void - createExportJob(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.jobs() - .define("myExportJob") - .withExistingResourceGroup("myResourceGroup") - .withRegion("West US") - .withProperties(new JobDetails().withStorageAccountId( - "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/test") - .withJobType("Export") - .withReturnAddress(new ReturnAddress().withRecipientName("Test") - .withStreetAddress1("Street1") - .withStreetAddress2("street2") - .withCity("Redmond") - .withStateOrProvince("wa") - .withPostalCode("fakeTokenPlaceholder") - .withCountryOrRegion("USA") - .withPhone("4250000000") - .withEmail("Test@contoso.com")) - .withReturnShipping(new ReturnShipping().withCarrierName("FedEx").withCarrierAccountNumber("989ffff")) - .withDiagnosticsPath("waimportexport") - .withLogLevel("Verbose") - .withBackupDriveManifest(true) - .withExport(new Export().withBlobPathPrefix(Arrays.asList("/")))) - .create(); - } -} -``` - -### Jobs_Delete - -```java -/** - * Samples for Jobs Delete. - */ -public final class JobsDeleteSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/DeleteJob. - * json - */ - /** - * Sample code: Delete job. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void deleteJob(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.jobs().deleteByResourceGroupWithResponse("myResourceGroup", "myJob", com.azure.core.util.Context.NONE); - } -} -``` - -### Jobs_GetByResourceGroup - -```java -/** - * Samples for Jobs GetByResourceGroup. - */ -public final class JobsGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/ - * GetExportJob.json - */ - /** - * Sample code: Get export job. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void getExportJob(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.jobs().getByResourceGroupWithResponse("myResourceGroup", "myJob", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/GetJob.json - */ - /** - * Sample code: Get import job. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void getImportJob(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.jobs().getByResourceGroupWithResponse("myResourceGroup", "myJob", com.azure.core.util.Context.NONE); - } -} -``` - -### Jobs_List - -```java -/** - * Samples for Jobs List. - */ -public final class JobsListSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/ - * ListJobsInSubscription.json - */ - /** - * Sample code: List jobs in a subscription. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void - listJobsInASubscription(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.jobs().list(null, null, com.azure.core.util.Context.NONE); - } -} -``` - -### Jobs_ListByResourceGroup - -```java -/** - * Samples for Jobs ListByResourceGroup. - */ -public final class JobsListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/ - * ListJobsInResourceGroup.json - */ - /** - * Sample code: List jobs in a resource group. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void - listJobsInAResourceGroup(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.jobs().listByResourceGroup("myResourceGroup", null, null, com.azure.core.util.Context.NONE); - } -} -``` - -### Jobs_Update - -```java -import com.azure.resourcemanager.storageimportexport.models.JobResponse; - -/** - * Samples for Jobs Update. - */ -public final class JobsUpdateSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/ - * UpdateExportJob.json - */ - /** - * Sample code: Update export job. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void - updateExportJob(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - JobResponse resource = manager.jobs() - .getByResourceGroupWithResponse("myResourceGroup", "myExportJob", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withState("").withLogLevel("Verbose").withBackupDriveManifest(true).apply(); - } - - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/UpdateJob. - * json - */ - /** - * Sample code: Update import job. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void - updateImportJob(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - JobResponse resource = manager.jobs() - .getByResourceGroupWithResponse("myResourceGroup", "myJob", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withState("").withLogLevel("Verbose").withBackupDriveManifest(true).apply(); - } -} -``` - -### Locations_Get - -```java -/** - * Samples for Locations Get. - */ -public final class LocationsGetSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/GetLocation - * .json - */ - /** - * Sample code: Get locations. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void getLocations(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.locations().getWithResponse("West US", com.azure.core.util.Context.NONE); - } -} -``` - -### Locations_List - -```java -/** - * Samples for Locations List. - */ -public final class LocationsListSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/ - * ListLocations.json - */ - /** - * Sample code: List locations. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void listLocations(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.locations().list(com.azure.core.util.Context.NONE); - } -} -``` - -### Operations_List - -```java -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/ - * ListOperations.json - */ - /** - * Sample code: List available operations. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void - listAvailableOperations(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } -} -``` - diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/pom.xml b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/pom.xml deleted file mode 100644 index ac0f8e21dfbc..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/pom.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - - - com.azure.resourcemanager - azure-resourcemanager-storageimportexport - 1.0.0-beta.4 - jar - - Microsoft Azure SDK for StorageImportExport Management - This package contains Microsoft Azure SDK for StorageImportExport Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Storage Import/Export Resource Provider API. Package tag package-preview-2021-01. - 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 - 0 - 0 - true - - - - com.azure - azure-core - 1.54.1 - - - com.azure - azure-core-management - 1.15.6 - - - com.azure - azure-core-test - 1.27.0-beta.4 - test - - - com.azure - azure-identity - 1.15.0 - test - - - diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/StorageImportExportManager.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/StorageImportExportManager.java deleted file mode 100644 index c31a9a559cc9..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/StorageImportExportManager.java +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.HttpPipelinePosition; -import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.core.http.policy.RetryOptions; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storageimportexport.fluent.StorageImportExport; -import com.azure.resourcemanager.storageimportexport.implementation.BitLockerKeysImpl; -import com.azure.resourcemanager.storageimportexport.implementation.JobsImpl; -import com.azure.resourcemanager.storageimportexport.implementation.LocationsImpl; -import com.azure.resourcemanager.storageimportexport.implementation.OperationsImpl; -import com.azure.resourcemanager.storageimportexport.implementation.StorageImportExportBuilder; -import com.azure.resourcemanager.storageimportexport.models.BitLockerKeys; -import com.azure.resourcemanager.storageimportexport.models.Jobs; -import com.azure.resourcemanager.storageimportexport.models.Locations; -import com.azure.resourcemanager.storageimportexport.models.Operations; -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 StorageImportExportManager. - * The Storage Import/Export Resource Provider API. - */ -public final class StorageImportExportManager { - private Locations locations; - - private Jobs jobs; - - private BitLockerKeys bitLockerKeys; - - private Operations operations; - - private final StorageImportExport clientObject; - - private StorageImportExportManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new StorageImportExportBuilder().pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of StorageImportExport service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the StorageImportExport service API instance. - */ - public static StorageImportExportManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Creates an instance of StorageImportExport service API entry point. - * - * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. - * @param profile the Azure profile for client. - * @return the StorageImportExport service API instance. - */ - public static StorageImportExportManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return new StorageImportExportManager(httpPipeline, profile, null); - } - - /** - * Gets a Configurable instance that can be used to create StorageImportExportManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new StorageImportExportManager.Configurable(); - } - - /** - * The Configurable allowing configurations to be set. - */ - public static final class Configurable { - private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private final List scopes = new ArrayList<>(); - private RetryPolicy retryPolicy; - private RetryOptions retryOptions; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Adds the scope to permission sets. - * - * @param scope the scope. - * @return the configurable object itself. - */ - public Configurable withScope(String scope) { - this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the retry options for the HTTP pipeline retry policy. - *

- * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. - * - * @param retryOptions the retry options for the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryOptions(RetryOptions retryOptions) { - this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval - = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of StorageImportExport service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the StorageImportExport service API instance. - */ - public StorageImportExportManager 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.storageimportexport") - .append("/") - .append("1.0.0-beta.3"); - if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder.append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - if (retryOptions != null) { - retryPolicy = new RetryPolicy(retryOptions); - } else { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new AddHeadersFromContextPolicy()); - policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new StorageImportExportManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of Locations. - * - * @return Resource collection API of Locations. - */ - public Locations locations() { - if (this.locations == null) { - this.locations = new LocationsImpl(clientObject.getLocations(), this); - } - return locations; - } - - /** - * Gets the resource collection API of Jobs. It manages JobResponse. - * - * @return Resource collection API of Jobs. - */ - public Jobs jobs() { - if (this.jobs == null) { - this.jobs = new JobsImpl(clientObject.getJobs(), this); - } - return jobs; - } - - /** - * Gets the resource collection API of BitLockerKeys. - * - * @return Resource collection API of BitLockerKeys. - */ - public BitLockerKeys bitLockerKeys() { - if (this.bitLockerKeys == null) { - this.bitLockerKeys = new BitLockerKeysImpl(clientObject.getBitLockerKeys(), this); - } - return bitLockerKeys; - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets wrapped service client StorageImportExport providing direct access to the underlying auto-generated API - * implementation, based on Azure REST API. - * - * @return Wrapped service client StorageImportExport. - */ - public StorageImportExport serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/BitLockerKeysClient.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/BitLockerKeysClient.java deleted file mode 100644 index f82ac3f89549..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/BitLockerKeysClient.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.storageimportexport.fluent.models.DriveBitLockerKeyInner; - -/** - * An instance of this class provides access to all the operations defined in BitLockerKeysClient. - */ -public interface BitLockerKeysClient { - /** - * Returns the BitLocker Keys for all drives in the specified job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return getBitLockerKeys response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String jobName, String resourceGroupName); - - /** - * Returns the BitLocker Keys for all drives in the specified job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return getBitLockerKeys response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String jobName, String resourceGroupName, Context context); -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/JobsClient.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/JobsClient.java deleted file mode 100644 index 2e8949187c2a..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/JobsClient.java +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.storageimportexport.fluent.models.JobResponseInner; -import com.azure.resourcemanager.storageimportexport.models.PutJobParameters; -import com.azure.resourcemanager.storageimportexport.models.UpdateJobParameters; - -/** - * An instance of this class provides access to all the operations defined in JobsClient. - */ -public interface JobsClient { - /** - * Returns all active and completed jobs in a subscription. - * - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Returns all active and completed jobs in a subscription. - * - * @param top An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. - * @param filter Can be used to restrict the results to certain conditions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Long top, String filter, Context context); - - /** - * Returns all active and completed jobs in a resource group. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Returns all active and completed jobs in a resource group. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param top An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. - * @param filter Can be used to restrict the results to certain conditions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Long top, String filter, - Context context); - - /** - * Gets information about an existing job. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException 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 an existing job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, - Context context); - - /** - * Gets information about an existing job. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException 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 an existing job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobResponseInner getByResourceGroup(String resourceGroupName, String jobName); - - /** - * Updates specific properties of a job. You can call this operation to notify the Import/Export service that the - * hard drives comprising the import or export job have been shipped to the Microsoft data center. It can also be - * used to cancel an existing job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param body The parameters to update in the job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the job information along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String jobName, String resourceGroupName, UpdateJobParameters body, - Context context); - - /** - * Updates specific properties of a job. You can call this operation to notify the Import/Export service that the - * hard drives comprising the import or export job have been shipped to the Microsoft data center. It can also be - * used to cancel an existing job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param body The parameters to update in the job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the job information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobResponseInner update(String jobName, String resourceGroupName, UpdateJobParameters body); - - /** - * Creates a new job or updates an existing job in the specified subscription. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param body The parameters used for creating the job. - * @param clientTenantId The tenant ID of the client making the request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the job information along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse(String jobName, String resourceGroupName, PutJobParameters body, - String clientTenantId, Context context); - - /** - * Creates a new job or updates an existing job in the specified subscription. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param body The parameters used for creating the job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the job information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobResponseInner create(String jobName, String resourceGroupName, PutJobParameters body); - - /** - * Deletes an existing job. Only jobs in the Creating or Completed states can be deleted. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String jobName, Context context); - - /** - * Deletes an existing job. Only jobs in the Creating or Completed states can be deleted. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException 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 jobName); -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/LocationsClient.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/LocationsClient.java deleted file mode 100644 index 053b3f07c393..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/LocationsClient.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.storageimportexport.fluent.models.LocationInner; - -/** - * An instance of this class provides access to all the operations defined in LocationsClient. - */ -public interface LocationsClient { - /** - * Returns a list of locations to which you can ship the disks associated with an import or export job. A location - * is a Microsoft data center region. - * - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return locations response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Returns a list of locations to which you can ship the disks associated with an import or export job. A location - * is a Microsoft data center region. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return locations response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Returns the details about a location to which you can ship the disks associated with an import or export job. A - * location is an Azure region. - * - * @param locationName The name of the location. For example, West US or westus. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provides information about an Azure data center location along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String locationName, Context context); - - /** - * Returns the details about a location to which you can ship the disks associated with an import or export job. A - * location is an Azure region. - * - * @param locationName The name of the location. For example, West US or westus. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provides information about an Azure data center location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LocationInner get(String locationName); -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/OperationsClient.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/OperationsClient.java deleted file mode 100644 index 619a5835c808..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/OperationsClient.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.storageimportexport.fluent.models.OperationInner; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public interface OperationsClient { - /** - * Returns the list of operations supported by the import/export resource provider. - * - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list operations response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Returns the list of operations supported by the import/export resource provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list operations response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/StorageImportExport.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/StorageImportExport.java deleted file mode 100644 index d9d59265b565..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/StorageImportExport.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** - * The interface for StorageImportExport class. - */ -public interface StorageImportExport { - /** - * Gets The subscription ID for the Azure user. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets Specifies the preferred language for the response. - * - * @return the acceptLanguage value. - */ - String getAcceptLanguage(); - - /** - * 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 LocationsClient object to access its operations. - * - * @return the LocationsClient object. - */ - LocationsClient getLocations(); - - /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. - */ - JobsClient getJobs(); - - /** - * Gets the BitLockerKeysClient object to access its operations. - * - * @return the BitLockerKeysClient object. - */ - BitLockerKeysClient getBitLockerKeys(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/DriveBitLockerKeyInner.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/DriveBitLockerKeyInner.java deleted file mode 100644 index c685cc1f8e80..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/DriveBitLockerKeyInner.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * BitLocker recovery key or password to the specified drive. - */ -@Fluent -public final class DriveBitLockerKeyInner implements JsonSerializable { - /* - * BitLocker recovery key or password - */ - private String bitLockerKey; - - /* - * Drive ID - */ - private String driveId; - - /** - * Creates an instance of DriveBitLockerKeyInner class. - */ - public DriveBitLockerKeyInner() { - } - - /** - * Get the bitLockerKey property: BitLocker recovery key or password. - * - * @return the bitLockerKey value. - */ - public String bitLockerKey() { - return this.bitLockerKey; - } - - /** - * Set the bitLockerKey property: BitLocker recovery key or password. - * - * @param bitLockerKey the bitLockerKey value to set. - * @return the DriveBitLockerKeyInner object itself. - */ - public DriveBitLockerKeyInner withBitLockerKey(String bitLockerKey) { - this.bitLockerKey = bitLockerKey; - return this; - } - - /** - * Get the driveId property: Drive ID. - * - * @return the driveId value. - */ - public String driveId() { - return this.driveId; - } - - /** - * Set the driveId property: Drive ID. - * - * @param driveId the driveId value to set. - * @return the DriveBitLockerKeyInner object itself. - */ - public DriveBitLockerKeyInner withDriveId(String driveId) { - this.driveId = driveId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("bitLockerKey", this.bitLockerKey); - jsonWriter.writeStringField("driveId", this.driveId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DriveBitLockerKeyInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DriveBitLockerKeyInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DriveBitLockerKeyInner. - */ - public static DriveBitLockerKeyInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DriveBitLockerKeyInner deserializedDriveBitLockerKeyInner = new DriveBitLockerKeyInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("bitLockerKey".equals(fieldName)) { - deserializedDriveBitLockerKeyInner.bitLockerKey = reader.getString(); - } else if ("driveId".equals(fieldName)) { - deserializedDriveBitLockerKeyInner.driveId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDriveBitLockerKeyInner; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/ExportBlobList.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/ExportBlobList.java deleted file mode 100644 index 54efa953e7c5..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/ExportBlobList.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A list of the blobs to be exported. - */ -@Fluent -public final class ExportBlobList implements JsonSerializable { - /* - * A collection of blob-path strings. - */ - private List blobPath; - - /* - * A collection of blob-prefix strings. - */ - private List blobPathPrefix; - - /** - * Creates an instance of ExportBlobList class. - */ - public ExportBlobList() { - } - - /** - * Get the blobPath property: A collection of blob-path strings. - * - * @return the blobPath value. - */ - public List blobPath() { - return this.blobPath; - } - - /** - * Set the blobPath property: A collection of blob-path strings. - * - * @param blobPath the blobPath value to set. - * @return the ExportBlobList object itself. - */ - public ExportBlobList withBlobPath(List blobPath) { - this.blobPath = blobPath; - return this; - } - - /** - * Get the blobPathPrefix property: A collection of blob-prefix strings. - * - * @return the blobPathPrefix value. - */ - public List blobPathPrefix() { - return this.blobPathPrefix; - } - - /** - * Set the blobPathPrefix property: A collection of blob-prefix strings. - * - * @param blobPathPrefix the blobPathPrefix value to set. - * @return the ExportBlobList object itself. - */ - public ExportBlobList withBlobPathPrefix(List blobPathPrefix) { - this.blobPathPrefix = blobPathPrefix; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("blobPath", this.blobPath, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("blobPathPrefix", this.blobPathPrefix, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExportBlobList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExportBlobList if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ExportBlobList. - */ - public static ExportBlobList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExportBlobList deserializedExportBlobList = new ExportBlobList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("blobPath".equals(fieldName)) { - List blobPath = reader.readArray(reader1 -> reader1.getString()); - deserializedExportBlobList.blobPath = blobPath; - } else if ("blobPathPrefix".equals(fieldName)) { - List blobPathPrefix = reader.readArray(reader1 -> reader1.getString()); - deserializedExportBlobList.blobPathPrefix = blobPathPrefix; - } else { - reader.skipChildren(); - } - } - - return deserializedExportBlobList; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/JobResponseInner.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/JobResponseInner.java deleted file mode 100644 index 323be7f04b5a..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/JobResponseInner.java +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.storageimportexport.models.IdentityDetails; -import com.azure.resourcemanager.storageimportexport.models.JobDetails; -import java.io.IOException; -import java.util.Map; - -/** - * Contains the job information. - */ -@Fluent -public final class JobResponseInner extends Resource { - /* - * SystemData of ImportExport Jobs. - */ - private SystemData systemData; - - /* - * Specifies the job properties - */ - private JobDetails properties; - - /* - * Specifies the job identity details - */ - private IdentityDetails identity; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of JobResponseInner class. - */ - public JobResponseInner() { - } - - /** - * Get the systemData property: SystemData of ImportExport Jobs. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the properties property: Specifies the job properties. - * - * @return the properties value. - */ - public JobDetails properties() { - return this.properties; - } - - /** - * Set the properties property: Specifies the job properties. - * - * @param properties the properties value to set. - * @return the JobResponseInner object itself. - */ - public JobResponseInner withProperties(JobDetails properties) { - this.properties = properties; - return this; - } - - /** - * Get the identity property: Specifies the job identity details. - * - * @return the identity value. - */ - public IdentityDetails identity() { - return this.identity; - } - - /** - * Set the identity property: Specifies the job identity details. - * - * @param identity the identity value to set. - * @return the JobResponseInner object itself. - */ - public JobResponseInner withIdentity(IdentityDetails identity) { - this.identity = identity; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JobResponseInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JobResponseInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - if (identity() != null) { - identity().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobResponseInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JobResponseInner. - */ - public static JobResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobResponseInner deserializedJobResponseInner = new JobResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedJobResponseInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedJobResponseInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedJobResponseInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedJobResponseInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedJobResponseInner.withTags(tags); - } else if ("systemData".equals(fieldName)) { - deserializedJobResponseInner.systemData = SystemData.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedJobResponseInner.properties = JobDetails.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedJobResponseInner.identity = IdentityDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJobResponseInner; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/LocationInner.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/LocationInner.java deleted file mode 100644 index 177c1970e736..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/LocationInner.java +++ /dev/null @@ -1,433 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Provides information about an Azure data center location. - */ -@Fluent -public final class LocationInner implements JsonSerializable { - /* - * Specifies the resource identifier of the location. - */ - private String id; - - /* - * Specifies the name of the location. Use List Locations to get all supported locations. - */ - private String name; - - /* - * Specifies the type of the location. - */ - private String type; - - /* - * location properties - */ - private LocationProperties innerProperties; - - /** - * Creates an instance of LocationInner class. - */ - public LocationInner() { - } - - /** - * Get the id property: Specifies the resource identifier of the location. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Specifies the resource identifier of the location. - * - * @param id the id value to set. - * @return the LocationInner object itself. - */ - public LocationInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: Specifies the name of the location. Use List Locations to get all supported locations. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Specifies the name of the location. Use List Locations to get all supported locations. - * - * @param name the name value to set. - * @return the LocationInner object itself. - */ - public LocationInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: Specifies the type of the location. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Specifies the type of the location. - * - * @param type the type value to set. - * @return the LocationInner object itself. - */ - public LocationInner withType(String type) { - this.type = type; - return this; - } - - /** - * Get the innerProperties property: location properties. - * - * @return the innerProperties value. - */ - private LocationProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the recipientName property: The recipient name to use when shipping the drives to the Azure data center. - * - * @return the recipientName value. - */ - public String recipientName() { - return this.innerProperties() == null ? null : this.innerProperties().recipientName(); - } - - /** - * Set the recipientName property: The recipient name to use when shipping the drives to the Azure data center. - * - * @param recipientName the recipientName value to set. - * @return the LocationInner object itself. - */ - public LocationInner withRecipientName(String recipientName) { - if (this.innerProperties() == null) { - this.innerProperties = new LocationProperties(); - } - this.innerProperties().withRecipientName(recipientName); - return this; - } - - /** - * Get the streetAddress1 property: The first line of the street address to use when shipping the drives to the - * Azure data center. - * - * @return the streetAddress1 value. - */ - public String streetAddress1() { - return this.innerProperties() == null ? null : this.innerProperties().streetAddress1(); - } - - /** - * Set the streetAddress1 property: The first line of the street address to use when shipping the drives to the - * Azure data center. - * - * @param streetAddress1 the streetAddress1 value to set. - * @return the LocationInner object itself. - */ - public LocationInner withStreetAddress1(String streetAddress1) { - if (this.innerProperties() == null) { - this.innerProperties = new LocationProperties(); - } - this.innerProperties().withStreetAddress1(streetAddress1); - return this; - } - - /** - * Get the streetAddress2 property: The second line of the street address to use when shipping the drives to the - * Azure data center. - * - * @return the streetAddress2 value. - */ - public String streetAddress2() { - return this.innerProperties() == null ? null : this.innerProperties().streetAddress2(); - } - - /** - * Set the streetAddress2 property: The second line of the street address to use when shipping the drives to the - * Azure data center. - * - * @param streetAddress2 the streetAddress2 value to set. - * @return the LocationInner object itself. - */ - public LocationInner withStreetAddress2(String streetAddress2) { - if (this.innerProperties() == null) { - this.innerProperties = new LocationProperties(); - } - this.innerProperties().withStreetAddress2(streetAddress2); - return this; - } - - /** - * Get the city property: The city name to use when shipping the drives to the Azure data center. - * - * @return the city value. - */ - public String city() { - return this.innerProperties() == null ? null : this.innerProperties().city(); - } - - /** - * Set the city property: The city name to use when shipping the drives to the Azure data center. - * - * @param city the city value to set. - * @return the LocationInner object itself. - */ - public LocationInner withCity(String city) { - if (this.innerProperties() == null) { - this.innerProperties = new LocationProperties(); - } - this.innerProperties().withCity(city); - return this; - } - - /** - * Get the stateOrProvince property: The state or province to use when shipping the drives to the Azure data center. - * - * @return the stateOrProvince value. - */ - public String stateOrProvince() { - return this.innerProperties() == null ? null : this.innerProperties().stateOrProvince(); - } - - /** - * Set the stateOrProvince property: The state or province to use when shipping the drives to the Azure data center. - * - * @param stateOrProvince the stateOrProvince value to set. - * @return the LocationInner object itself. - */ - public LocationInner withStateOrProvince(String stateOrProvince) { - if (this.innerProperties() == null) { - this.innerProperties = new LocationProperties(); - } - this.innerProperties().withStateOrProvince(stateOrProvince); - return this; - } - - /** - * Get the postalCode property: The postal code to use when shipping the drives to the Azure data center. - * - * @return the postalCode value. - */ - public String postalCode() { - return this.innerProperties() == null ? null : this.innerProperties().postalCode(); - } - - /** - * Set the postalCode property: The postal code to use when shipping the drives to the Azure data center. - * - * @param postalCode the postalCode value to set. - * @return the LocationInner object itself. - */ - public LocationInner withPostalCode(String postalCode) { - if (this.innerProperties() == null) { - this.innerProperties = new LocationProperties(); - } - this.innerProperties().withPostalCode(postalCode); - return this; - } - - /** - * Get the countryOrRegion property: The country or region to use when shipping the drives to the Azure data center. - * - * @return the countryOrRegion value. - */ - public String countryOrRegion() { - return this.innerProperties() == null ? null : this.innerProperties().countryOrRegion(); - } - - /** - * Set the countryOrRegion property: The country or region to use when shipping the drives to the Azure data center. - * - * @param countryOrRegion the countryOrRegion value to set. - * @return the LocationInner object itself. - */ - public LocationInner withCountryOrRegion(String countryOrRegion) { - if (this.innerProperties() == null) { - this.innerProperties = new LocationProperties(); - } - this.innerProperties().withCountryOrRegion(countryOrRegion); - return this; - } - - /** - * Get the phone property: The phone number for the Azure data center. - * - * @return the phone value. - */ - public String phone() { - return this.innerProperties() == null ? null : this.innerProperties().phone(); - } - - /** - * Set the phone property: The phone number for the Azure data center. - * - * @param phone the phone value to set. - * @return the LocationInner object itself. - */ - public LocationInner withPhone(String phone) { - if (this.innerProperties() == null) { - this.innerProperties = new LocationProperties(); - } - this.innerProperties().withPhone(phone); - return this; - } - - /** - * Get the additionalShippingInformation property: Additional shipping information for customer, specific to - * datacenter to which customer should send their disks. - * - * @return the additionalShippingInformation value. - */ - public String additionalShippingInformation() { - return this.innerProperties() == null ? null : this.innerProperties().additionalShippingInformation(); - } - - /** - * Set the additionalShippingInformation property: Additional shipping information for customer, specific to - * datacenter to which customer should send their disks. - * - * @param additionalShippingInformation the additionalShippingInformation value to set. - * @return the LocationInner object itself. - */ - public LocationInner withAdditionalShippingInformation(String additionalShippingInformation) { - if (this.innerProperties() == null) { - this.innerProperties = new LocationProperties(); - } - this.innerProperties().withAdditionalShippingInformation(additionalShippingInformation); - return this; - } - - /** - * Get the supportedCarriers property: A list of carriers that are supported at this location. - * - * @return the supportedCarriers value. - */ - public List supportedCarriers() { - return this.innerProperties() == null ? null : this.innerProperties().supportedCarriers(); - } - - /** - * Set the supportedCarriers property: A list of carriers that are supported at this location. - * - * @param supportedCarriers the supportedCarriers value to set. - * @return the LocationInner object itself. - */ - public LocationInner withSupportedCarriers(List supportedCarriers) { - if (this.innerProperties() == null) { - this.innerProperties = new LocationProperties(); - } - this.innerProperties().withSupportedCarriers(supportedCarriers); - return this; - } - - /** - * Get the alternateLocations property: A list of location IDs that should be used to ship shipping drives to for - * jobs created against the current location. If the current location is active, it will be part of the list. If it - * is temporarily closed due to maintenance, this list may contain other locations. - * - * @return the alternateLocations value. - */ - public List alternateLocations() { - return this.innerProperties() == null ? null : this.innerProperties().alternateLocations(); - } - - /** - * Set the alternateLocations property: A list of location IDs that should be used to ship shipping drives to for - * jobs created against the current location. If the current location is active, it will be part of the list. If it - * is temporarily closed due to maintenance, this list may contain other locations. - * - * @param alternateLocations the alternateLocations value to set. - * @return the LocationInner object itself. - */ - public LocationInner withAlternateLocations(List alternateLocations) { - if (this.innerProperties() == null) { - this.innerProperties = new LocationProperties(); - } - this.innerProperties().withAlternateLocations(alternateLocations); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LocationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LocationInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the LocationInner. - */ - public static LocationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LocationInner deserializedLocationInner = new LocationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedLocationInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedLocationInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedLocationInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedLocationInner.innerProperties = LocationProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedLocationInner; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/LocationProperties.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/LocationProperties.java deleted file mode 100644 index 2ab4f210f608..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/LocationProperties.java +++ /dev/null @@ -1,390 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * location properties. - */ -@Fluent -public final class LocationProperties implements JsonSerializable { - /* - * The recipient name to use when shipping the drives to the Azure data center. - */ - private String recipientName; - - /* - * The first line of the street address to use when shipping the drives to the Azure data center. - */ - private String streetAddress1; - - /* - * The second line of the street address to use when shipping the drives to the Azure data center. - */ - private String streetAddress2; - - /* - * The city name to use when shipping the drives to the Azure data center. - */ - private String city; - - /* - * The state or province to use when shipping the drives to the Azure data center. - */ - private String stateOrProvince; - - /* - * The postal code to use when shipping the drives to the Azure data center. - */ - private String postalCode; - - /* - * The country or region to use when shipping the drives to the Azure data center. - */ - private String countryOrRegion; - - /* - * The phone number for the Azure data center. - */ - private String phone; - - /* - * Additional shipping information for customer, specific to datacenter to which customer should send their disks. - */ - private String additionalShippingInformation; - - /* - * A list of carriers that are supported at this location. - */ - private List supportedCarriers; - - /* - * A list of location IDs that should be used to ship shipping drives to for jobs created against the current - * location. If the current location is active, it will be part of the list. If it is temporarily closed due to - * maintenance, this list may contain other locations. - */ - private List alternateLocations; - - /** - * Creates an instance of LocationProperties class. - */ - public LocationProperties() { - } - - /** - * Get the recipientName property: The recipient name to use when shipping the drives to the Azure data center. - * - * @return the recipientName value. - */ - public String recipientName() { - return this.recipientName; - } - - /** - * Set the recipientName property: The recipient name to use when shipping the drives to the Azure data center. - * - * @param recipientName the recipientName value to set. - * @return the LocationProperties object itself. - */ - public LocationProperties withRecipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Get the streetAddress1 property: The first line of the street address to use when shipping the drives to the - * Azure data center. - * - * @return the streetAddress1 value. - */ - public String streetAddress1() { - return this.streetAddress1; - } - - /** - * Set the streetAddress1 property: The first line of the street address to use when shipping the drives to the - * Azure data center. - * - * @param streetAddress1 the streetAddress1 value to set. - * @return the LocationProperties object itself. - */ - public LocationProperties withStreetAddress1(String streetAddress1) { - this.streetAddress1 = streetAddress1; - return this; - } - - /** - * Get the streetAddress2 property: The second line of the street address to use when shipping the drives to the - * Azure data center. - * - * @return the streetAddress2 value. - */ - public String streetAddress2() { - return this.streetAddress2; - } - - /** - * Set the streetAddress2 property: The second line of the street address to use when shipping the drives to the - * Azure data center. - * - * @param streetAddress2 the streetAddress2 value to set. - * @return the LocationProperties object itself. - */ - public LocationProperties withStreetAddress2(String streetAddress2) { - this.streetAddress2 = streetAddress2; - return this; - } - - /** - * Get the city property: The city name to use when shipping the drives to the Azure data center. - * - * @return the city value. - */ - public String city() { - return this.city; - } - - /** - * Set the city property: The city name to use when shipping the drives to the Azure data center. - * - * @param city the city value to set. - * @return the LocationProperties object itself. - */ - public LocationProperties withCity(String city) { - this.city = city; - return this; - } - - /** - * Get the stateOrProvince property: The state or province to use when shipping the drives to the Azure data center. - * - * @return the stateOrProvince value. - */ - public String stateOrProvince() { - return this.stateOrProvince; - } - - /** - * Set the stateOrProvince property: The state or province to use when shipping the drives to the Azure data center. - * - * @param stateOrProvince the stateOrProvince value to set. - * @return the LocationProperties object itself. - */ - public LocationProperties withStateOrProvince(String stateOrProvince) { - this.stateOrProvince = stateOrProvince; - return this; - } - - /** - * Get the postalCode property: The postal code to use when shipping the drives to the Azure data center. - * - * @return the postalCode value. - */ - public String postalCode() { - return this.postalCode; - } - - /** - * Set the postalCode property: The postal code to use when shipping the drives to the Azure data center. - * - * @param postalCode the postalCode value to set. - * @return the LocationProperties object itself. - */ - public LocationProperties withPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } - - /** - * Get the countryOrRegion property: The country or region to use when shipping the drives to the Azure data center. - * - * @return the countryOrRegion value. - */ - public String countryOrRegion() { - return this.countryOrRegion; - } - - /** - * Set the countryOrRegion property: The country or region to use when shipping the drives to the Azure data center. - * - * @param countryOrRegion the countryOrRegion value to set. - * @return the LocationProperties object itself. - */ - public LocationProperties withCountryOrRegion(String countryOrRegion) { - this.countryOrRegion = countryOrRegion; - return this; - } - - /** - * Get the phone property: The phone number for the Azure data center. - * - * @return the phone value. - */ - public String phone() { - return this.phone; - } - - /** - * Set the phone property: The phone number for the Azure data center. - * - * @param phone the phone value to set. - * @return the LocationProperties object itself. - */ - public LocationProperties withPhone(String phone) { - this.phone = phone; - return this; - } - - /** - * Get the additionalShippingInformation property: Additional shipping information for customer, specific to - * datacenter to which customer should send their disks. - * - * @return the additionalShippingInformation value. - */ - public String additionalShippingInformation() { - return this.additionalShippingInformation; - } - - /** - * Set the additionalShippingInformation property: Additional shipping information for customer, specific to - * datacenter to which customer should send their disks. - * - * @param additionalShippingInformation the additionalShippingInformation value to set. - * @return the LocationProperties object itself. - */ - public LocationProperties withAdditionalShippingInformation(String additionalShippingInformation) { - this.additionalShippingInformation = additionalShippingInformation; - return this; - } - - /** - * Get the supportedCarriers property: A list of carriers that are supported at this location. - * - * @return the supportedCarriers value. - */ - public List supportedCarriers() { - return this.supportedCarriers; - } - - /** - * Set the supportedCarriers property: A list of carriers that are supported at this location. - * - * @param supportedCarriers the supportedCarriers value to set. - * @return the LocationProperties object itself. - */ - public LocationProperties withSupportedCarriers(List supportedCarriers) { - this.supportedCarriers = supportedCarriers; - return this; - } - - /** - * Get the alternateLocations property: A list of location IDs that should be used to ship shipping drives to for - * jobs created against the current location. If the current location is active, it will be part of the list. If it - * is temporarily closed due to maintenance, this list may contain other locations. - * - * @return the alternateLocations value. - */ - public List alternateLocations() { - return this.alternateLocations; - } - - /** - * Set the alternateLocations property: A list of location IDs that should be used to ship shipping drives to for - * jobs created against the current location. If the current location is active, it will be part of the list. If it - * is temporarily closed due to maintenance, this list may contain other locations. - * - * @param alternateLocations the alternateLocations value to set. - * @return the LocationProperties object itself. - */ - public LocationProperties withAlternateLocations(List alternateLocations) { - this.alternateLocations = alternateLocations; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recipientName", this.recipientName); - jsonWriter.writeStringField("streetAddress1", this.streetAddress1); - jsonWriter.writeStringField("streetAddress2", this.streetAddress2); - jsonWriter.writeStringField("city", this.city); - jsonWriter.writeStringField("stateOrProvince", this.stateOrProvince); - jsonWriter.writeStringField("postalCode", this.postalCode); - jsonWriter.writeStringField("countryOrRegion", this.countryOrRegion); - jsonWriter.writeStringField("phone", this.phone); - jsonWriter.writeStringField("additionalShippingInformation", this.additionalShippingInformation); - jsonWriter.writeArrayField("supportedCarriers", this.supportedCarriers, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("alternateLocations", this.alternateLocations, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LocationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LocationProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the LocationProperties. - */ - public static LocationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LocationProperties deserializedLocationProperties = new LocationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recipientName".equals(fieldName)) { - deserializedLocationProperties.recipientName = reader.getString(); - } else if ("streetAddress1".equals(fieldName)) { - deserializedLocationProperties.streetAddress1 = reader.getString(); - } else if ("streetAddress2".equals(fieldName)) { - deserializedLocationProperties.streetAddress2 = reader.getString(); - } else if ("city".equals(fieldName)) { - deserializedLocationProperties.city = reader.getString(); - } else if ("stateOrProvince".equals(fieldName)) { - deserializedLocationProperties.stateOrProvince = reader.getString(); - } else if ("postalCode".equals(fieldName)) { - deserializedLocationProperties.postalCode = reader.getString(); - } else if ("countryOrRegion".equals(fieldName)) { - deserializedLocationProperties.countryOrRegion = reader.getString(); - } else if ("phone".equals(fieldName)) { - deserializedLocationProperties.phone = reader.getString(); - } else if ("additionalShippingInformation".equals(fieldName)) { - deserializedLocationProperties.additionalShippingInformation = reader.getString(); - } else if ("supportedCarriers".equals(fieldName)) { - List supportedCarriers = reader.readArray(reader1 -> reader1.getString()); - deserializedLocationProperties.supportedCarriers = supportedCarriers; - } else if ("alternateLocations".equals(fieldName)) { - List alternateLocations = reader.readArray(reader1 -> reader1.getString()); - deserializedLocationProperties.alternateLocations = alternateLocations; - } else { - reader.skipChildren(); - } - } - - return deserializedLocationProperties; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/OperationDisplay.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/OperationDisplay.java deleted file mode 100644 index e3cc4b874f79..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/OperationDisplay.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * operation display properties. - */ -@Fluent -public final class OperationDisplay implements JsonSerializable { - /* - * The resource provider name to which the operation belongs. - */ - private String provider; - - /* - * The name of the resource to which the operation belongs. - */ - private String resource; - - /* - * The display name of the operation. - */ - private String operation; - - /* - * Short description of the operation. - */ - private String description; - - /** - * Creates an instance of OperationDisplay class. - */ - public OperationDisplay() { - } - - /** - * Get the provider property: The resource provider name to which the operation belongs. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider property: The resource provider name to which the operation belongs. - * - * @param provider the provider value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource property: The name of the resource to which the operation belongs. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource property: The name of the resource to which the operation belongs. - * - * @param resource the resource value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation property: The display name of the operation. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation property: The display name of the operation. - * - * @param operation the operation value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the description property: Short description of the operation. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Short description of the operation. - * - * @param description the description value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("provider", this.provider); - jsonWriter.writeStringField("resource", this.resource); - jsonWriter.writeStringField("operation", this.operation); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationDisplay from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationDisplay. - */ - public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationDisplay deserializedOperationDisplay = new OperationDisplay(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provider".equals(fieldName)) { - deserializedOperationDisplay.provider = reader.getString(); - } else if ("resource".equals(fieldName)) { - deserializedOperationDisplay.resource = reader.getString(); - } else if ("operation".equals(fieldName)) { - deserializedOperationDisplay.operation = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedOperationDisplay.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationDisplay; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/OperationInner.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/OperationInner.java deleted file mode 100644 index b37aee22a834..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/OperationInner.java +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes a supported operation by the Storage Import/Export job API. - */ -@Fluent -public final class OperationInner implements JsonSerializable { - /* - * Name of the operation. - */ - private String name; - - /* - * operation display properties - */ - private OperationDisplay innerDisplay = new OperationDisplay(); - - /** - * Creates an instance of OperationInner class. - */ - public OperationInner() { - } - - /** - * Get the name property: Name of the operation. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the operation. - * - * @param name the name value to set. - * @return the OperationInner object itself. - */ - public OperationInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the innerDisplay property: operation display properties. - * - * @return the innerDisplay value. - */ - private OperationDisplay innerDisplay() { - return this.innerDisplay; - } - - /** - * Get the provider property: The resource provider name to which the operation belongs. - * - * @return the provider value. - */ - public String provider() { - return this.innerDisplay() == null ? null : this.innerDisplay().provider(); - } - - /** - * Set the provider property: The resource provider name to which the operation belongs. - * - * @param provider the provider value to set. - * @return the OperationInner object itself. - */ - public OperationInner withProvider(String provider) { - if (this.innerDisplay() == null) { - this.innerDisplay = new OperationDisplay(); - } - this.innerDisplay().withProvider(provider); - return this; - } - - /** - * Get the resource property: The name of the resource to which the operation belongs. - * - * @return the resource value. - */ - public String resource() { - return this.innerDisplay() == null ? null : this.innerDisplay().resource(); - } - - /** - * Set the resource property: The name of the resource to which the operation belongs. - * - * @param resource the resource value to set. - * @return the OperationInner object itself. - */ - public OperationInner withResource(String resource) { - if (this.innerDisplay() == null) { - this.innerDisplay = new OperationDisplay(); - } - this.innerDisplay().withResource(resource); - return this; - } - - /** - * Get the operation property: The display name of the operation. - * - * @return the operation value. - */ - public String operation() { - return this.innerDisplay() == null ? null : this.innerDisplay().operation(); - } - - /** - * Set the operation property: The display name of the operation. - * - * @param operation the operation value to set. - * @return the OperationInner object itself. - */ - public OperationInner withOperation(String operation) { - if (this.innerDisplay() == null) { - this.innerDisplay = new OperationDisplay(); - } - this.innerDisplay().withOperation(operation); - return this; - } - - /** - * Get the description property: Short description of the operation. - * - * @return the description value. - */ - public String description() { - return this.innerDisplay() == null ? null : this.innerDisplay().description(); - } - - /** - * Set the description property: Short description of the operation. - * - * @param description the description value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDescription(String description) { - if (this.innerDisplay() == null) { - this.innerDisplay = new OperationDisplay(); - } - this.innerDisplay().withDescription(description); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model OperationInner")); - } - if (innerDisplay() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property innerDisplay in model OperationInner")); - } else { - innerDisplay().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OperationInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("display", this.innerDisplay); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OperationInner. - */ - public static OperationInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationInner deserializedOperationInner = new OperationInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOperationInner.name = reader.getString(); - } else if ("display".equals(fieldName)) { - deserializedOperationInner.innerDisplay = OperationDisplay.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationInner; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/UpdateJobParametersProperties.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/UpdateJobParametersProperties.java deleted file mode 100644 index de6fe602a6bb..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/UpdateJobParametersProperties.java +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.storageimportexport.models.DeliveryPackageInformation; -import com.azure.resourcemanager.storageimportexport.models.DriveStatus; -import com.azure.resourcemanager.storageimportexport.models.ReturnAddress; -import com.azure.resourcemanager.storageimportexport.models.ReturnShipping; -import java.io.IOException; -import java.util.List; - -/** - * Specifies the properties of a UpdateJob. - */ -@Fluent -public final class UpdateJobParametersProperties implements JsonSerializable { - /* - * If specified, the value must be true. The service will attempt to cancel the job. - */ - private Boolean cancelRequested; - - /* - * If specified, the value must be Shipping, which tells the Import/Export service that the package for the job has - * been shipped. The ReturnAddress and DeliveryPackage properties must have been set either in this request or in a - * previous request, otherwise the request will fail. - */ - private String state; - - /* - * Specifies the return address information for the job. - */ - private ReturnAddress returnAddress; - - /* - * Specifies the return carrier and customer's account with the carrier. - */ - private ReturnShipping returnShipping; - - /* - * Contains information about the package being shipped by the customer to the Microsoft data center. - */ - private DeliveryPackageInformation deliveryPackage; - - /* - * Indicates whether error logging or verbose logging is enabled. - */ - private String logLevel; - - /* - * Indicates whether the manifest files on the drives should be copied to block blobs. - */ - private Boolean backupDriveManifest; - - /* - * List of drives that comprise the job. - */ - private List driveList; - - /** - * Creates an instance of UpdateJobParametersProperties class. - */ - public UpdateJobParametersProperties() { - } - - /** - * Get the cancelRequested property: If specified, the value must be true. The service will attempt to cancel the - * job. - * - * @return the cancelRequested value. - */ - public Boolean cancelRequested() { - return this.cancelRequested; - } - - /** - * Set the cancelRequested property: If specified, the value must be true. The service will attempt to cancel the - * job. - * - * @param cancelRequested the cancelRequested value to set. - * @return the UpdateJobParametersProperties object itself. - */ - public UpdateJobParametersProperties withCancelRequested(Boolean cancelRequested) { - this.cancelRequested = cancelRequested; - return this; - } - - /** - * Get the state property: If specified, the value must be Shipping, which tells the Import/Export service that the - * package for the job has been shipped. The ReturnAddress and DeliveryPackage properties must have been set either - * in this request or in a previous request, otherwise the request will fail. - * - * @return the state value. - */ - public String state() { - return this.state; - } - - /** - * Set the state property: If specified, the value must be Shipping, which tells the Import/Export service that the - * package for the job has been shipped. The ReturnAddress and DeliveryPackage properties must have been set either - * in this request or in a previous request, otherwise the request will fail. - * - * @param state the state value to set. - * @return the UpdateJobParametersProperties object itself. - */ - public UpdateJobParametersProperties withState(String state) { - this.state = state; - return this; - } - - /** - * Get the returnAddress property: Specifies the return address information for the job. - * - * @return the returnAddress value. - */ - public ReturnAddress returnAddress() { - return this.returnAddress; - } - - /** - * Set the returnAddress property: Specifies the return address information for the job. - * - * @param returnAddress the returnAddress value to set. - * @return the UpdateJobParametersProperties object itself. - */ - public UpdateJobParametersProperties withReturnAddress(ReturnAddress returnAddress) { - this.returnAddress = returnAddress; - return this; - } - - /** - * Get the returnShipping property: Specifies the return carrier and customer's account with the carrier. - * - * @return the returnShipping value. - */ - public ReturnShipping returnShipping() { - return this.returnShipping; - } - - /** - * Set the returnShipping property: Specifies the return carrier and customer's account with the carrier. - * - * @param returnShipping the returnShipping value to set. - * @return the UpdateJobParametersProperties object itself. - */ - public UpdateJobParametersProperties withReturnShipping(ReturnShipping returnShipping) { - this.returnShipping = returnShipping; - return this; - } - - /** - * Get the deliveryPackage property: Contains information about the package being shipped by the customer to the - * Microsoft data center. - * - * @return the deliveryPackage value. - */ - public DeliveryPackageInformation deliveryPackage() { - return this.deliveryPackage; - } - - /** - * Set the deliveryPackage property: Contains information about the package being shipped by the customer to the - * Microsoft data center. - * - * @param deliveryPackage the deliveryPackage value to set. - * @return the UpdateJobParametersProperties object itself. - */ - public UpdateJobParametersProperties withDeliveryPackage(DeliveryPackageInformation deliveryPackage) { - this.deliveryPackage = deliveryPackage; - return this; - } - - /** - * Get the logLevel property: Indicates whether error logging or verbose logging is enabled. - * - * @return the logLevel value. - */ - public String logLevel() { - return this.logLevel; - } - - /** - * Set the logLevel property: Indicates whether error logging or verbose logging is enabled. - * - * @param logLevel the logLevel value to set. - * @return the UpdateJobParametersProperties object itself. - */ - public UpdateJobParametersProperties withLogLevel(String logLevel) { - this.logLevel = logLevel; - return this; - } - - /** - * Get the backupDriveManifest property: Indicates whether the manifest files on the drives should be copied to - * block blobs. - * - * @return the backupDriveManifest value. - */ - public Boolean backupDriveManifest() { - return this.backupDriveManifest; - } - - /** - * Set the backupDriveManifest property: Indicates whether the manifest files on the drives should be copied to - * block blobs. - * - * @param backupDriveManifest the backupDriveManifest value to set. - * @return the UpdateJobParametersProperties object itself. - */ - public UpdateJobParametersProperties withBackupDriveManifest(Boolean backupDriveManifest) { - this.backupDriveManifest = backupDriveManifest; - return this; - } - - /** - * Get the driveList property: List of drives that comprise the job. - * - * @return the driveList value. - */ - public List driveList() { - return this.driveList; - } - - /** - * Set the driveList property: List of drives that comprise the job. - * - * @param driveList the driveList value to set. - * @return the UpdateJobParametersProperties object itself. - */ - public UpdateJobParametersProperties withDriveList(List driveList) { - this.driveList = driveList; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (returnAddress() != null) { - returnAddress().validate(); - } - if (returnShipping() != null) { - returnShipping().validate(); - } - if (deliveryPackage() != null) { - deliveryPackage().validate(); - } - if (driveList() != null) { - driveList().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("cancelRequested", this.cancelRequested); - jsonWriter.writeStringField("state", this.state); - jsonWriter.writeJsonField("returnAddress", this.returnAddress); - jsonWriter.writeJsonField("returnShipping", this.returnShipping); - jsonWriter.writeJsonField("deliveryPackage", this.deliveryPackage); - jsonWriter.writeStringField("logLevel", this.logLevel); - jsonWriter.writeBooleanField("backupDriveManifest", this.backupDriveManifest); - jsonWriter.writeArrayField("driveList", this.driveList, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateJobParametersProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateJobParametersProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateJobParametersProperties. - */ - public static UpdateJobParametersProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateJobParametersProperties deserializedUpdateJobParametersProperties - = new UpdateJobParametersProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("cancelRequested".equals(fieldName)) { - deserializedUpdateJobParametersProperties.cancelRequested - = reader.getNullable(JsonReader::getBoolean); - } else if ("state".equals(fieldName)) { - deserializedUpdateJobParametersProperties.state = reader.getString(); - } else if ("returnAddress".equals(fieldName)) { - deserializedUpdateJobParametersProperties.returnAddress = ReturnAddress.fromJson(reader); - } else if ("returnShipping".equals(fieldName)) { - deserializedUpdateJobParametersProperties.returnShipping = ReturnShipping.fromJson(reader); - } else if ("deliveryPackage".equals(fieldName)) { - deserializedUpdateJobParametersProperties.deliveryPackage - = DeliveryPackageInformation.fromJson(reader); - } else if ("logLevel".equals(fieldName)) { - deserializedUpdateJobParametersProperties.logLevel = reader.getString(); - } else if ("backupDriveManifest".equals(fieldName)) { - deserializedUpdateJobParametersProperties.backupDriveManifest - = reader.getNullable(JsonReader::getBoolean); - } else if ("driveList".equals(fieldName)) { - List driveList = reader.readArray(reader1 -> DriveStatus.fromJson(reader1)); - deserializedUpdateJobParametersProperties.driveList = driveList; - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateJobParametersProperties; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/package-info.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/package-info.java deleted file mode 100644 index 1f81d637c86b..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the inner data models for StorageImportExport. - * The Storage Import/Export Resource Provider API. - */ -package com.azure.resourcemanager.storageimportexport.fluent.models; diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/package-info.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/package-info.java deleted file mode 100644 index 9cf2814eda9a..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the service clients for StorageImportExport. - * The Storage Import/Export Resource Provider API. - */ -package com.azure.resourcemanager.storageimportexport.fluent; diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/BitLockerKeysClientImpl.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/BitLockerKeysClientImpl.java deleted file mode 100644 index 59f75027a969..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/BitLockerKeysClientImpl.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.storageimportexport.fluent.BitLockerKeysClient; -import com.azure.resourcemanager.storageimportexport.fluent.models.DriveBitLockerKeyInner; -import com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException; -import com.azure.resourcemanager.storageimportexport.models.GetBitLockerKeysResponse; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in BitLockerKeysClient. - */ -public final class BitLockerKeysClientImpl implements BitLockerKeysClient { - /** - * The proxy service used to perform REST calls. - */ - private final BitLockerKeysService service; - - /** - * The service client containing this operation class. - */ - private final StorageImportExportImpl client; - - /** - * Initializes an instance of BitLockerKeysClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BitLockerKeysClientImpl(StorageImportExportImpl client) { - this.service - = RestProxy.create(BitLockerKeysService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for StorageImportExportBitLockerKeys to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "StorageImportExportB") - public interface BitLockerKeysService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}/listBitLockerKeys") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("jobName") String jobName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept-Language") String acceptLanguage, @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Returns the BitLocker Keys for all drives in the specified job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return getBitLockerKeys response along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String jobName, String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.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.list(this.client.getEndpoint(), jobName, this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), this.client.getAcceptLanguage(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns the BitLocker Keys for all drives in the specified job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return getBitLockerKeys response along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String jobName, String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.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 - .list(this.client.getEndpoint(), jobName, this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), this.client.getAcceptLanguage(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); - } - - /** - * Returns the BitLocker Keys for all drives in the specified job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return getBitLockerKeys response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String jobName, String resourceGroupName) { - return new PagedFlux<>(() -> listSinglePageAsync(jobName, resourceGroupName)); - } - - /** - * Returns the BitLocker Keys for all drives in the specified job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return getBitLockerKeys response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String jobName, String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(jobName, resourceGroupName, context)); - } - - /** - * Returns the BitLocker Keys for all drives in the specified job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return getBitLockerKeys response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String jobName, String resourceGroupName) { - return new PagedIterable<>(listAsync(jobName, resourceGroupName)); - } - - /** - * Returns the BitLocker Keys for all drives in the specified job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return getBitLockerKeys response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String jobName, String resourceGroupName, Context context) { - return new PagedIterable<>(listAsync(jobName, resourceGroupName, context)); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/BitLockerKeysImpl.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/BitLockerKeysImpl.java deleted file mode 100644 index 27e0340af439..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/BitLockerKeysImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storageimportexport.fluent.BitLockerKeysClient; -import com.azure.resourcemanager.storageimportexport.fluent.models.DriveBitLockerKeyInner; -import com.azure.resourcemanager.storageimportexport.models.BitLockerKeys; -import com.azure.resourcemanager.storageimportexport.models.DriveBitLockerKey; - -public final class BitLockerKeysImpl implements BitLockerKeys { - private static final ClientLogger LOGGER = new ClientLogger(BitLockerKeysImpl.class); - - private final BitLockerKeysClient innerClient; - - private final com.azure.resourcemanager.storageimportexport.StorageImportExportManager serviceManager; - - public BitLockerKeysImpl(BitLockerKeysClient innerClient, - com.azure.resourcemanager.storageimportexport.StorageImportExportManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String jobName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(jobName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DriveBitLockerKeyImpl(inner1, this.manager())); - } - - public PagedIterable list(String jobName, String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().list(jobName, resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DriveBitLockerKeyImpl(inner1, this.manager())); - } - - private BitLockerKeysClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/DriveBitLockerKeyImpl.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/DriveBitLockerKeyImpl.java deleted file mode 100644 index 5992124f6666..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/DriveBitLockerKeyImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.implementation; - -import com.azure.resourcemanager.storageimportexport.fluent.models.DriveBitLockerKeyInner; -import com.azure.resourcemanager.storageimportexport.models.DriveBitLockerKey; - -public final class DriveBitLockerKeyImpl implements DriveBitLockerKey { - private DriveBitLockerKeyInner innerObject; - - private final com.azure.resourcemanager.storageimportexport.StorageImportExportManager serviceManager; - - DriveBitLockerKeyImpl(DriveBitLockerKeyInner innerObject, - com.azure.resourcemanager.storageimportexport.StorageImportExportManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String bitLockerKey() { - return this.innerModel().bitLockerKey(); - } - - public String driveId() { - return this.innerModel().driveId(); - } - - public DriveBitLockerKeyInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/JobResponseImpl.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/JobResponseImpl.java deleted file mode 100644 index 7554772547bf..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/JobResponseImpl.java +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.storageimportexport.fluent.models.JobResponseInner; -import com.azure.resourcemanager.storageimportexport.models.DeliveryPackageInformation; -import com.azure.resourcemanager.storageimportexport.models.DriveStatus; -import com.azure.resourcemanager.storageimportexport.models.IdentityDetails; -import com.azure.resourcemanager.storageimportexport.models.JobDetails; -import com.azure.resourcemanager.storageimportexport.models.JobResponse; -import com.azure.resourcemanager.storageimportexport.models.PutJobParameters; -import com.azure.resourcemanager.storageimportexport.models.ReturnAddress; -import com.azure.resourcemanager.storageimportexport.models.ReturnShipping; -import com.azure.resourcemanager.storageimportexport.models.UpdateJobParameters; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class JobResponseImpl implements JobResponse, JobResponse.Definition, JobResponse.Update { - private JobResponseInner innerObject; - - private final com.azure.resourcemanager.storageimportexport.StorageImportExportManager 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 SystemData systemData() { - return this.innerModel().systemData(); - } - - public JobDetails properties() { - return this.innerModel().properties(); - } - - public IdentityDetails identity() { - return this.innerModel().identity(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public JobResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager() { - return this.serviceManager; - } - - private String jobName; - - private String resourceGroupName; - - private String createClientTenantId; - - private PutJobParameters createBody; - - private UpdateJobParameters updateBody; - - public JobResponseImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public JobResponse create() { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .createWithResponse(jobName, resourceGroupName, createBody, createClientTenantId, Context.NONE) - .getValue(); - return this; - } - - public JobResponse create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .createWithResponse(jobName, resourceGroupName, createBody, createClientTenantId, context) - .getValue(); - return this; - } - - JobResponseImpl(String name, - com.azure.resourcemanager.storageimportexport.StorageImportExportManager serviceManager) { - this.innerObject = new JobResponseInner(); - this.serviceManager = serviceManager; - this.jobName = name; - this.createClientTenantId = null; - this.createBody = new PutJobParameters(); - } - - public JobResponseImpl update() { - this.updateBody = new UpdateJobParameters(); - return this; - } - - public JobResponse apply() { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .updateWithResponse(jobName, resourceGroupName, updateBody, Context.NONE) - .getValue(); - return this; - } - - public JobResponse apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .updateWithResponse(jobName, resourceGroupName, updateBody, context) - .getValue(); - return this; - } - - JobResponseImpl(JobResponseInner innerObject, - com.azure.resourcemanager.storageimportexport.StorageImportExportManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.jobName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "jobs"); - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - } - - public JobResponse refresh() { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .getByResourceGroupWithResponse(resourceGroupName, jobName, Context.NONE) - .getValue(); - return this; - } - - public JobResponse refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .getByResourceGroupWithResponse(resourceGroupName, jobName, context) - .getValue(); - return this; - } - - public JobResponseImpl withRegion(Region location) { - this.createBody.withLocation(location.toString()); - return this; - } - - public JobResponseImpl withRegion(String location) { - this.createBody.withLocation(location); - return this; - } - - public JobResponseImpl withTags(Object tags) { - if (isInCreateMode()) { - this.createBody.withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public JobResponseImpl withProperties(JobDetails properties) { - this.createBody.withProperties(properties); - return this; - } - - public JobResponseImpl withClientTenantId(String clientTenantId) { - this.createClientTenantId = clientTenantId; - return this; - } - - public JobResponseImpl withCancelRequested(Boolean cancelRequested) { - this.updateBody.withCancelRequested(cancelRequested); - return this; - } - - public JobResponseImpl withState(String state) { - this.updateBody.withState(state); - return this; - } - - public JobResponseImpl withReturnAddress(ReturnAddress returnAddress) { - this.updateBody.withReturnAddress(returnAddress); - return this; - } - - public JobResponseImpl withReturnShipping(ReturnShipping returnShipping) { - this.updateBody.withReturnShipping(returnShipping); - return this; - } - - public JobResponseImpl withDeliveryPackage(DeliveryPackageInformation deliveryPackage) { - this.updateBody.withDeliveryPackage(deliveryPackage); - return this; - } - - public JobResponseImpl withLogLevel(String logLevel) { - this.updateBody.withLogLevel(logLevel); - return this; - } - - public JobResponseImpl withBackupDriveManifest(Boolean backupDriveManifest) { - this.updateBody.withBackupDriveManifest(backupDriveManifest); - return this; - } - - public JobResponseImpl withDriveList(List driveList) { - this.updateBody.withDriveList(driveList); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/JobsClientImpl.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/JobsClientImpl.java deleted file mode 100644 index 02e6aba67d27..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/JobsClientImpl.java +++ /dev/null @@ -1,1102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.storageimportexport.fluent.JobsClient; -import com.azure.resourcemanager.storageimportexport.fluent.models.JobResponseInner; -import com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException; -import com.azure.resourcemanager.storageimportexport.models.ListJobsResponse; -import com.azure.resourcemanager.storageimportexport.models.PutJobParameters; -import com.azure.resourcemanager.storageimportexport.models.UpdateJobParameters; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in JobsClient. - */ -public final class JobsClientImpl implements JobsClient { - /** - * The proxy service used to perform REST calls. - */ - private final JobsService service; - - /** - * The service client containing this operation class. - */ - private final StorageImportExportImpl client; - - /** - * Initializes an instance of JobsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - JobsClientImpl(StorageImportExportImpl client) { - this.service = RestProxy.create(JobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for StorageImportExportJobs to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "StorageImportExportJ") - public interface JobsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ImportExport/jobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, @QueryParam("$top") Long top, - @QueryParam("$filter") String filter, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept-Language") String acceptLanguage, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ErrorResponseErrorException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("$top") Long top, @QueryParam("$filter") String filter, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept-Language") String acceptLanguage, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ErrorResponseErrorException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept-Language") String acceptLanguage, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ErrorResponseErrorException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("jobName") String jobName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept-Language") String acceptLanguage, - @BodyParam("application/json") UpdateJobParameters body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ErrorResponseErrorException.class) - Mono> create(@HostParam("$host") String endpoint, - @PathParam("jobName") String jobName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept-Language") String acceptLanguage, - @HeaderParam("x-ms-client-tenant-id") String clientTenantId, - @BodyParam("application/json") PutJobParameters body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept-Language") String acceptLanguage, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ErrorResponseErrorException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept-Language") String acceptLanguage, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ErrorResponseErrorException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept-Language") String acceptLanguage, @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Returns all active and completed jobs in a subscription. - * - * @param top An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. - * @param filter Can be used to restrict the results to certain conditions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Long top, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required 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(), top, filter, this.client.getSubscriptionId(), - this.client.getApiVersion(), this.client.getAcceptLanguage(), 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())); - } - - /** - * Returns all active and completed jobs in a subscription. - * - * @param top An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. - * @param filter Can be used to restrict the results to certain conditions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Long top, String filter, 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(), top, filter, this.client.getSubscriptionId(), this.client.getApiVersion(), - this.client.getAcceptLanguage(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Returns all active and completed jobs in a subscription. - * - * @param top An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. - * @param filter Can be used to restrict the results to certain conditions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Long top, String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(top, filter), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Returns all active and completed jobs in a subscription. - * - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final Long top = null; - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(top, filter), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Returns all active and completed jobs in a subscription. - * - * @param top An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. - * @param filter Can be used to restrict the results to certain conditions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Long top, String filter, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(top, filter, context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Returns all active and completed jobs in a subscription. - * - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final Long top = null; - final String filter = null; - return new PagedIterable<>(listAsync(top, filter)); - } - - /** - * Returns all active and completed jobs in a subscription. - * - * @param top An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. - * @param filter Can be used to restrict the results to certain conditions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Long top, String filter, Context context) { - return new PagedIterable<>(listAsync(top, filter, context)); - } - - /** - * Returns all active and completed jobs in a resource group. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param top An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. - * @param filter Can be used to restrict the results to certain conditions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, Long top, - String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.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(), top, filter, - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), - this.client.getAcceptLanguage(), 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())); - } - - /** - * Returns all active and completed jobs in a resource group. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param top An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. - * @param filter Can be used to restrict the results to certain conditions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, Long top, - String filter, 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(), top, filter, this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), this.client.getAcceptLanguage(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Returns all active and completed jobs in a resource group. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param top An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. - * @param filter Can be used to restrict the results to certain conditions. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Long top, String filter) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, filter), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Returns all active and completed jobs in a resource group. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final Long top = null; - final String filter = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, filter), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Returns all active and completed jobs in a resource group. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param top An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. - * @param filter Can be used to restrict the results to certain conditions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Long top, String filter, - Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, top, filter, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Returns all active and completed jobs in a resource group. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final Long top = null; - final String filter = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, top, filter)); - } - - /** - * Returns all active and completed jobs in a resource group. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param top An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. - * @param filter Can be used to restrict the results to certain conditions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Long top, String filter, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, top, filter, context)); - } - - /** - * Gets information about an existing job. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException 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 an existing job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String jobName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), jobName, this.client.getApiVersion(), this.client.getAcceptLanguage(), - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets information about an existing job. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException 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 an existing job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String jobName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - jobName, this.client.getApiVersion(), this.client.getAcceptLanguage(), accept, context); - } - - /** - * Gets information about an existing job. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException 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 an existing job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String jobName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, jobName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets information about an existing job. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException 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 an existing job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, jobName, context).block(); - } - - /** - * Gets information about an existing job. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException 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 an existing job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobResponseInner getByResourceGroup(String resourceGroupName, String jobName) { - return getByResourceGroupWithResponse(resourceGroupName, jobName, Context.NONE).getValue(); - } - - /** - * Updates specific properties of a job. You can call this operation to notify the Import/Export service that the - * hard drives comprising the import or export job have been shipped to the Microsoft data center. It can also be - * used to cancel an existing job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param body The parameters to update in the job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the job information along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String jobName, String resourceGroupName, - UpdateJobParameters body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), jobName, this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), this.client.getAcceptLanguage(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates specific properties of a job. You can call this operation to notify the Import/Export service that the - * hard drives comprising the import or export job have been shipped to the Microsoft data center. It can also be - * used to cancel an existing job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param body The parameters to update in the job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the job information along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String jobName, String resourceGroupName, - UpdateJobParameters body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), jobName, this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), this.client.getAcceptLanguage(), body, accept, context); - } - - /** - * Updates specific properties of a job. You can call this operation to notify the Import/Export service that the - * hard drives comprising the import or export job have been shipped to the Microsoft data center. It can also be - * used to cancel an existing job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param body The parameters to update in the job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the job information on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String jobName, String resourceGroupName, UpdateJobParameters body) { - return updateWithResponseAsync(jobName, resourceGroupName, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Updates specific properties of a job. You can call this operation to notify the Import/Export service that the - * hard drives comprising the import or export job have been shipped to the Microsoft data center. It can also be - * used to cancel an existing job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param body The parameters to update in the job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the job information along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String jobName, String resourceGroupName, - UpdateJobParameters body, Context context) { - return updateWithResponseAsync(jobName, resourceGroupName, body, context).block(); - } - - /** - * Updates specific properties of a job. You can call this operation to notify the Import/Export service that the - * hard drives comprising the import or export job have been shipped to the Microsoft data center. It can also be - * used to cancel an existing job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param body The parameters to update in the job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the job information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobResponseInner update(String jobName, String resourceGroupName, UpdateJobParameters body) { - return updateWithResponse(jobName, resourceGroupName, body, Context.NONE).getValue(); - } - - /** - * Creates a new job or updates an existing job in the specified subscription. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param body The parameters used for creating the job. - * @param clientTenantId The tenant ID of the client making the request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the job information along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String jobName, String resourceGroupName, - PutJobParameters body, String clientTenantId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), jobName, this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), this.client.getAcceptLanguage(), clientTenantId, body, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a new job or updates an existing job in the specified subscription. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param body The parameters used for creating the job. - * @param clientTenantId The tenant ID of the client making the request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the job information along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String jobName, String resourceGroupName, - PutJobParameters body, String clientTenantId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), jobName, this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), this.client.getAcceptLanguage(), clientTenantId, body, accept, context); - } - - /** - * Creates a new job or updates an existing job in the specified subscription. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param body The parameters used for creating the job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the job information on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String jobName, String resourceGroupName, PutJobParameters body) { - final String clientTenantId = null; - return createWithResponseAsync(jobName, resourceGroupName, body, clientTenantId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates a new job or updates an existing job in the specified subscription. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param body The parameters used for creating the job. - * @param clientTenantId The tenant ID of the client making the request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the job information along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(String jobName, String resourceGroupName, - PutJobParameters body, String clientTenantId, Context context) { - return createWithResponseAsync(jobName, resourceGroupName, body, clientTenantId, context).block(); - } - - /** - * Creates a new job or updates an existing job in the specified subscription. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param body The parameters used for creating the job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains the job information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobResponseInner create(String jobName, String resourceGroupName, PutJobParameters body) { - final String clientTenantId = null; - return createWithResponse(jobName, resourceGroupName, body, clientTenantId, Context.NONE).getValue(); - } - - /** - * Deletes an existing job. Only jobs in the Creating or Completed states can be deleted. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String jobName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - jobName, this.client.getApiVersion(), this.client.getAcceptLanguage(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes an existing job. Only jobs in the Creating or Completed states can be deleted. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String jobName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), jobName, - this.client.getApiVersion(), this.client.getAcceptLanguage(), accept, context); - } - - /** - * Deletes an existing job. Only jobs in the Creating or Completed states can be deleted. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String jobName) { - return deleteWithResponseAsync(resourceGroupName, jobName).flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes an existing job. Only jobs in the Creating or Completed states can be deleted. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String jobName, Context context) { - return deleteWithResponseAsync(resourceGroupName, jobName, context).block(); - } - - /** - * Deletes an existing job. Only jobs in the Creating or Completed states can be deleted. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException 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 jobName) { - deleteWithResponse(resourceGroupName, jobName, Context.NONE); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), - this.client.getAcceptLanguage(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), this.client.getAcceptLanguage(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), - this.client.getAcceptLanguage(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), this.client.getAcceptLanguage(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/JobsImpl.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/JobsImpl.java deleted file mode 100644 index b788dec7771f..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/JobsImpl.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.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.storageimportexport.fluent.JobsClient; -import com.azure.resourcemanager.storageimportexport.fluent.models.JobResponseInner; -import com.azure.resourcemanager.storageimportexport.models.JobResponse; -import com.azure.resourcemanager.storageimportexport.models.Jobs; - -public final class JobsImpl implements Jobs { - private static final ClientLogger LOGGER = new ClientLogger(JobsImpl.class); - - private final JobsClient innerClient; - - private final com.azure.resourcemanager.storageimportexport.StorageImportExportManager serviceManager; - - public JobsImpl(JobsClient innerClient, - com.azure.resourcemanager.storageimportexport.StorageImportExportManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobResponseImpl(inner1, this.manager())); - } - - public PagedIterable list(Long top, String filter, Context context) { - PagedIterable inner = this.serviceClient().list(top, filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobResponseImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobResponseImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Long top, String filter, - Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, top, filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobResponseImpl(inner1, this.manager())); - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, jobName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new JobResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public JobResponse getByResourceGroup(String resourceGroupName, String jobName) { - JobResponseInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, jobName); - if (inner != null) { - return new JobResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteByResourceGroupWithResponse(String resourceGroupName, String jobName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, jobName, context); - } - - public void deleteByResourceGroup(String resourceGroupName, String jobName) { - this.serviceClient().delete(resourceGroupName, jobName); - } - - public JobResponse getById(String id) { - String resourceGroupName = ResourceManagerUtils.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 jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, jobName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, jobName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.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 jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - this.deleteByResourceGroupWithResponse(resourceGroupName, jobName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.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 jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.deleteByResourceGroupWithResponse(resourceGroupName, jobName, context); - } - - private JobsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager() { - return this.serviceManager; - } - - public JobResponseImpl define(String name) { - return new JobResponseImpl(name, this.manager()); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/LocationImpl.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/LocationImpl.java deleted file mode 100644 index 95059e5359a1..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/LocationImpl.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.implementation; - -import com.azure.resourcemanager.storageimportexport.fluent.models.LocationInner; -import com.azure.resourcemanager.storageimportexport.models.Location; -import java.util.Collections; -import java.util.List; - -public final class LocationImpl implements Location { - private LocationInner innerObject; - - private final com.azure.resourcemanager.storageimportexport.StorageImportExportManager serviceManager; - - LocationImpl(LocationInner innerObject, - com.azure.resourcemanager.storageimportexport.StorageImportExportManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String recipientName() { - return this.innerModel().recipientName(); - } - - public String streetAddress1() { - return this.innerModel().streetAddress1(); - } - - public String streetAddress2() { - return this.innerModel().streetAddress2(); - } - - public String city() { - return this.innerModel().city(); - } - - public String stateOrProvince() { - return this.innerModel().stateOrProvince(); - } - - public String postalCode() { - return this.innerModel().postalCode(); - } - - public String countryOrRegion() { - return this.innerModel().countryOrRegion(); - } - - public String phone() { - return this.innerModel().phone(); - } - - public String additionalShippingInformation() { - return this.innerModel().additionalShippingInformation(); - } - - public List supportedCarriers() { - List inner = this.innerModel().supportedCarriers(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List alternateLocations() { - List inner = this.innerModel().alternateLocations(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public LocationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/LocationsClientImpl.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/LocationsClientImpl.java deleted file mode 100644 index e841c4c3f443..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/LocationsClientImpl.java +++ /dev/null @@ -1,286 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.storageimportexport.fluent.LocationsClient; -import com.azure.resourcemanager.storageimportexport.fluent.models.LocationInner; -import com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException; -import com.azure.resourcemanager.storageimportexport.models.LocationsResponse; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in LocationsClient. - */ -public final class LocationsClientImpl implements LocationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final LocationsService service; - - /** - * The service client containing this operation class. - */ - private final StorageImportExportImpl client; - - /** - * Initializes an instance of LocationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - LocationsClientImpl(StorageImportExportImpl client) { - this.service - = RestProxy.create(LocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for StorageImportExportLocations to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "StorageImportExportL") - public interface LocationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.ImportExport/locations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept-Language") String acceptLanguage, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.ImportExport/locations/{locationName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("locationName") String locationName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept-Language") String acceptLanguage, @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Returns a list of locations to which you can ship the disks associated with an import or export job. A location - * is a Microsoft data center region. - * - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return locations response along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getAcceptLanguage(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns a list of locations to which you can ship the disks associated with an import or export job. A location - * is a Microsoft data center region. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return locations response along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getAcceptLanguage(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); - } - - /** - * Returns a list of locations to which you can ship the disks associated with an import or export job. A location - * is a Microsoft data center region. - * - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return locations response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync()); - } - - /** - * Returns a list of locations to which you can ship the disks associated with an import or export job. A location - * is a Microsoft data center region. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return locations response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context)); - } - - /** - * Returns a list of locations to which you can ship the disks associated with an import or export job. A location - * is a Microsoft data center region. - * - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return locations response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Returns a list of locations to which you can ship the disks associated with an import or export job. A location - * is a Microsoft data center region. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return locations response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Returns the details about a location to which you can ship the disks associated with an import or export job. A - * location is an Azure region. - * - * @param locationName The name of the location. For example, West US or westus. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provides information about an Azure data center location along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String locationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), locationName, this.client.getApiVersion(), - this.client.getAcceptLanguage(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns the details about a location to which you can ship the disks associated with an import or export job. A - * location is an Azure region. - * - * @param locationName The name of the location. For example, West US or westus. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provides information about an Azure data center location along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String locationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), locationName, this.client.getApiVersion(), - this.client.getAcceptLanguage(), accept, context); - } - - /** - * Returns the details about a location to which you can ship the disks associated with an import or export job. A - * location is an Azure region. - * - * @param locationName The name of the location. For example, West US or westus. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provides information about an Azure data center location on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String locationName) { - return getWithResponseAsync(locationName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Returns the details about a location to which you can ship the disks associated with an import or export job. A - * location is an Azure region. - * - * @param locationName The name of the location. For example, West US or westus. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provides information about an Azure data center location along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String locationName, Context context) { - return getWithResponseAsync(locationName, context).block(); - } - - /** - * Returns the details about a location to which you can ship the disks associated with an import or export job. A - * location is an Azure region. - * - * @param locationName The name of the location. For example, West US or westus. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provides information about an Azure data center location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LocationInner get(String locationName) { - return getWithResponse(locationName, Context.NONE).getValue(); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/LocationsImpl.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/LocationsImpl.java deleted file mode 100644 index 13236672ecf2..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/LocationsImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.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.storageimportexport.fluent.LocationsClient; -import com.azure.resourcemanager.storageimportexport.fluent.models.LocationInner; -import com.azure.resourcemanager.storageimportexport.models.Location; -import com.azure.resourcemanager.storageimportexport.models.Locations; - -public final class LocationsImpl implements Locations { - private static final ClientLogger LOGGER = new ClientLogger(LocationsImpl.class); - - private final LocationsClient innerClient; - - private final com.azure.resourcemanager.storageimportexport.StorageImportExportManager serviceManager; - - public LocationsImpl(LocationsClient innerClient, - com.azure.resourcemanager.storageimportexport.StorageImportExportManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LocationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LocationImpl(inner1, this.manager())); - } - - public Response getWithResponse(String locationName, Context context) { - Response inner = this.serviceClient().getWithResponse(locationName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new LocationImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Location get(String locationName) { - LocationInner inner = this.serviceClient().get(locationName); - if (inner != null) { - return new LocationImpl(inner, this.manager()); - } else { - return null; - } - } - - private LocationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/OperationImpl.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/OperationImpl.java deleted file mode 100644 index bf2d5c662fdf..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/OperationImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.implementation; - -import com.azure.resourcemanager.storageimportexport.fluent.models.OperationInner; -import com.azure.resourcemanager.storageimportexport.models.Operation; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.storageimportexport.StorageImportExportManager serviceManager; - - OperationImpl(OperationInner innerObject, - com.azure.resourcemanager.storageimportexport.StorageImportExportManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public String provider() { - return this.innerModel().provider(); - } - - public String resource() { - return this.innerModel().resource(); - } - - public String operation() { - return this.innerModel().operation(); - } - - public String description() { - return this.innerModel().description(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/OperationsClientImpl.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/OperationsClientImpl.java deleted file mode 100644 index c3ecc1741df8..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.storageimportexport.fluent.OperationsClient; -import com.azure.resourcemanager.storageimportexport.fluent.models.OperationInner; -import com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException; -import com.azure.resourcemanager.storageimportexport.models.ListOperationsResponse; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public final class OperationsClientImpl implements OperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OperationsService service; - - /** - * The service client containing this operation class. - */ - private final StorageImportExportImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(StorageImportExportImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for StorageImportExportOperations to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "StorageImportExportO") - public interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.ImportExport/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept-Language") String acceptLanguage, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Returns the list of operations supported by the import/export resource provider. - * - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list operations response along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getAcceptLanguage(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns the list of operations supported by the import/export resource provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list operations response along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getAcceptLanguage(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); - } - - /** - * Returns the list of operations supported by the import/export resource provider. - * - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list operations response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync()); - } - - /** - * Returns the list of operations supported by the import/export resource provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list operations response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context)); - } - - /** - * Returns the list of operations supported by the import/export resource provider. - * - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list operations response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Returns the list of operations supported by the import/export resource provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list operations response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/OperationsImpl.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/OperationsImpl.java deleted file mode 100644 index 0d9a250018e2..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/OperationsImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.storageimportexport.fluent.OperationsClient; -import com.azure.resourcemanager.storageimportexport.fluent.models.OperationInner; -import com.azure.resourcemanager.storageimportexport.models.Operation; -import com.azure.resourcemanager.storageimportexport.models.Operations; - -public final class OperationsImpl implements Operations { - private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.storageimportexport.StorageImportExportManager serviceManager; - - public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.storageimportexport.StorageImportExportManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/ResourceManagerUtils.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/ResourceManagerUtils.java deleted file mode 100644 index 84300568dba6..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/ResourceManagerUtils.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.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 ResourceManagerUtils { - private ResourceManagerUtils() { - } - - 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.isEmpty() && 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<>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl<>(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/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/StorageImportExportBuilder.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/StorageImportExportBuilder.java deleted file mode 100644 index 3e55729ed2cd..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/StorageImportExportBuilder.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** - * A builder for creating a new instance of the StorageImportExportImpl type. - */ -@ServiceClientBuilder(serviceClients = { StorageImportExportImpl.class }) -public final class StorageImportExportBuilder { - /* - * The subscription ID for the Azure user. - */ - private String subscriptionId; - - /** - * Sets The subscription ID for the Azure user. - * - * @param subscriptionId the subscriptionId value. - * @return the StorageImportExportBuilder. - */ - public StorageImportExportBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * Specifies the preferred language for the response. - */ - private String acceptLanguage; - - /** - * Sets Specifies the preferred language for the response. - * - * @param acceptLanguage the acceptLanguage value. - * @return the StorageImportExportBuilder. - */ - public StorageImportExportBuilder acceptLanguage(String acceptLanguage) { - this.acceptLanguage = acceptLanguage; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the StorageImportExportBuilder. - */ - public StorageImportExportBuilder 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 StorageImportExportBuilder. - */ - public StorageImportExportBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the StorageImportExportBuilder. - */ - public StorageImportExportBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the StorageImportExportBuilder. - */ - public StorageImportExportBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the StorageImportExportBuilder. - */ - public StorageImportExportBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of StorageImportExportImpl with the provided parameters. - * - * @return an instance of StorageImportExportImpl. - */ - public StorageImportExportImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; - AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval - = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - StorageImportExportImpl client = new StorageImportExportImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, this.subscriptionId, this.acceptLanguage, localEndpoint); - return client; - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/StorageImportExportImpl.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/StorageImportExportImpl.java deleted file mode 100644 index d21c2375356f..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/StorageImportExportImpl.java +++ /dev/null @@ -1,353 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.implementation; - -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.storageimportexport.fluent.BitLockerKeysClient; -import com.azure.resourcemanager.storageimportexport.fluent.JobsClient; -import com.azure.resourcemanager.storageimportexport.fluent.LocationsClient; -import com.azure.resourcemanager.storageimportexport.fluent.OperationsClient; -import com.azure.resourcemanager.storageimportexport.fluent.StorageImportExport; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * Initializes a new instance of the StorageImportExportImpl type. - */ -@ServiceClient(builder = StorageImportExportBuilder.class) -public final class StorageImportExportImpl implements StorageImportExport { - /** - * The subscription ID for the Azure user. - */ - private final String subscriptionId; - - /** - * Gets The subscription ID for the Azure user. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * Specifies the preferred language for the response. - */ - private final String acceptLanguage; - - /** - * Gets Specifies the preferred language for the response. - * - * @return the acceptLanguage value. - */ - public String getAcceptLanguage() { - return this.acceptLanguage; - } - - /** - * 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 LocationsClient object to access its operations. - */ - private final LocationsClient locations; - - /** - * Gets the LocationsClient object to access its operations. - * - * @return the LocationsClient object. - */ - public LocationsClient getLocations() { - return this.locations; - } - - /** - * The JobsClient object to access its operations. - */ - private final JobsClient jobs; - - /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. - */ - public JobsClient getJobs() { - return this.jobs; - } - - /** - * The BitLockerKeysClient object to access its operations. - */ - private final BitLockerKeysClient bitLockerKeys; - - /** - * Gets the BitLockerKeysClient object to access its operations. - * - * @return the BitLockerKeysClient object. - */ - public BitLockerKeysClient getBitLockerKeys() { - return this.bitLockerKeys; - } - - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * Initializes an instance of StorageImportExport 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 subscription ID for the Azure user. - * @param acceptLanguage Specifies the preferred language for the response. - * @param endpoint server parameter. - */ - StorageImportExportImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String acceptLanguage, - String endpoint) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; - this.acceptLanguage = acceptLanguage; - this.endpoint = endpoint; - this.apiVersion = "2021-01-01"; - this.locations = new LocationsClientImpl(this); - this.jobs = new JobsClientImpl(this); - this.bitLockerKeys = new BitLockerKeysClientImpl(this); - this.operations = new OperationsClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - return CoreUtils.mergeContexts(this.getContext(), context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult(Mono>> activationResponse, - HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { - return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, activationResponse, context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), - lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = this.getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - LOGGER.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(HttpHeaderName.fromString(s)); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(StorageImportExportImpl.class); -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/package-info.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/package-info.java deleted file mode 100644 index 71327de1788f..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/implementation/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the implementations for StorageImportExport. - * The Storage Import/Export Resource Provider API. - */ -package com.azure.resourcemanager.storageimportexport.implementation; diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/BitLockerKeys.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/BitLockerKeys.java deleted file mode 100644 index dd9b40cf8df5..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/BitLockerKeys.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of BitLockerKeys. - */ -public interface BitLockerKeys { - /** - * Returns the BitLocker Keys for all drives in the specified job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return getBitLockerKeys response as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String jobName, String resourceGroupName); - - /** - * Returns the BitLocker Keys for all drives in the specified job. - * - * @param jobName The name of the import/export job. - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return getBitLockerKeys response as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String jobName, String resourceGroupName, Context context); -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/DeliveryPackageInformation.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/DeliveryPackageInformation.java deleted file mode 100644 index b7e4ae9bec16..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/DeliveryPackageInformation.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Contains information about the delivery package being shipped by the customer to the Microsoft data center. - */ -@Fluent -public final class DeliveryPackageInformation implements JsonSerializable { - /* - * The name of the carrier that is used to ship the import or export drives. - */ - private String carrierName; - - /* - * The tracking number of the package. - */ - private String trackingNumber; - - /* - * The number of drives included in the package. - */ - private Long driveCount; - - /* - * The date when the package is shipped. - */ - private String shipDate; - - /** - * Creates an instance of DeliveryPackageInformation class. - */ - public DeliveryPackageInformation() { - } - - /** - * Get the carrierName property: The name of the carrier that is used to ship the import or export drives. - * - * @return the carrierName value. - */ - public String carrierName() { - return this.carrierName; - } - - /** - * Set the carrierName property: The name of the carrier that is used to ship the import or export drives. - * - * @param carrierName the carrierName value to set. - * @return the DeliveryPackageInformation object itself. - */ - public DeliveryPackageInformation withCarrierName(String carrierName) { - this.carrierName = carrierName; - return this; - } - - /** - * Get the trackingNumber property: The tracking number of the package. - * - * @return the trackingNumber value. - */ - public String trackingNumber() { - return this.trackingNumber; - } - - /** - * Set the trackingNumber property: The tracking number of the package. - * - * @param trackingNumber the trackingNumber value to set. - * @return the DeliveryPackageInformation object itself. - */ - public DeliveryPackageInformation withTrackingNumber(String trackingNumber) { - this.trackingNumber = trackingNumber; - return this; - } - - /** - * Get the driveCount property: The number of drives included in the package. - * - * @return the driveCount value. - */ - public Long driveCount() { - return this.driveCount; - } - - /** - * Set the driveCount property: The number of drives included in the package. - * - * @param driveCount the driveCount value to set. - * @return the DeliveryPackageInformation object itself. - */ - public DeliveryPackageInformation withDriveCount(Long driveCount) { - this.driveCount = driveCount; - return this; - } - - /** - * Get the shipDate property: The date when the package is shipped. - * - * @return the shipDate value. - */ - public String shipDate() { - return this.shipDate; - } - - /** - * Set the shipDate property: The date when the package is shipped. - * - * @param shipDate the shipDate value to set. - * @return the DeliveryPackageInformation object itself. - */ - public DeliveryPackageInformation withShipDate(String shipDate) { - this.shipDate = shipDate; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (carrierName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property carrierName in model DeliveryPackageInformation")); - } - if (trackingNumber() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property trackingNumber in model DeliveryPackageInformation")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DeliveryPackageInformation.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("carrierName", this.carrierName); - jsonWriter.writeStringField("trackingNumber", this.trackingNumber); - jsonWriter.writeNumberField("driveCount", this.driveCount); - jsonWriter.writeStringField("shipDate", this.shipDate); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DeliveryPackageInformation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DeliveryPackageInformation if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DeliveryPackageInformation. - */ - public static DeliveryPackageInformation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DeliveryPackageInformation deserializedDeliveryPackageInformation = new DeliveryPackageInformation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("carrierName".equals(fieldName)) { - deserializedDeliveryPackageInformation.carrierName = reader.getString(); - } else if ("trackingNumber".equals(fieldName)) { - deserializedDeliveryPackageInformation.trackingNumber = reader.getString(); - } else if ("driveCount".equals(fieldName)) { - deserializedDeliveryPackageInformation.driveCount = reader.getNullable(JsonReader::getLong); - } else if ("shipDate".equals(fieldName)) { - deserializedDeliveryPackageInformation.shipDate = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDeliveryPackageInformation; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/DriveBitLockerKey.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/DriveBitLockerKey.java deleted file mode 100644 index e17076594421..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/DriveBitLockerKey.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.resourcemanager.storageimportexport.fluent.models.DriveBitLockerKeyInner; - -/** - * An immutable client-side representation of DriveBitLockerKey. - */ -public interface DriveBitLockerKey { - /** - * Gets the bitLockerKey property: BitLocker recovery key or password. - * - * @return the bitLockerKey value. - */ - String bitLockerKey(); - - /** - * Gets the driveId property: Drive ID. - * - * @return the driveId value. - */ - String driveId(); - - /** - * Gets the inner com.azure.resourcemanager.storageimportexport.fluent.models.DriveBitLockerKeyInner object. - * - * @return the inner object. - */ - DriveBitLockerKeyInner innerModel(); -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/DriveState.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/DriveState.java deleted file mode 100644 index 4108bebd8497..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/DriveState.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The drive's current state. - */ -public final class DriveState extends ExpandableStringEnum { - /** - * Static value Specified for DriveState. - */ - public static final DriveState SPECIFIED = fromString("Specified"); - - /** - * Static value Received for DriveState. - */ - public static final DriveState RECEIVED = fromString("Received"); - - /** - * Static value NeverReceived for DriveState. - */ - public static final DriveState NEVER_RECEIVED = fromString("NeverReceived"); - - /** - * Static value Transferring for DriveState. - */ - public static final DriveState TRANSFERRING = fromString("Transferring"); - - /** - * Static value Completed for DriveState. - */ - public static final DriveState COMPLETED = fromString("Completed"); - - /** - * Static value CompletedMoreInfo for DriveState. - */ - public static final DriveState COMPLETED_MORE_INFO = fromString("CompletedMoreInfo"); - - /** - * Static value ShippedBack for DriveState. - */ - public static final DriveState SHIPPED_BACK = fromString("ShippedBack"); - - /** - * Creates a new instance of DriveState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DriveState() { - } - - /** - * Creates or finds a DriveState from its string representation. - * - * @param name a name to look for. - * @return the corresponding DriveState. - */ - public static DriveState fromString(String name) { - return fromString(name, DriveState.class); - } - - /** - * Gets known DriveState values. - * - * @return known DriveState values. - */ - public static Collection values() { - return values(DriveState.class); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/DriveStatus.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/DriveStatus.java deleted file mode 100644 index 249e3d4d3d80..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/DriveStatus.java +++ /dev/null @@ -1,408 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Provides information about the drive's status. - */ -@Fluent -public final class DriveStatus implements JsonSerializable { - /* - * The drive's hardware serial number, without spaces. - */ - private String driveId; - - /* - * The BitLocker key used to encrypt the drive. - */ - private String bitLockerKey; - - /* - * The relative path of the manifest file on the drive. - */ - private String manifestFile; - - /* - * The Base16-encoded MD5 hash of the manifest file on the drive. - */ - private String manifestHash; - - /* - * The drive header hash value. - */ - private String driveHeaderHash; - - /* - * The drive's current state. - */ - private DriveState state; - - /* - * Detailed status about the data transfer process. This field is not returned in the response until the drive is in - * the Transferring state. - */ - private String copyStatus; - - /* - * Percentage completed for the drive. - */ - private Long percentComplete; - - /* - * A URI that points to the blob containing the verbose log for the data transfer operation. - */ - private String verboseLogUri; - - /* - * A URI that points to the blob containing the error log for the data transfer operation. - */ - private String errorLogUri; - - /* - * A URI that points to the blob containing the drive manifest file. - */ - private String manifestUri; - - /* - * Bytes successfully transferred for the drive. - */ - private Long bytesSucceeded; - - /** - * Creates an instance of DriveStatus class. - */ - public DriveStatus() { - } - - /** - * Get the driveId property: The drive's hardware serial number, without spaces. - * - * @return the driveId value. - */ - public String driveId() { - return this.driveId; - } - - /** - * Set the driveId property: The drive's hardware serial number, without spaces. - * - * @param driveId the driveId value to set. - * @return the DriveStatus object itself. - */ - public DriveStatus withDriveId(String driveId) { - this.driveId = driveId; - return this; - } - - /** - * Get the bitLockerKey property: The BitLocker key used to encrypt the drive. - * - * @return the bitLockerKey value. - */ - public String bitLockerKey() { - return this.bitLockerKey; - } - - /** - * Set the bitLockerKey property: The BitLocker key used to encrypt the drive. - * - * @param bitLockerKey the bitLockerKey value to set. - * @return the DriveStatus object itself. - */ - public DriveStatus withBitLockerKey(String bitLockerKey) { - this.bitLockerKey = bitLockerKey; - return this; - } - - /** - * Get the manifestFile property: The relative path of the manifest file on the drive. - * - * @return the manifestFile value. - */ - public String manifestFile() { - return this.manifestFile; - } - - /** - * Set the manifestFile property: The relative path of the manifest file on the drive. - * - * @param manifestFile the manifestFile value to set. - * @return the DriveStatus object itself. - */ - public DriveStatus withManifestFile(String manifestFile) { - this.manifestFile = manifestFile; - return this; - } - - /** - * Get the manifestHash property: The Base16-encoded MD5 hash of the manifest file on the drive. - * - * @return the manifestHash value. - */ - public String manifestHash() { - return this.manifestHash; - } - - /** - * Set the manifestHash property: The Base16-encoded MD5 hash of the manifest file on the drive. - * - * @param manifestHash the manifestHash value to set. - * @return the DriveStatus object itself. - */ - public DriveStatus withManifestHash(String manifestHash) { - this.manifestHash = manifestHash; - return this; - } - - /** - * Get the driveHeaderHash property: The drive header hash value. - * - * @return the driveHeaderHash value. - */ - public String driveHeaderHash() { - return this.driveHeaderHash; - } - - /** - * Set the driveHeaderHash property: The drive header hash value. - * - * @param driveHeaderHash the driveHeaderHash value to set. - * @return the DriveStatus object itself. - */ - public DriveStatus withDriveHeaderHash(String driveHeaderHash) { - this.driveHeaderHash = driveHeaderHash; - return this; - } - - /** - * Get the state property: The drive's current state. - * - * @return the state value. - */ - public DriveState state() { - return this.state; - } - - /** - * Set the state property: The drive's current state. - * - * @param state the state value to set. - * @return the DriveStatus object itself. - */ - public DriveStatus withState(DriveState state) { - this.state = state; - return this; - } - - /** - * Get the copyStatus property: Detailed status about the data transfer process. This field is not returned in the - * response until the drive is in the Transferring state. - * - * @return the copyStatus value. - */ - public String copyStatus() { - return this.copyStatus; - } - - /** - * Set the copyStatus property: Detailed status about the data transfer process. This field is not returned in the - * response until the drive is in the Transferring state. - * - * @param copyStatus the copyStatus value to set. - * @return the DriveStatus object itself. - */ - public DriveStatus withCopyStatus(String copyStatus) { - this.copyStatus = copyStatus; - return this; - } - - /** - * Get the percentComplete property: Percentage completed for the drive. - * - * @return the percentComplete value. - */ - public Long percentComplete() { - return this.percentComplete; - } - - /** - * Set the percentComplete property: Percentage completed for the drive. - * - * @param percentComplete the percentComplete value to set. - * @return the DriveStatus object itself. - */ - public DriveStatus withPercentComplete(Long percentComplete) { - this.percentComplete = percentComplete; - return this; - } - - /** - * Get the verboseLogUri property: A URI that points to the blob containing the verbose log for the data transfer - * operation. - * - * @return the verboseLogUri value. - */ - public String verboseLogUri() { - return this.verboseLogUri; - } - - /** - * Set the verboseLogUri property: A URI that points to the blob containing the verbose log for the data transfer - * operation. - * - * @param verboseLogUri the verboseLogUri value to set. - * @return the DriveStatus object itself. - */ - public DriveStatus withVerboseLogUri(String verboseLogUri) { - this.verboseLogUri = verboseLogUri; - return this; - } - - /** - * Get the errorLogUri property: A URI that points to the blob containing the error log for the data transfer - * operation. - * - * @return the errorLogUri value. - */ - public String errorLogUri() { - return this.errorLogUri; - } - - /** - * Set the errorLogUri property: A URI that points to the blob containing the error log for the data transfer - * operation. - * - * @param errorLogUri the errorLogUri value to set. - * @return the DriveStatus object itself. - */ - public DriveStatus withErrorLogUri(String errorLogUri) { - this.errorLogUri = errorLogUri; - return this; - } - - /** - * Get the manifestUri property: A URI that points to the blob containing the drive manifest file. - * - * @return the manifestUri value. - */ - public String manifestUri() { - return this.manifestUri; - } - - /** - * Set the manifestUri property: A URI that points to the blob containing the drive manifest file. - * - * @param manifestUri the manifestUri value to set. - * @return the DriveStatus object itself. - */ - public DriveStatus withManifestUri(String manifestUri) { - this.manifestUri = manifestUri; - return this; - } - - /** - * Get the bytesSucceeded property: Bytes successfully transferred for the drive. - * - * @return the bytesSucceeded value. - */ - public Long bytesSucceeded() { - return this.bytesSucceeded; - } - - /** - * Set the bytesSucceeded property: Bytes successfully transferred for the drive. - * - * @param bytesSucceeded the bytesSucceeded value to set. - * @return the DriveStatus object itself. - */ - public DriveStatus withBytesSucceeded(Long bytesSucceeded) { - this.bytesSucceeded = bytesSucceeded; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("driveId", this.driveId); - jsonWriter.writeStringField("bitLockerKey", this.bitLockerKey); - jsonWriter.writeStringField("manifestFile", this.manifestFile); - jsonWriter.writeStringField("manifestHash", this.manifestHash); - jsonWriter.writeStringField("driveHeaderHash", this.driveHeaderHash); - jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); - jsonWriter.writeStringField("copyStatus", this.copyStatus); - jsonWriter.writeNumberField("percentComplete", this.percentComplete); - jsonWriter.writeStringField("verboseLogUri", this.verboseLogUri); - jsonWriter.writeStringField("errorLogUri", this.errorLogUri); - jsonWriter.writeStringField("manifestUri", this.manifestUri); - jsonWriter.writeNumberField("bytesSucceeded", this.bytesSucceeded); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DriveStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DriveStatus if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DriveStatus. - */ - public static DriveStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DriveStatus deserializedDriveStatus = new DriveStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("driveId".equals(fieldName)) { - deserializedDriveStatus.driveId = reader.getString(); - } else if ("bitLockerKey".equals(fieldName)) { - deserializedDriveStatus.bitLockerKey = reader.getString(); - } else if ("manifestFile".equals(fieldName)) { - deserializedDriveStatus.manifestFile = reader.getString(); - } else if ("manifestHash".equals(fieldName)) { - deserializedDriveStatus.manifestHash = reader.getString(); - } else if ("driveHeaderHash".equals(fieldName)) { - deserializedDriveStatus.driveHeaderHash = reader.getString(); - } else if ("state".equals(fieldName)) { - deserializedDriveStatus.state = DriveState.fromString(reader.getString()); - } else if ("copyStatus".equals(fieldName)) { - deserializedDriveStatus.copyStatus = reader.getString(); - } else if ("percentComplete".equals(fieldName)) { - deserializedDriveStatus.percentComplete = reader.getNullable(JsonReader::getLong); - } else if ("verboseLogUri".equals(fieldName)) { - deserializedDriveStatus.verboseLogUri = reader.getString(); - } else if ("errorLogUri".equals(fieldName)) { - deserializedDriveStatus.errorLogUri = reader.getString(); - } else if ("manifestUri".equals(fieldName)) { - deserializedDriveStatus.manifestUri = reader.getString(); - } else if ("bytesSucceeded".equals(fieldName)) { - deserializedDriveStatus.bytesSucceeded = reader.getNullable(JsonReader::getLong); - } else { - reader.skipChildren(); - } - } - - return deserializedDriveStatus; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/EncryptionKekType.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/EncryptionKekType.java deleted file mode 100644 index 301aee505b38..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/EncryptionKekType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of kek encryption key. - */ -public final class EncryptionKekType extends ExpandableStringEnum { - /** - * Static value MicrosoftManaged for EncryptionKekType. - */ - public static final EncryptionKekType MICROSOFT_MANAGED = fromString("MicrosoftManaged"); - - /** - * Static value CustomerManaged for EncryptionKekType. - */ - public static final EncryptionKekType CUSTOMER_MANAGED = fromString("CustomerManaged"); - - /** - * Creates a new instance of EncryptionKekType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EncryptionKekType() { - } - - /** - * Creates or finds a EncryptionKekType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EncryptionKekType. - */ - public static EncryptionKekType fromString(String name) { - return fromString(name, EncryptionKekType.class); - } - - /** - * Gets known EncryptionKekType values. - * - * @return known EncryptionKekType values. - */ - public static Collection values() { - return values(EncryptionKekType.class); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/EncryptionKeyDetails.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/EncryptionKeyDetails.java deleted file mode 100644 index 61a071559a73..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/EncryptionKeyDetails.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies the encryption key properties. - */ -@Fluent -public final class EncryptionKeyDetails implements JsonSerializable { - /* - * The type of kek encryption key - */ - private EncryptionKekType kekType; - - /* - * Specifies the url for kek encryption key. - */ - private String kekUrl; - - /* - * Specifies the keyvault resource id for kek encryption key. - */ - private String kekVaultResourceId; - - /** - * Creates an instance of EncryptionKeyDetails class. - */ - public EncryptionKeyDetails() { - } - - /** - * Get the kekType property: The type of kek encryption key. - * - * @return the kekType value. - */ - public EncryptionKekType kekType() { - return this.kekType; - } - - /** - * Set the kekType property: The type of kek encryption key. - * - * @param kekType the kekType value to set. - * @return the EncryptionKeyDetails object itself. - */ - public EncryptionKeyDetails withKekType(EncryptionKekType kekType) { - this.kekType = kekType; - return this; - } - - /** - * Get the kekUrl property: Specifies the url for kek encryption key. - * - * @return the kekUrl value. - */ - public String kekUrl() { - return this.kekUrl; - } - - /** - * Set the kekUrl property: Specifies the url for kek encryption key. - * - * @param kekUrl the kekUrl value to set. - * @return the EncryptionKeyDetails object itself. - */ - public EncryptionKeyDetails withKekUrl(String kekUrl) { - this.kekUrl = kekUrl; - return this; - } - - /** - * Get the kekVaultResourceId property: Specifies the keyvault resource id for kek encryption key. - * - * @return the kekVaultResourceId value. - */ - public String kekVaultResourceId() { - return this.kekVaultResourceId; - } - - /** - * Set the kekVaultResourceId property: Specifies the keyvault resource id for kek encryption key. - * - * @param kekVaultResourceId the kekVaultResourceId value to set. - * @return the EncryptionKeyDetails object itself. - */ - public EncryptionKeyDetails withKekVaultResourceId(String kekVaultResourceId) { - this.kekVaultResourceId = kekVaultResourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("kekType", this.kekType == null ? null : this.kekType.toString()); - jsonWriter.writeStringField("kekUrl", this.kekUrl); - jsonWriter.writeStringField("kekVaultResourceID", this.kekVaultResourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EncryptionKeyDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EncryptionKeyDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the EncryptionKeyDetails. - */ - public static EncryptionKeyDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EncryptionKeyDetails deserializedEncryptionKeyDetails = new EncryptionKeyDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("kekType".equals(fieldName)) { - deserializedEncryptionKeyDetails.kekType = EncryptionKekType.fromString(reader.getString()); - } else if ("kekUrl".equals(fieldName)) { - deserializedEncryptionKeyDetails.kekUrl = reader.getString(); - } else if ("kekVaultResourceID".equals(fieldName)) { - deserializedEncryptionKeyDetails.kekVaultResourceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEncryptionKeyDetails; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ErrorResponseError.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ErrorResponseError.java deleted file mode 100644 index 98e117ec0f29..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ErrorResponseError.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.AdditionalInfo; -import com.azure.core.management.exception.ManagementError; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Response when errors occurred. - */ -@Immutable -public final class ErrorResponseError extends ManagementError { - /* - * Inner error object if present. - */ - private Object innererror; - - /* - * Additional info for the error. - */ - private List additionalInfo; - - /* - * Details for the error. - */ - private List details; - - /* - * The target of the error. - */ - private String target; - - /* - * The error message parsed from the body of the http error response. - */ - private String message; - - /* - * The error code parsed from the body of the http error response. - */ - private String code; - - /** - * Creates an instance of ErrorResponseError class. - */ - public ErrorResponseError() { - } - - /** - * Get the innererror property: Inner error object if present. - * - * @return the innererror value. - */ - public Object getInnererror() { - return this.innererror; - } - - /** - * Get the additionalInfo property: Additional info for the error. - * - * @return the additionalInfo value. - */ - @Override - public List getAdditionalInfo() { - return this.additionalInfo; - } - - /** - * Get the details property: Details for the error. - * - * @return the details value. - */ - @Override - public List getDetails() { - return this.details; - } - - /** - * Get the target property: The target of the error. - * - * @return the target value. - */ - @Override - public String getTarget() { - return this.target; - } - - /** - * Get the message property: The error message parsed from the body of the http error response. - * - * @return the message value. - */ - @Override - public String getMessage() { - return this.message; - } - - /** - * Get the code property: The error code parsed from the body of the http error response. - * - * @return the code value. - */ - @Override - public String getCode() { - return this.code; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ErrorResponseError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ErrorResponseError if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ErrorResponseError. - */ - public static ErrorResponseError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JsonReader bufferedReader = reader.bufferObject(); - bufferedReader.nextToken(); - while (bufferedReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = bufferedReader.getFieldName(); - bufferedReader.nextToken(); - - if ("error".equals(fieldName)) { - return readManagementError(bufferedReader); - } else { - bufferedReader.skipChildren(); - } - } - return readManagementError(bufferedReader.reset()); - }); - } - - private static ErrorResponseError readManagementError(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ErrorResponseError deserializedErrorResponseError = new ErrorResponseError(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedErrorResponseError.code = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedErrorResponseError.message = reader.getString(); - } else if ("target".equals(fieldName)) { - deserializedErrorResponseError.target = reader.getString(); - } else if ("details".equals(fieldName)) { - List details = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedErrorResponseError.details = details; - } else if ("additionalInfo".equals(fieldName)) { - List additionalInfo = reader.readArray(reader1 -> AdditionalInfo.fromJson(reader1)); - deserializedErrorResponseError.additionalInfo = additionalInfo; - } else if ("innererror".equals(fieldName)) { - deserializedErrorResponseError.innererror = reader.readUntyped(); - } else { - reader.skipChildren(); - } - } - - return deserializedErrorResponseError; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ErrorResponseErrorException.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ErrorResponseErrorException.java deleted file mode 100644 index a5c025af5580..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ErrorResponseErrorException.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.http.HttpResponse; -import com.azure.core.management.exception.ManagementException; - -/** - * Exception thrown for an invalid response with ErrorResponseError information. - */ -public final class ErrorResponseErrorException extends ManagementException { - /** - * Initializes a new instance of the ErrorResponseErrorException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - */ - public ErrorResponseErrorException(String message, HttpResponse response) { - super(message, response); - } - - /** - * Initializes a new instance of the ErrorResponseErrorException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - * @param value the deserialized response value. - */ - public ErrorResponseErrorException(String message, HttpResponse response, ErrorResponseError value) { - super(message, response, value); - } - - /** - * {@inheritDoc} - */ - @Override - public ErrorResponseError getValue() { - return (ErrorResponseError) super.getValue(); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Export.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Export.java deleted file mode 100644 index 1ce8a7cb240e..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Export.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.storageimportexport.fluent.models.ExportBlobList; -import java.io.IOException; -import java.util.List; - -/** - * A property containing information about the blobs to be exported for an export job. This property is required for - * export jobs, but must not be specified for import jobs. - */ -@Fluent -public final class Export implements JsonSerializable { - /* - * A list of the blobs to be exported. - */ - private ExportBlobList innerBlobList; - - /* - * The relative URI to the block blob that contains the list of blob paths or blob path prefixes as defined above, - * beginning with the container name. If the blob is in root container, the URI must begin with $root. - */ - private String blobListBlobPath; - - /** - * Creates an instance of Export class. - */ - public Export() { - } - - /** - * Get the innerBlobList property: A list of the blobs to be exported. - * - * @return the innerBlobList value. - */ - private ExportBlobList innerBlobList() { - return this.innerBlobList; - } - - /** - * Get the blobListBlobPath property: The relative URI to the block blob that contains the list of blob paths or - * blob path prefixes as defined above, beginning with the container name. If the blob is in root container, the URI - * must begin with $root. - * - * @return the blobListBlobPath value. - */ - public String blobListBlobPath() { - return this.blobListBlobPath; - } - - /** - * Set the blobListBlobPath property: The relative URI to the block blob that contains the list of blob paths or - * blob path prefixes as defined above, beginning with the container name. If the blob is in root container, the URI - * must begin with $root. - * - * @param blobListBlobPath the blobListBlobPath value to set. - * @return the Export object itself. - */ - public Export withBlobListBlobPath(String blobListBlobPath) { - this.blobListBlobPath = blobListBlobPath; - return this; - } - - /** - * Get the blobPath property: A collection of blob-path strings. - * - * @return the blobPath value. - */ - public List blobPath() { - return this.innerBlobList() == null ? null : this.innerBlobList().blobPath(); - } - - /** - * Set the blobPath property: A collection of blob-path strings. - * - * @param blobPath the blobPath value to set. - * @return the Export object itself. - */ - public Export withBlobPath(List blobPath) { - if (this.innerBlobList() == null) { - this.innerBlobList = new ExportBlobList(); - } - this.innerBlobList().withBlobPath(blobPath); - return this; - } - - /** - * Get the blobPathPrefix property: A collection of blob-prefix strings. - * - * @return the blobPathPrefix value. - */ - public List blobPathPrefix() { - return this.innerBlobList() == null ? null : this.innerBlobList().blobPathPrefix(); - } - - /** - * Set the blobPathPrefix property: A collection of blob-prefix strings. - * - * @param blobPathPrefix the blobPathPrefix value to set. - * @return the Export object itself. - */ - public Export withBlobPathPrefix(List blobPathPrefix) { - if (this.innerBlobList() == null) { - this.innerBlobList = new ExportBlobList(); - } - this.innerBlobList().withBlobPathPrefix(blobPathPrefix); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerBlobList() != null) { - innerBlobList().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("blobList", this.innerBlobList); - jsonWriter.writeStringField("blobListBlobPath", this.blobListBlobPath); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Export from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Export if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Export. - */ - public static Export fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Export deserializedExport = new Export(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("blobList".equals(fieldName)) { - deserializedExport.innerBlobList = ExportBlobList.fromJson(reader); - } else if ("blobListBlobPath".equals(fieldName)) { - deserializedExport.blobListBlobPath = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedExport; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/GetBitLockerKeysResponse.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/GetBitLockerKeysResponse.java deleted file mode 100644 index 1e52b3e1a8f3..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/GetBitLockerKeysResponse.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.storageimportexport.fluent.models.DriveBitLockerKeyInner; -import java.io.IOException; -import java.util.List; - -/** - * GetBitLockerKeys response. - */ -@Fluent -public final class GetBitLockerKeysResponse implements JsonSerializable { - /* - * drive status - */ - private List value; - - /** - * Creates an instance of GetBitLockerKeysResponse class. - */ - public GetBitLockerKeysResponse() { - } - - /** - * Get the value property: drive status. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: drive status. - * - * @param value the value value to set. - * @return the GetBitLockerKeysResponse object itself. - */ - public GetBitLockerKeysResponse 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GetBitLockerKeysResponse from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GetBitLockerKeysResponse if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the GetBitLockerKeysResponse. - */ - public static GetBitLockerKeysResponse fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GetBitLockerKeysResponse deserializedGetBitLockerKeysResponse = new GetBitLockerKeysResponse(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> DriveBitLockerKeyInner.fromJson(reader1)); - deserializedGetBitLockerKeysResponse.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedGetBitLockerKeysResponse; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/IdentityDetails.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/IdentityDetails.java deleted file mode 100644 index e2098ef9de57..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/IdentityDetails.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies the identity properties. - */ -@Fluent -public final class IdentityDetails implements JsonSerializable { - /* - * The type of identity - */ - private IdentityType type; - - /* - * Specifies the principal id for the identity for the job. - */ - private String principalId; - - /* - * Specifies the tenant id for the identity for the job. - */ - private String tenantId; - - /** - * Creates an instance of IdentityDetails class. - */ - public IdentityDetails() { - } - - /** - * Get the type property: The type of identity. - * - * @return the type value. - */ - public IdentityType type() { - return this.type; - } - - /** - * Set the type property: The type of identity. - * - * @param type the type value to set. - * @return the IdentityDetails object itself. - */ - public IdentityDetails withType(IdentityType type) { - this.type = type; - return this; - } - - /** - * Get the principalId property: Specifies the principal id for the identity for the job. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: Specifies the tenant id for the identity for the job. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdentityDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdentityDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the IdentityDetails. - */ - public static IdentityDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdentityDetails deserializedIdentityDetails = new IdentityDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedIdentityDetails.type = IdentityType.fromString(reader.getString()); - } else if ("principalId".equals(fieldName)) { - deserializedIdentityDetails.principalId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedIdentityDetails.tenantId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIdentityDetails; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/IdentityType.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/IdentityType.java deleted file mode 100644 index 11ae09fe8f05..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/IdentityType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of identity. - */ -public final class IdentityType extends ExpandableStringEnum { - /** - * Static value None for IdentityType. - */ - public static final IdentityType NONE = fromString("None"); - - /** - * Static value SystemAssigned for IdentityType. - */ - public static final IdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** - * Static value UserAssigned for IdentityType. - */ - public static final IdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** - * Creates a new instance of IdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IdentityType() { - } - - /** - * Creates or finds a IdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding IdentityType. - */ - public static IdentityType fromString(String name) { - return fromString(name, IdentityType.class); - } - - /** - * Gets known IdentityType values. - * - * @return known IdentityType values. - */ - public static Collection values() { - return values(IdentityType.class); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/JobDetails.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/JobDetails.java deleted file mode 100644 index ce33f934ef75..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/JobDetails.java +++ /dev/null @@ -1,626 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Specifies the job properties. - */ -@Fluent -public final class JobDetails implements JsonSerializable { - /* - * The resource identifier of the storage account where data will be imported to or exported from. - */ - private String storageAccountId; - - /* - * The type of job - */ - private String jobType; - - /* - * Specifies the return address information for the job. - */ - private ReturnAddress returnAddress; - - /* - * Specifies the return carrier and customer's account with the carrier. - */ - private ReturnShipping returnShipping; - - /* - * Contains information about the Microsoft datacenter to which the drives should be shipped. - */ - private ShippingInformation shippingInformation; - - /* - * Contains information about the package being shipped by the customer to the Microsoft data center. - */ - private DeliveryPackageInformation deliveryPackage; - - /* - * Contains information about the package being shipped from the Microsoft data center to the customer to return the - * drives. The format is the same as the deliveryPackage property above. This property is not included if the drives - * have not yet been returned. - */ - private PackageInformation returnPackage; - - /* - * The virtual blob directory to which the copy logs and backups of drive manifest files (if enabled) will be - * stored. - */ - private String diagnosticsPath; - - /* - * Default value is Error. Indicates whether error logging or verbose logging will be enabled. - */ - private String logLevel; - - /* - * Default value is false. Indicates whether the manifest files on the drives should be copied to block blobs. - */ - private Boolean backupDriveManifest; - - /* - * Current state of the job. - */ - private String state; - - /* - * Indicates whether a request has been submitted to cancel the job. - */ - private Boolean cancelRequested; - - /* - * Overall percentage completed for the job. - */ - private Long percentComplete; - - /* - * A blob path that points to a block blob containing a list of blob names that were not exported due to - * insufficient drive space. If all blobs were exported successfully, then this element is not included in the - * response. - */ - private String incompleteBlobListUri; - - /* - * List of up to ten drives that comprise the job. The drive list is a required element for an import job; it is not - * specified for export jobs. - */ - private List driveList; - - /* - * A property containing information about the blobs to be exported for an export job. This property is included for - * export jobs only. - */ - private Export export; - - /* - * Specifies the provisioning state of the job. - */ - private String provisioningState; - - /* - * Contains information about the encryption key. - */ - private EncryptionKeyDetails encryptionKey; - - /** - * Creates an instance of JobDetails class. - */ - public JobDetails() { - } - - /** - * Get the storageAccountId property: The resource identifier of the storage account where data will be imported to - * or exported from. - * - * @return the storageAccountId value. - */ - public String storageAccountId() { - return this.storageAccountId; - } - - /** - * Set the storageAccountId property: The resource identifier of the storage account where data will be imported to - * or exported from. - * - * @param storageAccountId the storageAccountId value to set. - * @return the JobDetails object itself. - */ - public JobDetails withStorageAccountId(String storageAccountId) { - this.storageAccountId = storageAccountId; - return this; - } - - /** - * Get the jobType property: The type of job. - * - * @return the jobType value. - */ - public String jobType() { - return this.jobType; - } - - /** - * Set the jobType property: The type of job. - * - * @param jobType the jobType value to set. - * @return the JobDetails object itself. - */ - public JobDetails withJobType(String jobType) { - this.jobType = jobType; - return this; - } - - /** - * Get the returnAddress property: Specifies the return address information for the job. - * - * @return the returnAddress value. - */ - public ReturnAddress returnAddress() { - return this.returnAddress; - } - - /** - * Set the returnAddress property: Specifies the return address information for the job. - * - * @param returnAddress the returnAddress value to set. - * @return the JobDetails object itself. - */ - public JobDetails withReturnAddress(ReturnAddress returnAddress) { - this.returnAddress = returnAddress; - return this; - } - - /** - * Get the returnShipping property: Specifies the return carrier and customer's account with the carrier. - * - * @return the returnShipping value. - */ - public ReturnShipping returnShipping() { - return this.returnShipping; - } - - /** - * Set the returnShipping property: Specifies the return carrier and customer's account with the carrier. - * - * @param returnShipping the returnShipping value to set. - * @return the JobDetails object itself. - */ - public JobDetails withReturnShipping(ReturnShipping returnShipping) { - this.returnShipping = returnShipping; - return this; - } - - /** - * Get the shippingInformation property: Contains information about the Microsoft datacenter to which the drives - * should be shipped. - * - * @return the shippingInformation value. - */ - public ShippingInformation shippingInformation() { - return this.shippingInformation; - } - - /** - * Set the shippingInformation property: Contains information about the Microsoft datacenter to which the drives - * should be shipped. - * - * @param shippingInformation the shippingInformation value to set. - * @return the JobDetails object itself. - */ - public JobDetails withShippingInformation(ShippingInformation shippingInformation) { - this.shippingInformation = shippingInformation; - return this; - } - - /** - * Get the deliveryPackage property: Contains information about the package being shipped by the customer to the - * Microsoft data center. - * - * @return the deliveryPackage value. - */ - public DeliveryPackageInformation deliveryPackage() { - return this.deliveryPackage; - } - - /** - * Set the deliveryPackage property: Contains information about the package being shipped by the customer to the - * Microsoft data center. - * - * @param deliveryPackage the deliveryPackage value to set. - * @return the JobDetails object itself. - */ - public JobDetails withDeliveryPackage(DeliveryPackageInformation deliveryPackage) { - this.deliveryPackage = deliveryPackage; - return this; - } - - /** - * Get the returnPackage property: Contains information about the package being shipped from the Microsoft data - * center to the customer to return the drives. The format is the same as the deliveryPackage property above. This - * property is not included if the drives have not yet been returned. - * - * @return the returnPackage value. - */ - public PackageInformation returnPackage() { - return this.returnPackage; - } - - /** - * Set the returnPackage property: Contains information about the package being shipped from the Microsoft data - * center to the customer to return the drives. The format is the same as the deliveryPackage property above. This - * property is not included if the drives have not yet been returned. - * - * @param returnPackage the returnPackage value to set. - * @return the JobDetails object itself. - */ - public JobDetails withReturnPackage(PackageInformation returnPackage) { - this.returnPackage = returnPackage; - return this; - } - - /** - * Get the diagnosticsPath property: The virtual blob directory to which the copy logs and backups of drive manifest - * files (if enabled) will be stored. - * - * @return the diagnosticsPath value. - */ - public String diagnosticsPath() { - return this.diagnosticsPath; - } - - /** - * Set the diagnosticsPath property: The virtual blob directory to which the copy logs and backups of drive manifest - * files (if enabled) will be stored. - * - * @param diagnosticsPath the diagnosticsPath value to set. - * @return the JobDetails object itself. - */ - public JobDetails withDiagnosticsPath(String diagnosticsPath) { - this.diagnosticsPath = diagnosticsPath; - return this; - } - - /** - * Get the logLevel property: Default value is Error. Indicates whether error logging or verbose logging will be - * enabled. - * - * @return the logLevel value. - */ - public String logLevel() { - return this.logLevel; - } - - /** - * Set the logLevel property: Default value is Error. Indicates whether error logging or verbose logging will be - * enabled. - * - * @param logLevel the logLevel value to set. - * @return the JobDetails object itself. - */ - public JobDetails withLogLevel(String logLevel) { - this.logLevel = logLevel; - return this; - } - - /** - * Get the backupDriveManifest property: Default value is false. Indicates whether the manifest files on the drives - * should be copied to block blobs. - * - * @return the backupDriveManifest value. - */ - public Boolean backupDriveManifest() { - return this.backupDriveManifest; - } - - /** - * Set the backupDriveManifest property: Default value is false. Indicates whether the manifest files on the drives - * should be copied to block blobs. - * - * @param backupDriveManifest the backupDriveManifest value to set. - * @return the JobDetails object itself. - */ - public JobDetails withBackupDriveManifest(Boolean backupDriveManifest) { - this.backupDriveManifest = backupDriveManifest; - return this; - } - - /** - * Get the state property: Current state of the job. - * - * @return the state value. - */ - public String state() { - return this.state; - } - - /** - * Set the state property: Current state of the job. - * - * @param state the state value to set. - * @return the JobDetails object itself. - */ - public JobDetails withState(String state) { - this.state = state; - return this; - } - - /** - * Get the cancelRequested property: Indicates whether a request has been submitted to cancel the job. - * - * @return the cancelRequested value. - */ - public Boolean cancelRequested() { - return this.cancelRequested; - } - - /** - * Set the cancelRequested property: Indicates whether a request has been submitted to cancel the job. - * - * @param cancelRequested the cancelRequested value to set. - * @return the JobDetails object itself. - */ - public JobDetails withCancelRequested(Boolean cancelRequested) { - this.cancelRequested = cancelRequested; - return this; - } - - /** - * Get the percentComplete property: Overall percentage completed for the job. - * - * @return the percentComplete value. - */ - public Long percentComplete() { - return this.percentComplete; - } - - /** - * Set the percentComplete property: Overall percentage completed for the job. - * - * @param percentComplete the percentComplete value to set. - * @return the JobDetails object itself. - */ - public JobDetails withPercentComplete(Long percentComplete) { - this.percentComplete = percentComplete; - return this; - } - - /** - * Get the incompleteBlobListUri property: A blob path that points to a block blob containing a list of blob names - * that were not exported due to insufficient drive space. If all blobs were exported successfully, then this - * element is not included in the response. - * - * @return the incompleteBlobListUri value. - */ - public String incompleteBlobListUri() { - return this.incompleteBlobListUri; - } - - /** - * Set the incompleteBlobListUri property: A blob path that points to a block blob containing a list of blob names - * that were not exported due to insufficient drive space. If all blobs were exported successfully, then this - * element is not included in the response. - * - * @param incompleteBlobListUri the incompleteBlobListUri value to set. - * @return the JobDetails object itself. - */ - public JobDetails withIncompleteBlobListUri(String incompleteBlobListUri) { - this.incompleteBlobListUri = incompleteBlobListUri; - return this; - } - - /** - * Get the driveList property: List of up to ten drives that comprise the job. The drive list is a required element - * for an import job; it is not specified for export jobs. - * - * @return the driveList value. - */ - public List driveList() { - return this.driveList; - } - - /** - * Set the driveList property: List of up to ten drives that comprise the job. The drive list is a required element - * for an import job; it is not specified for export jobs. - * - * @param driveList the driveList value to set. - * @return the JobDetails object itself. - */ - public JobDetails withDriveList(List driveList) { - this.driveList = driveList; - return this; - } - - /** - * Get the export property: A property containing information about the blobs to be exported for an export job. This - * property is included for export jobs only. - * - * @return the export value. - */ - public Export export() { - return this.export; - } - - /** - * Set the export property: A property containing information about the blobs to be exported for an export job. This - * property is included for export jobs only. - * - * @param export the export value to set. - * @return the JobDetails object itself. - */ - public JobDetails withExport(Export export) { - this.export = export; - return this; - } - - /** - * Get the provisioningState property: Specifies the provisioning state of the job. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: Specifies the provisioning state of the job. - * - * @param provisioningState the provisioningState value to set. - * @return the JobDetails object itself. - */ - public JobDetails withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the encryptionKey property: Contains information about the encryption key. - * - * @return the encryptionKey value. - */ - public EncryptionKeyDetails encryptionKey() { - return this.encryptionKey; - } - - /** - * Set the encryptionKey property: Contains information about the encryption key. - * - * @param encryptionKey the encryptionKey value to set. - * @return the JobDetails object itself. - */ - public JobDetails withEncryptionKey(EncryptionKeyDetails encryptionKey) { - this.encryptionKey = encryptionKey; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (returnAddress() != null) { - returnAddress().validate(); - } - if (returnShipping() != null) { - returnShipping().validate(); - } - if (shippingInformation() != null) { - shippingInformation().validate(); - } - if (deliveryPackage() != null) { - deliveryPackage().validate(); - } - if (returnPackage() != null) { - returnPackage().validate(); - } - if (driveList() != null) { - driveList().forEach(e -> e.validate()); - } - if (export() != null) { - export().validate(); - } - if (encryptionKey() != null) { - encryptionKey().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("storageAccountId", this.storageAccountId); - jsonWriter.writeStringField("jobType", this.jobType); - jsonWriter.writeJsonField("returnAddress", this.returnAddress); - jsonWriter.writeJsonField("returnShipping", this.returnShipping); - jsonWriter.writeJsonField("shippingInformation", this.shippingInformation); - jsonWriter.writeJsonField("deliveryPackage", this.deliveryPackage); - jsonWriter.writeJsonField("returnPackage", this.returnPackage); - jsonWriter.writeStringField("diagnosticsPath", this.diagnosticsPath); - jsonWriter.writeStringField("logLevel", this.logLevel); - jsonWriter.writeBooleanField("backupDriveManifest", this.backupDriveManifest); - jsonWriter.writeStringField("state", this.state); - jsonWriter.writeBooleanField("cancelRequested", this.cancelRequested); - jsonWriter.writeNumberField("percentComplete", this.percentComplete); - jsonWriter.writeStringField("incompleteBlobListUri", this.incompleteBlobListUri); - jsonWriter.writeArrayField("driveList", this.driveList, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("export", this.export); - jsonWriter.writeStringField("provisioningState", this.provisioningState); - jsonWriter.writeJsonField("encryptionKey", this.encryptionKey); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobDetails if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the JobDetails. - */ - public static JobDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobDetails deserializedJobDetails = new JobDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("storageAccountId".equals(fieldName)) { - deserializedJobDetails.storageAccountId = reader.getString(); - } else if ("jobType".equals(fieldName)) { - deserializedJobDetails.jobType = reader.getString(); - } else if ("returnAddress".equals(fieldName)) { - deserializedJobDetails.returnAddress = ReturnAddress.fromJson(reader); - } else if ("returnShipping".equals(fieldName)) { - deserializedJobDetails.returnShipping = ReturnShipping.fromJson(reader); - } else if ("shippingInformation".equals(fieldName)) { - deserializedJobDetails.shippingInformation = ShippingInformation.fromJson(reader); - } else if ("deliveryPackage".equals(fieldName)) { - deserializedJobDetails.deliveryPackage = DeliveryPackageInformation.fromJson(reader); - } else if ("returnPackage".equals(fieldName)) { - deserializedJobDetails.returnPackage = PackageInformation.fromJson(reader); - } else if ("diagnosticsPath".equals(fieldName)) { - deserializedJobDetails.diagnosticsPath = reader.getString(); - } else if ("logLevel".equals(fieldName)) { - deserializedJobDetails.logLevel = reader.getString(); - } else if ("backupDriveManifest".equals(fieldName)) { - deserializedJobDetails.backupDriveManifest = reader.getNullable(JsonReader::getBoolean); - } else if ("state".equals(fieldName)) { - deserializedJobDetails.state = reader.getString(); - } else if ("cancelRequested".equals(fieldName)) { - deserializedJobDetails.cancelRequested = reader.getNullable(JsonReader::getBoolean); - } else if ("percentComplete".equals(fieldName)) { - deserializedJobDetails.percentComplete = reader.getNullable(JsonReader::getLong); - } else if ("incompleteBlobListUri".equals(fieldName)) { - deserializedJobDetails.incompleteBlobListUri = reader.getString(); - } else if ("driveList".equals(fieldName)) { - List driveList = reader.readArray(reader1 -> DriveStatus.fromJson(reader1)); - deserializedJobDetails.driveList = driveList; - } else if ("export".equals(fieldName)) { - deserializedJobDetails.export = Export.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedJobDetails.provisioningState = reader.getString(); - } else if ("encryptionKey".equals(fieldName)) { - deserializedJobDetails.encryptionKey = EncryptionKeyDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJobDetails; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/JobResponse.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/JobResponse.java deleted file mode 100644 index 74d25d5b1033..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/JobResponse.java +++ /dev/null @@ -1,391 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.storageimportexport.fluent.models.JobResponseInner; -import java.util.List; -import java.util.Map; - -/** - * An immutable client-side representation of JobResponse. - */ -public interface JobResponse { - /** - * 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 systemData property: SystemData of ImportExport Jobs. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the properties property: Specifies the job properties. - * - * @return the properties value. - */ - JobDetails properties(); - - /** - * Gets the identity property: Specifies the job identity details. - * - * @return the identity value. - */ - IdentityDetails identity(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.storageimportexport.fluent.models.JobResponseInner object. - * - * @return the inner object. - */ - JobResponseInner innerModel(); - - /** - * The entirety of the JobResponse definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The JobResponse definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the JobResponse definition. - */ - interface Blank extends WithResourceGroup { - } - - /** - * The stage of the JobResponse definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the JobResponse definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, - DefinitionStages.WithProperties, DefinitionStages.WithClientTenantId { - /** - * Executes the create request. - * - * @return the created resource. - */ - JobResponse create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - JobResponse create(Context context); - } - - /** - * The stage of the JobResponse definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location Specifies the supported Azure location where the job should be created. - * @return the next definition stage. - */ - WithCreate withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location Specifies the supported Azure location where the job should be created. - * @return the next definition stage. - */ - WithCreate withRegion(String location); - } - - /** - * The stage of the JobResponse definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Specifies the tags that will be assigned to the job.. - * - * @param tags Specifies the tags that will be assigned to the job. - * @return the next definition stage. - */ - WithCreate withTags(Object tags); - } - - /** - * The stage of the JobResponse definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Specifies the job properties. - * - * @param properties Specifies the job properties. - * @return the next definition stage. - */ - WithCreate withProperties(JobDetails properties); - } - - /** - * The stage of the JobResponse definition allowing to specify clientTenantId. - */ - interface WithClientTenantId { - /** - * Specifies the clientTenantId property: The tenant ID of the client making the request.. - * - * @param clientTenantId The tenant ID of the client making the request. - * @return the next definition stage. - */ - WithCreate withClientTenantId(String clientTenantId); - } - } - - /** - * Begins update for the JobResponse resource. - * - * @return the stage of resource update. - */ - JobResponse.Update update(); - - /** - * The template for JobResponse update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithCancelRequested, UpdateStages.WithState, - UpdateStages.WithReturnAddress, UpdateStages.WithReturnShipping, UpdateStages.WithDeliveryPackage, - UpdateStages.WithLogLevel, UpdateStages.WithBackupDriveManifest, UpdateStages.WithDriveList { - /** - * Executes the update request. - * - * @return the updated resource. - */ - JobResponse apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - JobResponse apply(Context context); - } - - /** - * The JobResponse update stages. - */ - interface UpdateStages { - /** - * The stage of the JobResponse update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Specifies the tags that will be assigned to the job. - * - * @param tags Specifies the tags that will be assigned to the job. - * @return the next definition stage. - */ - Update withTags(Object tags); - } - - /** - * The stage of the JobResponse update allowing to specify cancelRequested. - */ - interface WithCancelRequested { - /** - * Specifies the cancelRequested property: If specified, the value must be true. The service will attempt to - * cancel the job. . - * - * @param cancelRequested If specified, the value must be true. The service will attempt to cancel the job. - * @return the next definition stage. - */ - Update withCancelRequested(Boolean cancelRequested); - } - - /** - * The stage of the JobResponse update allowing to specify state. - */ - interface WithState { - /** - * Specifies the state property: If specified, the value must be Shipping, which tells the Import/Export - * service that the package for the job has been shipped. The ReturnAddress and DeliveryPackage properties - * must have been set either in this request or in a previous request, otherwise the request will fail. . - * - * @param state If specified, the value must be Shipping, which tells the Import/Export service that the - * package for the job has been shipped. The ReturnAddress and DeliveryPackage properties must have been set - * either in this request or in a previous request, otherwise the request will fail. - * @return the next definition stage. - */ - Update withState(String state); - } - - /** - * The stage of the JobResponse update allowing to specify returnAddress. - */ - interface WithReturnAddress { - /** - * Specifies the returnAddress property: Specifies the return address information for the job.. - * - * @param returnAddress Specifies the return address information for the job. - * @return the next definition stage. - */ - Update withReturnAddress(ReturnAddress returnAddress); - } - - /** - * The stage of the JobResponse update allowing to specify returnShipping. - */ - interface WithReturnShipping { - /** - * Specifies the returnShipping property: Specifies the return carrier and customer's account with the - * carrier.. - * - * @param returnShipping Specifies the return carrier and customer's account with the carrier. - * @return the next definition stage. - */ - Update withReturnShipping(ReturnShipping returnShipping); - } - - /** - * The stage of the JobResponse update allowing to specify deliveryPackage. - */ - interface WithDeliveryPackage { - /** - * Specifies the deliveryPackage property: Contains information about the package being shipped by the - * customer to the Microsoft data center.. - * - * @param deliveryPackage Contains information about the package being shipped by the customer to the - * Microsoft data center. - * @return the next definition stage. - */ - Update withDeliveryPackage(DeliveryPackageInformation deliveryPackage); - } - - /** - * The stage of the JobResponse update allowing to specify logLevel. - */ - interface WithLogLevel { - /** - * Specifies the logLevel property: Indicates whether error logging or verbose logging is enabled.. - * - * @param logLevel Indicates whether error logging or verbose logging is enabled. - * @return the next definition stage. - */ - Update withLogLevel(String logLevel); - } - - /** - * The stage of the JobResponse update allowing to specify backupDriveManifest. - */ - interface WithBackupDriveManifest { - /** - * Specifies the backupDriveManifest property: Indicates whether the manifest files on the drives should be - * copied to block blobs.. - * - * @param backupDriveManifest Indicates whether the manifest files on the drives should be copied to block - * blobs. - * @return the next definition stage. - */ - Update withBackupDriveManifest(Boolean backupDriveManifest); - } - - /** - * The stage of the JobResponse update allowing to specify driveList. - */ - interface WithDriveList { - /** - * Specifies the driveList property: List of drives that comprise the job.. - * - * @param driveList List of drives that comprise the job. - * @return the next definition stage. - */ - Update withDriveList(List driveList); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - JobResponse refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - JobResponse refresh(Context context); -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Jobs.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Jobs.java deleted file mode 100644 index 08e542058e9f..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Jobs.java +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Jobs. - */ -public interface Jobs { - /** - * Returns all active and completed jobs in a subscription. - * - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Returns all active and completed jobs in a subscription. - * - * @param top An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. - * @param filter Can be used to restrict the results to certain conditions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Long top, String filter, Context context); - - /** - * Returns all active and completed jobs in a resource group. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Returns all active and completed jobs in a resource group. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param top An integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. - * @param filter Can be used to restrict the results to certain conditions. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list jobs response as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Long top, String filter, Context context); - - /** - * Gets information about an existing job. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException 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 an existing job along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, Context context); - - /** - * Gets information about an existing job. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException 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 an existing job. - */ - JobResponse getByResourceGroup(String resourceGroupName, String jobName); - - /** - * Deletes an existing job. Only jobs in the Creating or Completed states can be deleted. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByResourceGroupWithResponse(String resourceGroupName, String jobName, Context context); - - /** - * Deletes an existing job. Only jobs in the Creating or Completed states can be deleted. - * - * @param resourceGroupName The resource group name uniquely identifies the resource group within the user - * subscription. - * @param jobName The name of the import/export job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String jobName); - - /** - * Gets information about an existing job. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException 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 an existing job along with {@link Response}. - */ - JobResponse getById(String id); - - /** - * Gets information about an existing job. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException 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 an existing job along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes an existing job. Only jobs in the Creating or Completed states can be deleted. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException 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 an existing job. Only jobs in the Creating or Completed states can be deleted. - * - * @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.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new JobResponse resource. - * - * @param name resource name. - * @return the first stage of the new JobResponse definition. - */ - JobResponse.DefinitionStages.Blank define(String name); -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ListJobsResponse.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ListJobsResponse.java deleted file mode 100644 index ab4c5713599b..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ListJobsResponse.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.storageimportexport.fluent.models.JobResponseInner; -import java.io.IOException; -import java.util.List; - -/** - * List jobs response. - */ -@Fluent -public final class ListJobsResponse implements JsonSerializable { - /* - * link to next batch of jobs - */ - private String nextLink; - - /* - * Job list - */ - private List value; - - /** - * Creates an instance of ListJobsResponse class. - */ - public ListJobsResponse() { - } - - /** - * Get the nextLink property: link to next batch of jobs. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: link to next batch of jobs. - * - * @param nextLink the nextLink value to set. - * @return the ListJobsResponse object itself. - */ - public ListJobsResponse withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: Job list. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Job list. - * - * @param value the value value to set. - * @return the ListJobsResponse object itself. - */ - public ListJobsResponse 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ListJobsResponse from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ListJobsResponse if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ListJobsResponse. - */ - public static ListJobsResponse fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ListJobsResponse deserializedListJobsResponse = new ListJobsResponse(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nextLink".equals(fieldName)) { - deserializedListJobsResponse.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> JobResponseInner.fromJson(reader1)); - deserializedListJobsResponse.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedListJobsResponse; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ListOperationsResponse.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ListOperationsResponse.java deleted file mode 100644 index 28d6310afacd..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ListOperationsResponse.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.storageimportexport.fluent.models.OperationInner; -import java.io.IOException; -import java.util.List; - -/** - * List operations response. - */ -@Fluent -public final class ListOperationsResponse implements JsonSerializable { - /* - * operations - */ - private List value; - - /** - * Creates an instance of ListOperationsResponse class. - */ - public ListOperationsResponse() { - } - - /** - * Get the value property: operations. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: operations. - * - * @param value the value value to set. - * @return the ListOperationsResponse object itself. - */ - public ListOperationsResponse 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ListOperationsResponse from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ListOperationsResponse if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ListOperationsResponse. - */ - public static ListOperationsResponse fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ListOperationsResponse deserializedListOperationsResponse = new ListOperationsResponse(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); - deserializedListOperationsResponse.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedListOperationsResponse; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Location.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Location.java deleted file mode 100644 index a054748df660..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Location.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.resourcemanager.storageimportexport.fluent.models.LocationInner; -import java.util.List; - -/** - * An immutable client-side representation of Location. - */ -public interface Location { - /** - * Gets the id property: Specifies the resource identifier of the location. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: Specifies the name of the location. Use List Locations to get all supported locations. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: Specifies the type of the location. - * - * @return the type value. - */ - String type(); - - /** - * Gets the recipientName property: The recipient name to use when shipping the drives to the Azure data center. - * - * @return the recipientName value. - */ - String recipientName(); - - /** - * Gets the streetAddress1 property: The first line of the street address to use when shipping the drives to the - * Azure data center. - * - * @return the streetAddress1 value. - */ - String streetAddress1(); - - /** - * Gets the streetAddress2 property: The second line of the street address to use when shipping the drives to the - * Azure data center. - * - * @return the streetAddress2 value. - */ - String streetAddress2(); - - /** - * Gets the city property: The city name to use when shipping the drives to the Azure data center. - * - * @return the city value. - */ - String city(); - - /** - * Gets the stateOrProvince property: The state or province to use when shipping the drives to the Azure data - * center. - * - * @return the stateOrProvince value. - */ - String stateOrProvince(); - - /** - * Gets the postalCode property: The postal code to use when shipping the drives to the Azure data center. - * - * @return the postalCode value. - */ - String postalCode(); - - /** - * Gets the countryOrRegion property: The country or region to use when shipping the drives to the Azure data - * center. - * - * @return the countryOrRegion value. - */ - String countryOrRegion(); - - /** - * Gets the phone property: The phone number for the Azure data center. - * - * @return the phone value. - */ - String phone(); - - /** - * Gets the additionalShippingInformation property: Additional shipping information for customer, specific to - * datacenter to which customer should send their disks. - * - * @return the additionalShippingInformation value. - */ - String additionalShippingInformation(); - - /** - * Gets the supportedCarriers property: A list of carriers that are supported at this location. - * - * @return the supportedCarriers value. - */ - List supportedCarriers(); - - /** - * Gets the alternateLocations property: A list of location IDs that should be used to ship shipping drives to for - * jobs created against the current location. If the current location is active, it will be part of the list. If it - * is temporarily closed due to maintenance, this list may contain other locations. - * - * @return the alternateLocations value. - */ - List alternateLocations(); - - /** - * Gets the inner com.azure.resourcemanager.storageimportexport.fluent.models.LocationInner object. - * - * @return the inner object. - */ - LocationInner innerModel(); -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Locations.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Locations.java deleted file mode 100644 index 3cbed1935307..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Locations.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.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 Locations. - */ -public interface Locations { - /** - * Returns a list of locations to which you can ship the disks associated with an import or export job. A location - * is a Microsoft data center region. - * - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return locations response as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Returns a list of locations to which you can ship the disks associated with an import or export job. A location - * is a Microsoft data center region. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return locations response as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Returns the details about a location to which you can ship the disks associated with an import or export job. A - * location is an Azure region. - * - * @param locationName The name of the location. For example, West US or westus. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provides information about an Azure data center location along with {@link Response}. - */ - Response getWithResponse(String locationName, Context context); - - /** - * Returns the details about a location to which you can ship the disks associated with an import or export job. A - * location is an Azure region. - * - * @param locationName The name of the location. For example, West US or westus. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provides information about an Azure data center location. - */ - Location get(String locationName); -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/LocationsResponse.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/LocationsResponse.java deleted file mode 100644 index a82ca09a663c..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/LocationsResponse.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.storageimportexport.fluent.models.LocationInner; -import java.io.IOException; -import java.util.List; - -/** - * Locations response. - */ -@Fluent -public final class LocationsResponse implements JsonSerializable { - /* - * locations - */ - private List value; - - /** - * Creates an instance of LocationsResponse class. - */ - public LocationsResponse() { - } - - /** - * Get the value property: locations. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: locations. - * - * @param value the value value to set. - * @return the LocationsResponse object itself. - */ - public LocationsResponse 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LocationsResponse from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LocationsResponse if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the LocationsResponse. - */ - public static LocationsResponse fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LocationsResponse deserializedLocationsResponse = new LocationsResponse(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> LocationInner.fromJson(reader1)); - deserializedLocationsResponse.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedLocationsResponse; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Operation.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Operation.java deleted file mode 100644 index 448d3bb77b85..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Operation.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.resourcemanager.storageimportexport.fluent.models.OperationInner; - -/** - * An immutable client-side representation of Operation. - */ -public interface Operation { - /** - * Gets the name property: Name of the operation. - * - * @return the name value. - */ - String name(); - - /** - * Gets the provider property: The resource provider name to which the operation belongs. - * - * @return the provider value. - */ - String provider(); - - /** - * Gets the resource property: The name of the resource to which the operation belongs. - * - * @return the resource value. - */ - String resource(); - - /** - * Gets the operation property: The display name of the operation. - * - * @return the operation value. - */ - String operation(); - - /** - * Gets the description property: Short description of the operation. - * - * @return the description value. - */ - String description(); - - /** - * Gets the inner com.azure.resourcemanager.storageimportexport.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Operations.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Operations.java deleted file mode 100644 index ab0804e08846..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/Operations.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of Operations. - */ -public interface Operations { - /** - * Returns the list of operations supported by the import/export resource provider. - * - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list operations response as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Returns the list of operations supported by the import/export resource provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list operations response as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/PackageInformation.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/PackageInformation.java deleted file mode 100644 index a89b5f5a2506..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/PackageInformation.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Contains information about the package being shipped by the customer to the Microsoft data center. - */ -@Fluent -public final class PackageInformation implements JsonSerializable { - /* - * The name of the carrier that is used to ship the import or export drives. - */ - private String carrierName; - - /* - * The tracking number of the package. - */ - private String trackingNumber; - - /* - * The number of drives included in the package. - */ - private long driveCount; - - /* - * The date when the package is shipped. - */ - private String shipDate; - - /** - * Creates an instance of PackageInformation class. - */ - public PackageInformation() { - } - - /** - * Get the carrierName property: The name of the carrier that is used to ship the import or export drives. - * - * @return the carrierName value. - */ - public String carrierName() { - return this.carrierName; - } - - /** - * Set the carrierName property: The name of the carrier that is used to ship the import or export drives. - * - * @param carrierName the carrierName value to set. - * @return the PackageInformation object itself. - */ - public PackageInformation withCarrierName(String carrierName) { - this.carrierName = carrierName; - return this; - } - - /** - * Get the trackingNumber property: The tracking number of the package. - * - * @return the trackingNumber value. - */ - public String trackingNumber() { - return this.trackingNumber; - } - - /** - * Set the trackingNumber property: The tracking number of the package. - * - * @param trackingNumber the trackingNumber value to set. - * @return the PackageInformation object itself. - */ - public PackageInformation withTrackingNumber(String trackingNumber) { - this.trackingNumber = trackingNumber; - return this; - } - - /** - * Get the driveCount property: The number of drives included in the package. - * - * @return the driveCount value. - */ - public long driveCount() { - return this.driveCount; - } - - /** - * Set the driveCount property: The number of drives included in the package. - * - * @param driveCount the driveCount value to set. - * @return the PackageInformation object itself. - */ - public PackageInformation withDriveCount(long driveCount) { - this.driveCount = driveCount; - return this; - } - - /** - * Get the shipDate property: The date when the package is shipped. - * - * @return the shipDate value. - */ - public String shipDate() { - return this.shipDate; - } - - /** - * Set the shipDate property: The date when the package is shipped. - * - * @param shipDate the shipDate value to set. - * @return the PackageInformation object itself. - */ - public PackageInformation withShipDate(String shipDate) { - this.shipDate = shipDate; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (carrierName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property carrierName in model PackageInformation")); - } - if (trackingNumber() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property trackingNumber in model PackageInformation")); - } - if (shipDate() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property shipDate in model PackageInformation")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PackageInformation.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("carrierName", this.carrierName); - jsonWriter.writeStringField("trackingNumber", this.trackingNumber); - jsonWriter.writeLongField("driveCount", this.driveCount); - jsonWriter.writeStringField("shipDate", this.shipDate); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PackageInformation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PackageInformation if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PackageInformation. - */ - public static PackageInformation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PackageInformation deserializedPackageInformation = new PackageInformation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("carrierName".equals(fieldName)) { - deserializedPackageInformation.carrierName = reader.getString(); - } else if ("trackingNumber".equals(fieldName)) { - deserializedPackageInformation.trackingNumber = reader.getString(); - } else if ("driveCount".equals(fieldName)) { - deserializedPackageInformation.driveCount = reader.getLong(); - } else if ("shipDate".equals(fieldName)) { - deserializedPackageInformation.shipDate = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPackageInformation; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/PutJobParameters.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/PutJobParameters.java deleted file mode 100644 index c281dbba48a5..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/PutJobParameters.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Put Job parameters. - */ -@Fluent -public final class PutJobParameters implements JsonSerializable { - /* - * Specifies the supported Azure location where the job should be created - */ - private String location; - - /* - * Specifies the tags that will be assigned to the job. - */ - private Object tags; - - /* - * Specifies the job properties - */ - private JobDetails properties; - - /** - * Creates an instance of PutJobParameters class. - */ - public PutJobParameters() { - } - - /** - * Get the location property: Specifies the supported Azure location where the job should be created. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Specifies the supported Azure location where the job should be created. - * - * @param location the location value to set. - * @return the PutJobParameters object itself. - */ - public PutJobParameters withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tags property: Specifies the tags that will be assigned to the job. - * - * @return the tags value. - */ - public Object tags() { - return this.tags; - } - - /** - * Set the tags property: Specifies the tags that will be assigned to the job. - * - * @param tags the tags value to set. - * @return the PutJobParameters object itself. - */ - public PutJobParameters withTags(Object tags) { - this.tags = tags; - return this; - } - - /** - * Get the properties property: Specifies the job properties. - * - * @return the properties value. - */ - public JobDetails properties() { - return this.properties; - } - - /** - * Set the properties property: Specifies the job properties. - * - * @param properties the properties value to set. - * @return the PutJobParameters object itself. - */ - public PutJobParameters withProperties(JobDetails properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeUntypedField("tags", this.tags); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PutJobParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PutJobParameters if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the PutJobParameters. - */ - public static PutJobParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PutJobParameters deserializedPutJobParameters = new PutJobParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("location".equals(fieldName)) { - deserializedPutJobParameters.location = reader.getString(); - } else if ("tags".equals(fieldName)) { - deserializedPutJobParameters.tags = reader.readUntyped(); - } else if ("properties".equals(fieldName)) { - deserializedPutJobParameters.properties = JobDetails.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPutJobParameters; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ReturnAddress.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ReturnAddress.java deleted file mode 100644 index 593d32d2f2ad..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ReturnAddress.java +++ /dev/null @@ -1,351 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies the return address information for the job. - */ -@Fluent -public final class ReturnAddress implements JsonSerializable { - /* - * The name of the recipient who will receive the hard drives when they are returned. - */ - private String recipientName; - - /* - * The first line of the street address to use when returning the drives. - */ - private String streetAddress1; - - /* - * The second line of the street address to use when returning the drives. - */ - private String streetAddress2; - - /* - * The city name to use when returning the drives. - */ - private String city; - - /* - * The state or province to use when returning the drives. - */ - private String stateOrProvince; - - /* - * The postal code to use when returning the drives. - */ - private String postalCode; - - /* - * The country or region to use when returning the drives. - */ - private String countryOrRegion; - - /* - * Phone number of the recipient of the returned drives. - */ - private String phone; - - /* - * Email address of the recipient of the returned drives. - */ - private String email; - - /** - * Creates an instance of ReturnAddress class. - */ - public ReturnAddress() { - } - - /** - * Get the recipientName property: The name of the recipient who will receive the hard drives when they are - * returned. - * - * @return the recipientName value. - */ - public String recipientName() { - return this.recipientName; - } - - /** - * Set the recipientName property: The name of the recipient who will receive the hard drives when they are - * returned. - * - * @param recipientName the recipientName value to set. - * @return the ReturnAddress object itself. - */ - public ReturnAddress withRecipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Get the streetAddress1 property: The first line of the street address to use when returning the drives. - * - * @return the streetAddress1 value. - */ - public String streetAddress1() { - return this.streetAddress1; - } - - /** - * Set the streetAddress1 property: The first line of the street address to use when returning the drives. - * - * @param streetAddress1 the streetAddress1 value to set. - * @return the ReturnAddress object itself. - */ - public ReturnAddress withStreetAddress1(String streetAddress1) { - this.streetAddress1 = streetAddress1; - return this; - } - - /** - * Get the streetAddress2 property: The second line of the street address to use when returning the drives. - * - * @return the streetAddress2 value. - */ - public String streetAddress2() { - return this.streetAddress2; - } - - /** - * Set the streetAddress2 property: The second line of the street address to use when returning the drives. - * - * @param streetAddress2 the streetAddress2 value to set. - * @return the ReturnAddress object itself. - */ - public ReturnAddress withStreetAddress2(String streetAddress2) { - this.streetAddress2 = streetAddress2; - return this; - } - - /** - * Get the city property: The city name to use when returning the drives. - * - * @return the city value. - */ - public String city() { - return this.city; - } - - /** - * Set the city property: The city name to use when returning the drives. - * - * @param city the city value to set. - * @return the ReturnAddress object itself. - */ - public ReturnAddress withCity(String city) { - this.city = city; - return this; - } - - /** - * Get the stateOrProvince property: The state or province to use when returning the drives. - * - * @return the stateOrProvince value. - */ - public String stateOrProvince() { - return this.stateOrProvince; - } - - /** - * Set the stateOrProvince property: The state or province to use when returning the drives. - * - * @param stateOrProvince the stateOrProvince value to set. - * @return the ReturnAddress object itself. - */ - public ReturnAddress withStateOrProvince(String stateOrProvince) { - this.stateOrProvince = stateOrProvince; - return this; - } - - /** - * Get the postalCode property: The postal code to use when returning the drives. - * - * @return the postalCode value. - */ - public String postalCode() { - return this.postalCode; - } - - /** - * Set the postalCode property: The postal code to use when returning the drives. - * - * @param postalCode the postalCode value to set. - * @return the ReturnAddress object itself. - */ - public ReturnAddress withPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } - - /** - * Get the countryOrRegion property: The country or region to use when returning the drives. - * - * @return the countryOrRegion value. - */ - public String countryOrRegion() { - return this.countryOrRegion; - } - - /** - * Set the countryOrRegion property: The country or region to use when returning the drives. - * - * @param countryOrRegion the countryOrRegion value to set. - * @return the ReturnAddress object itself. - */ - public ReturnAddress withCountryOrRegion(String countryOrRegion) { - this.countryOrRegion = countryOrRegion; - return this; - } - - /** - * Get the phone property: Phone number of the recipient of the returned drives. - * - * @return the phone value. - */ - public String phone() { - return this.phone; - } - - /** - * Set the phone property: Phone number of the recipient of the returned drives. - * - * @param phone the phone value to set. - * @return the ReturnAddress object itself. - */ - public ReturnAddress withPhone(String phone) { - this.phone = phone; - return this; - } - - /** - * Get the email property: Email address of the recipient of the returned drives. - * - * @return the email value. - */ - public String email() { - return this.email; - } - - /** - * Set the email property: Email address of the recipient of the returned drives. - * - * @param email the email value to set. - * @return the ReturnAddress object itself. - */ - public ReturnAddress withEmail(String email) { - this.email = email; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (recipientName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property recipientName in model ReturnAddress")); - } - if (streetAddress1() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property streetAddress1 in model ReturnAddress")); - } - if (city() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property city in model ReturnAddress")); - } - if (postalCode() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property postalCode in model ReturnAddress")); - } - if (countryOrRegion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property countryOrRegion in model ReturnAddress")); - } - if (phone() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property phone in model ReturnAddress")); - } - if (email() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property email in model ReturnAddress")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ReturnAddress.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recipientName", this.recipientName); - jsonWriter.writeStringField("streetAddress1", this.streetAddress1); - jsonWriter.writeStringField("city", this.city); - jsonWriter.writeStringField("postalCode", this.postalCode); - jsonWriter.writeStringField("countryOrRegion", this.countryOrRegion); - jsonWriter.writeStringField("phone", this.phone); - jsonWriter.writeStringField("email", this.email); - jsonWriter.writeStringField("streetAddress2", this.streetAddress2); - jsonWriter.writeStringField("stateOrProvince", this.stateOrProvince); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReturnAddress from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReturnAddress if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ReturnAddress. - */ - public static ReturnAddress fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReturnAddress deserializedReturnAddress = new ReturnAddress(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recipientName".equals(fieldName)) { - deserializedReturnAddress.recipientName = reader.getString(); - } else if ("streetAddress1".equals(fieldName)) { - deserializedReturnAddress.streetAddress1 = reader.getString(); - } else if ("city".equals(fieldName)) { - deserializedReturnAddress.city = reader.getString(); - } else if ("postalCode".equals(fieldName)) { - deserializedReturnAddress.postalCode = reader.getString(); - } else if ("countryOrRegion".equals(fieldName)) { - deserializedReturnAddress.countryOrRegion = reader.getString(); - } else if ("phone".equals(fieldName)) { - deserializedReturnAddress.phone = reader.getString(); - } else if ("email".equals(fieldName)) { - deserializedReturnAddress.email = reader.getString(); - } else if ("streetAddress2".equals(fieldName)) { - deserializedReturnAddress.streetAddress2 = reader.getString(); - } else if ("stateOrProvince".equals(fieldName)) { - deserializedReturnAddress.stateOrProvince = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReturnAddress; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ReturnShipping.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ReturnShipping.java deleted file mode 100644 index 29e0ae8446fc..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ReturnShipping.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Specifies the return carrier and customer's account with the carrier. - */ -@Fluent -public final class ReturnShipping implements JsonSerializable { - /* - * The carrier's name. - */ - private String carrierName; - - /* - * The customer's account number with the carrier. - */ - private String carrierAccountNumber; - - /** - * Creates an instance of ReturnShipping class. - */ - public ReturnShipping() { - } - - /** - * Get the carrierName property: The carrier's name. - * - * @return the carrierName value. - */ - public String carrierName() { - return this.carrierName; - } - - /** - * Set the carrierName property: The carrier's name. - * - * @param carrierName the carrierName value to set. - * @return the ReturnShipping object itself. - */ - public ReturnShipping withCarrierName(String carrierName) { - this.carrierName = carrierName; - return this; - } - - /** - * Get the carrierAccountNumber property: The customer's account number with the carrier. - * - * @return the carrierAccountNumber value. - */ - public String carrierAccountNumber() { - return this.carrierAccountNumber; - } - - /** - * Set the carrierAccountNumber property: The customer's account number with the carrier. - * - * @param carrierAccountNumber the carrierAccountNumber value to set. - * @return the ReturnShipping object itself. - */ - public ReturnShipping withCarrierAccountNumber(String carrierAccountNumber) { - this.carrierAccountNumber = carrierAccountNumber; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (carrierName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property carrierName in model ReturnShipping")); - } - if (carrierAccountNumber() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property carrierAccountNumber in model ReturnShipping")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ReturnShipping.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("carrierName", this.carrierName); - jsonWriter.writeStringField("carrierAccountNumber", this.carrierAccountNumber); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReturnShipping from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReturnShipping if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ReturnShipping. - */ - public static ReturnShipping fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReturnShipping deserializedReturnShipping = new ReturnShipping(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("carrierName".equals(fieldName)) { - deserializedReturnShipping.carrierName = reader.getString(); - } else if ("carrierAccountNumber".equals(fieldName)) { - deserializedReturnShipping.carrierAccountNumber = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReturnShipping; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ShippingInformation.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ShippingInformation.java deleted file mode 100644 index 79cb6a550f65..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/ShippingInformation.java +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Contains information about the Microsoft datacenter to which the drives should be shipped. - */ -@Fluent -public final class ShippingInformation implements JsonSerializable { - /* - * The name of the recipient who will receive the hard drives when they are returned. - */ - private String recipientName; - - /* - * The first line of the street address to use when returning the drives. - */ - private String streetAddress1; - - /* - * The second line of the street address to use when returning the drives. - */ - private String streetAddress2; - - /* - * The city name to use when returning the drives. - */ - private String city; - - /* - * The state or province to use when returning the drives. - */ - private String stateOrProvince; - - /* - * The postal code to use when returning the drives. - */ - private String postalCode; - - /* - * The country or region to use when returning the drives. - */ - private String countryOrRegion; - - /* - * Phone number of the recipient of the returned drives. - */ - private String phone; - - /* - * Additional shipping information for customer, specific to datacenter to which customer should send their disks. - */ - private String additionalInformation; - - /** - * Creates an instance of ShippingInformation class. - */ - public ShippingInformation() { - } - - /** - * Get the recipientName property: The name of the recipient who will receive the hard drives when they are - * returned. - * - * @return the recipientName value. - */ - public String recipientName() { - return this.recipientName; - } - - /** - * Set the recipientName property: The name of the recipient who will receive the hard drives when they are - * returned. - * - * @param recipientName the recipientName value to set. - * @return the ShippingInformation object itself. - */ - public ShippingInformation withRecipientName(String recipientName) { - this.recipientName = recipientName; - return this; - } - - /** - * Get the streetAddress1 property: The first line of the street address to use when returning the drives. - * - * @return the streetAddress1 value. - */ - public String streetAddress1() { - return this.streetAddress1; - } - - /** - * Set the streetAddress1 property: The first line of the street address to use when returning the drives. - * - * @param streetAddress1 the streetAddress1 value to set. - * @return the ShippingInformation object itself. - */ - public ShippingInformation withStreetAddress1(String streetAddress1) { - this.streetAddress1 = streetAddress1; - return this; - } - - /** - * Get the streetAddress2 property: The second line of the street address to use when returning the drives. - * - * @return the streetAddress2 value. - */ - public String streetAddress2() { - return this.streetAddress2; - } - - /** - * Set the streetAddress2 property: The second line of the street address to use when returning the drives. - * - * @param streetAddress2 the streetAddress2 value to set. - * @return the ShippingInformation object itself. - */ - public ShippingInformation withStreetAddress2(String streetAddress2) { - this.streetAddress2 = streetAddress2; - return this; - } - - /** - * Get the city property: The city name to use when returning the drives. - * - * @return the city value. - */ - public String city() { - return this.city; - } - - /** - * Set the city property: The city name to use when returning the drives. - * - * @param city the city value to set. - * @return the ShippingInformation object itself. - */ - public ShippingInformation withCity(String city) { - this.city = city; - return this; - } - - /** - * Get the stateOrProvince property: The state or province to use when returning the drives. - * - * @return the stateOrProvince value. - */ - public String stateOrProvince() { - return this.stateOrProvince; - } - - /** - * Set the stateOrProvince property: The state or province to use when returning the drives. - * - * @param stateOrProvince the stateOrProvince value to set. - * @return the ShippingInformation object itself. - */ - public ShippingInformation withStateOrProvince(String stateOrProvince) { - this.stateOrProvince = stateOrProvince; - return this; - } - - /** - * Get the postalCode property: The postal code to use when returning the drives. - * - * @return the postalCode value. - */ - public String postalCode() { - return this.postalCode; - } - - /** - * Set the postalCode property: The postal code to use when returning the drives. - * - * @param postalCode the postalCode value to set. - * @return the ShippingInformation object itself. - */ - public ShippingInformation withPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } - - /** - * Get the countryOrRegion property: The country or region to use when returning the drives. - * - * @return the countryOrRegion value. - */ - public String countryOrRegion() { - return this.countryOrRegion; - } - - /** - * Set the countryOrRegion property: The country or region to use when returning the drives. - * - * @param countryOrRegion the countryOrRegion value to set. - * @return the ShippingInformation object itself. - */ - public ShippingInformation withCountryOrRegion(String countryOrRegion) { - this.countryOrRegion = countryOrRegion; - return this; - } - - /** - * Get the phone property: Phone number of the recipient of the returned drives. - * - * @return the phone value. - */ - public String phone() { - return this.phone; - } - - /** - * Set the phone property: Phone number of the recipient of the returned drives. - * - * @param phone the phone value to set. - * @return the ShippingInformation object itself. - */ - public ShippingInformation withPhone(String phone) { - this.phone = phone; - return this; - } - - /** - * Get the additionalInformation property: Additional shipping information for customer, specific to datacenter to - * which customer should send their disks. - * - * @return the additionalInformation value. - */ - public String additionalInformation() { - return this.additionalInformation; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("recipientName", this.recipientName); - jsonWriter.writeStringField("streetAddress1", this.streetAddress1); - jsonWriter.writeStringField("streetAddress2", this.streetAddress2); - jsonWriter.writeStringField("city", this.city); - jsonWriter.writeStringField("stateOrProvince", this.stateOrProvince); - jsonWriter.writeStringField("postalCode", this.postalCode); - jsonWriter.writeStringField("countryOrRegion", this.countryOrRegion); - jsonWriter.writeStringField("phone", this.phone); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ShippingInformation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ShippingInformation if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ShippingInformation. - */ - public static ShippingInformation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ShippingInformation deserializedShippingInformation = new ShippingInformation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recipientName".equals(fieldName)) { - deserializedShippingInformation.recipientName = reader.getString(); - } else if ("streetAddress1".equals(fieldName)) { - deserializedShippingInformation.streetAddress1 = reader.getString(); - } else if ("streetAddress2".equals(fieldName)) { - deserializedShippingInformation.streetAddress2 = reader.getString(); - } else if ("city".equals(fieldName)) { - deserializedShippingInformation.city = reader.getString(); - } else if ("stateOrProvince".equals(fieldName)) { - deserializedShippingInformation.stateOrProvince = reader.getString(); - } else if ("postalCode".equals(fieldName)) { - deserializedShippingInformation.postalCode = reader.getString(); - } else if ("countryOrRegion".equals(fieldName)) { - deserializedShippingInformation.countryOrRegion = reader.getString(); - } else if ("phone".equals(fieldName)) { - deserializedShippingInformation.phone = reader.getString(); - } else if ("additionalInformation".equals(fieldName)) { - deserializedShippingInformation.additionalInformation = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedShippingInformation; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/UpdateJobParameters.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/UpdateJobParameters.java deleted file mode 100644 index 4750a4658427..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/UpdateJobParameters.java +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.storageimportexport.fluent.models.UpdateJobParametersProperties; -import java.io.IOException; -import java.util.List; - -/** - * Update Job parameters. - */ -@Fluent -public final class UpdateJobParameters implements JsonSerializable { - /* - * Specifies the tags that will be assigned to the job - */ - private Object tags; - - /* - * Specifies the properties of a UpdateJob. - */ - private UpdateJobParametersProperties innerProperties; - - /** - * Creates an instance of UpdateJobParameters class. - */ - public UpdateJobParameters() { - } - - /** - * Get the tags property: Specifies the tags that will be assigned to the job. - * - * @return the tags value. - */ - public Object tags() { - return this.tags; - } - - /** - * Set the tags property: Specifies the tags that will be assigned to the job. - * - * @param tags the tags value to set. - * @return the UpdateJobParameters object itself. - */ - public UpdateJobParameters withTags(Object tags) { - this.tags = tags; - return this; - } - - /** - * Get the innerProperties property: Specifies the properties of a UpdateJob. - * - * @return the innerProperties value. - */ - private UpdateJobParametersProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the cancelRequested property: If specified, the value must be true. The service will attempt to cancel the - * job. - * - * @return the cancelRequested value. - */ - public Boolean cancelRequested() { - return this.innerProperties() == null ? null : this.innerProperties().cancelRequested(); - } - - /** - * Set the cancelRequested property: If specified, the value must be true. The service will attempt to cancel the - * job. - * - * @param cancelRequested the cancelRequested value to set. - * @return the UpdateJobParameters object itself. - */ - public UpdateJobParameters withCancelRequested(Boolean cancelRequested) { - if (this.innerProperties() == null) { - this.innerProperties = new UpdateJobParametersProperties(); - } - this.innerProperties().withCancelRequested(cancelRequested); - return this; - } - - /** - * Get the state property: If specified, the value must be Shipping, which tells the Import/Export service that the - * package for the job has been shipped. The ReturnAddress and DeliveryPackage properties must have been set either - * in this request or in a previous request, otherwise the request will fail. - * - * @return the state value. - */ - public String state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); - } - - /** - * Set the state property: If specified, the value must be Shipping, which tells the Import/Export service that the - * package for the job has been shipped. The ReturnAddress and DeliveryPackage properties must have been set either - * in this request or in a previous request, otherwise the request will fail. - * - * @param state the state value to set. - * @return the UpdateJobParameters object itself. - */ - public UpdateJobParameters withState(String state) { - if (this.innerProperties() == null) { - this.innerProperties = new UpdateJobParametersProperties(); - } - this.innerProperties().withState(state); - return this; - } - - /** - * Get the returnAddress property: Specifies the return address information for the job. - * - * @return the returnAddress value. - */ - public ReturnAddress returnAddress() { - return this.innerProperties() == null ? null : this.innerProperties().returnAddress(); - } - - /** - * Set the returnAddress property: Specifies the return address information for the job. - * - * @param returnAddress the returnAddress value to set. - * @return the UpdateJobParameters object itself. - */ - public UpdateJobParameters withReturnAddress(ReturnAddress returnAddress) { - if (this.innerProperties() == null) { - this.innerProperties = new UpdateJobParametersProperties(); - } - this.innerProperties().withReturnAddress(returnAddress); - return this; - } - - /** - * Get the returnShipping property: Specifies the return carrier and customer's account with the carrier. - * - * @return the returnShipping value. - */ - public ReturnShipping returnShipping() { - return this.innerProperties() == null ? null : this.innerProperties().returnShipping(); - } - - /** - * Set the returnShipping property: Specifies the return carrier and customer's account with the carrier. - * - * @param returnShipping the returnShipping value to set. - * @return the UpdateJobParameters object itself. - */ - public UpdateJobParameters withReturnShipping(ReturnShipping returnShipping) { - if (this.innerProperties() == null) { - this.innerProperties = new UpdateJobParametersProperties(); - } - this.innerProperties().withReturnShipping(returnShipping); - return this; - } - - /** - * Get the deliveryPackage property: Contains information about the package being shipped by the customer to the - * Microsoft data center. - * - * @return the deliveryPackage value. - */ - public DeliveryPackageInformation deliveryPackage() { - return this.innerProperties() == null ? null : this.innerProperties().deliveryPackage(); - } - - /** - * Set the deliveryPackage property: Contains information about the package being shipped by the customer to the - * Microsoft data center. - * - * @param deliveryPackage the deliveryPackage value to set. - * @return the UpdateJobParameters object itself. - */ - public UpdateJobParameters withDeliveryPackage(DeliveryPackageInformation deliveryPackage) { - if (this.innerProperties() == null) { - this.innerProperties = new UpdateJobParametersProperties(); - } - this.innerProperties().withDeliveryPackage(deliveryPackage); - return this; - } - - /** - * Get the logLevel property: Indicates whether error logging or verbose logging is enabled. - * - * @return the logLevel value. - */ - public String logLevel() { - return this.innerProperties() == null ? null : this.innerProperties().logLevel(); - } - - /** - * Set the logLevel property: Indicates whether error logging or verbose logging is enabled. - * - * @param logLevel the logLevel value to set. - * @return the UpdateJobParameters object itself. - */ - public UpdateJobParameters withLogLevel(String logLevel) { - if (this.innerProperties() == null) { - this.innerProperties = new UpdateJobParametersProperties(); - } - this.innerProperties().withLogLevel(logLevel); - return this; - } - - /** - * Get the backupDriveManifest property: Indicates whether the manifest files on the drives should be copied to - * block blobs. - * - * @return the backupDriveManifest value. - */ - public Boolean backupDriveManifest() { - return this.innerProperties() == null ? null : this.innerProperties().backupDriveManifest(); - } - - /** - * Set the backupDriveManifest property: Indicates whether the manifest files on the drives should be copied to - * block blobs. - * - * @param backupDriveManifest the backupDriveManifest value to set. - * @return the UpdateJobParameters object itself. - */ - public UpdateJobParameters withBackupDriveManifest(Boolean backupDriveManifest) { - if (this.innerProperties() == null) { - this.innerProperties = new UpdateJobParametersProperties(); - } - this.innerProperties().withBackupDriveManifest(backupDriveManifest); - return this; - } - - /** - * Get the driveList property: List of drives that comprise the job. - * - * @return the driveList value. - */ - public List driveList() { - return this.innerProperties() == null ? null : this.innerProperties().driveList(); - } - - /** - * Set the driveList property: List of drives that comprise the job. - * - * @param driveList the driveList value to set. - * @return the UpdateJobParameters object itself. - */ - public UpdateJobParameters withDriveList(List driveList) { - if (this.innerProperties() == null) { - this.innerProperties = new UpdateJobParametersProperties(); - } - this.innerProperties().withDriveList(driveList); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeUntypedField("tags", this.tags); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdateJobParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdateJobParameters if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the UpdateJobParameters. - */ - public static UpdateJobParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdateJobParameters deserializedUpdateJobParameters = new UpdateJobParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - deserializedUpdateJobParameters.tags = reader.readUntyped(); - } else if ("properties".equals(fieldName)) { - deserializedUpdateJobParameters.innerProperties = UpdateJobParametersProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdateJobParameters; - }); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/package-info.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/package-info.java deleted file mode 100644 index bf01ed0e7771..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the data models for StorageImportExport. - * The Storage Import/Export Resource Provider API. - */ -package com.azure.resourcemanager.storageimportexport.models; diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/package-info.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/package-info.java deleted file mode 100644 index cdd8434672b1..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the classes for StorageImportExport. - * The Storage Import/Export Resource Provider API. - */ -package com.azure.resourcemanager.storageimportexport; diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/module-info.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/module-info.java deleted file mode 100644 index 149484bda900..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/module-info.java +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -module com.azure.resourcemanager.storageimportexport { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.storageimportexport; - exports com.azure.resourcemanager.storageimportexport.fluent; - exports com.azure.resourcemanager.storageimportexport.fluent.models; - exports com.azure.resourcemanager.storageimportexport.models; - - opens com.azure.resourcemanager.storageimportexport.fluent.models to com.azure.core; - opens com.azure.resourcemanager.storageimportexport.models to com.azure.core; -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-storageimportexport/proxy-config.json b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-storageimportexport/proxy-config.json deleted file mode 100644 index 0dbd987ba3ea..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-storageimportexport/proxy-config.json +++ /dev/null @@ -1 +0,0 @@ -[["com.azure.resourcemanager.storageimportexport.implementation.BitLockerKeysClientImpl$BitLockerKeysService"],["com.azure.resourcemanager.storageimportexport.implementation.JobsClientImpl$JobsService"],["com.azure.resourcemanager.storageimportexport.implementation.LocationsClientImpl$LocationsService"],["com.azure.resourcemanager.storageimportexport.implementation.OperationsClientImpl$OperationsService"]] \ No newline at end of file diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-storageimportexport/reflect-config.json b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-storageimportexport/reflect-config.json deleted file mode 100644 index f1ab0d9ce4ae..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-storageimportexport/reflect-config.json +++ /dev/null @@ -1 +0,0 @@ -[{"name":"com.azure.resourcemanager.storageimportexport.models.ErrorResponseError","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true},{"name":"com.azure.resourcemanager.storageimportexport.models.ErrorResponseErrorException","allDeclaredConstructors":true,"allDeclaredFields":true,"allDeclaredMethods":true}] \ No newline at end of file diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/BitLockerKeysListSamples.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/BitLockerKeysListSamples.java deleted file mode 100644 index f54508711d00..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/BitLockerKeysListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -/** - * Samples for BitLockerKeys List. - */ -public final class BitLockerKeysListSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/ - * ListBitLockerKeys.json - */ - /** - * Sample code: List BitLocker Keys for drives in a job. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void listBitLockerKeysForDrivesInAJob( - com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.bitLockerKeys().list("myJob", "myResourceGroup", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsCreateSamples.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsCreateSamples.java deleted file mode 100644 index 340866999b7f..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsCreateSamples.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -import com.azure.resourcemanager.storageimportexport.models.DriveStatus; -import com.azure.resourcemanager.storageimportexport.models.Export; -import com.azure.resourcemanager.storageimportexport.models.JobDetails; -import com.azure.resourcemanager.storageimportexport.models.ReturnAddress; -import com.azure.resourcemanager.storageimportexport.models.ReturnShipping; -import java.util.Arrays; - -/** - * Samples for Jobs Create. - */ -public final class JobsCreateSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/CreateJob. - * json - */ - /** - * Sample code: Create import job. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void - createImportJob(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.jobs() - .define("myJob") - .withExistingResourceGroup("myResourceGroup") - .withRegion("West US") - .withProperties(new JobDetails().withStorageAccountId( - "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/test") - .withJobType("Import") - .withReturnAddress(new ReturnAddress().withRecipientName("Test") - .withStreetAddress1("Street1") - .withStreetAddress2("street2") - .withCity("Redmond") - .withStateOrProvince("wa") - .withPostalCode("fakeTokenPlaceholder") - .withCountryOrRegion("USA") - .withPhone("4250000000") - .withEmail("Test@contoso.com")) - .withReturnShipping(new ReturnShipping().withCarrierName("FedEx").withCarrierAccountNumber("989ffff")) - .withDiagnosticsPath("waimportexport") - .withLogLevel("Verbose") - .withBackupDriveManifest(true) - .withDriveList(Arrays.asList(new DriveStatus().withDriveId("9CA995BB") - .withBitLockerKey("fakeTokenPlaceholder") - .withManifestFile("\\8a0c23f7-14b7-470a-9633-fcd46590a1bc.manifest") - .withManifestHash("4228EC5D8E048CB9B515338C789314BE8D0B2FDBC7C7A0308E1C826242CDE74E") - .withDriveHeaderHash( - "0:1048576:FB6B6ED500D49DA6E0D723C98D42C657F2881CC13357C28DCECA6A524F1292501571A321238540E621AB5BD9C9A32637615919A75593E6CB5C1515DAE341CABF;135266304:143360:C957A189AFC38C4E80731252301EB91427CE55E61448FA3C73C6FDDE70ABBC197947EC8D0249A2C639BB10B95957D5820A4BE8DFBBF76FFFA688AE5CE0D42EC3")))) - .create(); - } - - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/ - * CreateExportJob.json - */ - /** - * Sample code: Create export job. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void - createExportJob(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.jobs() - .define("myExportJob") - .withExistingResourceGroup("myResourceGroup") - .withRegion("West US") - .withProperties(new JobDetails().withStorageAccountId( - "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/test") - .withJobType("Export") - .withReturnAddress(new ReturnAddress().withRecipientName("Test") - .withStreetAddress1("Street1") - .withStreetAddress2("street2") - .withCity("Redmond") - .withStateOrProvince("wa") - .withPostalCode("fakeTokenPlaceholder") - .withCountryOrRegion("USA") - .withPhone("4250000000") - .withEmail("Test@contoso.com")) - .withReturnShipping(new ReturnShipping().withCarrierName("FedEx").withCarrierAccountNumber("989ffff")) - .withDiagnosticsPath("waimportexport") - .withLogLevel("Verbose") - .withBackupDriveManifest(true) - .withExport(new Export().withBlobPathPrefix(Arrays.asList("/")))) - .create(); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsDeleteSamples.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsDeleteSamples.java deleted file mode 100644 index 6c61da8db01a..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -/** - * Samples for Jobs Delete. - */ -public final class JobsDeleteSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/DeleteJob. - * json - */ - /** - * Sample code: Delete job. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void deleteJob(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.jobs().deleteByResourceGroupWithResponse("myResourceGroup", "myJob", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsGetByResourceGroupSamples.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsGetByResourceGroupSamples.java deleted file mode 100644 index 413e371512f3..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsGetByResourceGroupSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -/** - * Samples for Jobs GetByResourceGroup. - */ -public final class JobsGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/ - * GetExportJob.json - */ - /** - * Sample code: Get export job. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void getExportJob(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.jobs().getByResourceGroupWithResponse("myResourceGroup", "myJob", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/GetJob.json - */ - /** - * Sample code: Get import job. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void getImportJob(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.jobs().getByResourceGroupWithResponse("myResourceGroup", "myJob", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsListByResourceGroupSamples.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsListByResourceGroupSamples.java deleted file mode 100644 index 62f3dd5bcd31..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsListByResourceGroupSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -/** - * Samples for Jobs ListByResourceGroup. - */ -public final class JobsListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/ - * ListJobsInResourceGroup.json - */ - /** - * Sample code: List jobs in a resource group. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void - listJobsInAResourceGroup(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.jobs().listByResourceGroup("myResourceGroup", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsListSamples.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsListSamples.java deleted file mode 100644 index 2958371cebd2..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -/** - * Samples for Jobs List. - */ -public final class JobsListSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/ - * ListJobsInSubscription.json - */ - /** - * Sample code: List jobs in a subscription. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void - listJobsInASubscription(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.jobs().list(null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsUpdateSamples.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsUpdateSamples.java deleted file mode 100644 index d9f4b3962e98..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/JobsUpdateSamples.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -import com.azure.resourcemanager.storageimportexport.models.JobResponse; - -/** - * Samples for Jobs Update. - */ -public final class JobsUpdateSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/ - * UpdateExportJob.json - */ - /** - * Sample code: Update export job. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void - updateExportJob(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - JobResponse resource = manager.jobs() - .getByResourceGroupWithResponse("myResourceGroup", "myExportJob", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withState("").withLogLevel("Verbose").withBackupDriveManifest(true).apply(); - } - - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/UpdateJob. - * json - */ - /** - * Sample code: Update import job. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void - updateImportJob(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - JobResponse resource = manager.jobs() - .getByResourceGroupWithResponse("myResourceGroup", "myJob", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withState("").withLogLevel("Verbose").withBackupDriveManifest(true).apply(); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/LocationsGetSamples.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/LocationsGetSamples.java deleted file mode 100644 index ba8ad54f6b20..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/LocationsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -/** - * Samples for Locations Get. - */ -public final class LocationsGetSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/GetLocation - * .json - */ - /** - * Sample code: Get locations. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void getLocations(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.locations().getWithResponse("West US", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/LocationsListSamples.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/LocationsListSamples.java deleted file mode 100644 index 6d64d06d6619..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/LocationsListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -/** - * Samples for Locations List. - */ -public final class LocationsListSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/ - * ListLocations.json - */ - /** - * Sample code: List locations. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void listLocations(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.locations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/OperationsListSamples.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/OperationsListSamples.java deleted file mode 100644 index 720e2c6fb2f9..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/samples/java/com/azure/resourcemanager/storageimportexport/generated/OperationsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: - * specification/storageimportexport/resource-manager/Microsoft.ImportExport/preview/2021-01-01/examples/ - * ListOperations.json - */ - /** - * Sample code: List available operations. - * - * @param manager Entry point to StorageImportExportManager. - */ - public static void - listAvailableOperations(com.azure.resourcemanager.storageimportexport.StorageImportExportManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/DeliveryPackageInformationTests.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/DeliveryPackageInformationTests.java deleted file mode 100644 index 7e18c3a3609f..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/DeliveryPackageInformationTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.storageimportexport.models.DeliveryPackageInformation; -import org.junit.jupiter.api.Assertions; - -public final class DeliveryPackageInformationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeliveryPackageInformation model = BinaryData.fromString( - "{\"carrierName\":\"tfell\",\"trackingNumber\":\"wfzitonpeqfpjk\",\"driveCount\":5941084634075289763,\"shipDate\":\"pdvhpfxxypin\"}") - .toObject(DeliveryPackageInformation.class); - Assertions.assertEquals("tfell", model.carrierName()); - Assertions.assertEquals("wfzitonpeqfpjk", model.trackingNumber()); - Assertions.assertEquals(5941084634075289763L, model.driveCount()); - Assertions.assertEquals("pdvhpfxxypin", model.shipDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeliveryPackageInformation model = new DeliveryPackageInformation().withCarrierName("tfell") - .withTrackingNumber("wfzitonpeqfpjk") - .withDriveCount(5941084634075289763L) - .withShipDate("pdvhpfxxypin"); - model = BinaryData.fromObject(model).toObject(DeliveryPackageInformation.class); - Assertions.assertEquals("tfell", model.carrierName()); - Assertions.assertEquals("wfzitonpeqfpjk", model.trackingNumber()); - Assertions.assertEquals(5941084634075289763L, model.driveCount()); - Assertions.assertEquals("pdvhpfxxypin", model.shipDate()); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/EncryptionKeyDetailsTests.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/EncryptionKeyDetailsTests.java deleted file mode 100644 index 4a908e0ed372..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/EncryptionKeyDetailsTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.storageimportexport.models.EncryptionKekType; -import com.azure.resourcemanager.storageimportexport.models.EncryptionKeyDetails; -import org.junit.jupiter.api.Assertions; - -public final class EncryptionKeyDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EncryptionKeyDetails model = BinaryData - .fromString( - "{\"kekType\":\"CustomerManaged\",\"kekUrl\":\"uujitcjc\",\"kekVaultResourceID\":\"zevndhkrwpdappds\"}") - .toObject(EncryptionKeyDetails.class); - Assertions.assertEquals(EncryptionKekType.CUSTOMER_MANAGED, model.kekType()); - Assertions.assertEquals("uujitcjc", model.kekUrl()); - Assertions.assertEquals("zevndhkrwpdappds", model.kekVaultResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EncryptionKeyDetails model = new EncryptionKeyDetails().withKekType(EncryptionKekType.CUSTOMER_MANAGED) - .withKekUrl("uujitcjc") - .withKekVaultResourceId("zevndhkrwpdappds"); - model = BinaryData.fromObject(model).toObject(EncryptionKeyDetails.class); - Assertions.assertEquals(EncryptionKekType.CUSTOMER_MANAGED, model.kekType()); - Assertions.assertEquals("uujitcjc", model.kekUrl()); - Assertions.assertEquals("zevndhkrwpdappds", model.kekVaultResourceId()); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/ExportBlobListTests.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/ExportBlobListTests.java deleted file mode 100644 index c7340686eeb3..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/ExportBlobListTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.storageimportexport.fluent.models.ExportBlobList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExportBlobListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExportBlobList model = BinaryData.fromString( - "{\"blobPath\":[\"ybkzgcwr\",\"clxxwrljdo\",\"skcqvkocrcjd\",\"wtnhxbnjbiksqr\"],\"blobPathPrefix\":[\"sainqpjwnzl\",\"jfm\",\"pee\",\"vmgxsab\"]}") - .toObject(ExportBlobList.class); - Assertions.assertEquals("ybkzgcwr", model.blobPath().get(0)); - Assertions.assertEquals("sainqpjwnzl", model.blobPathPrefix().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExportBlobList model = new ExportBlobList() - .withBlobPath(Arrays.asList("ybkzgcwr", "clxxwrljdo", "skcqvkocrcjd", "wtnhxbnjbiksqr")) - .withBlobPathPrefix(Arrays.asList("sainqpjwnzl", "jfm", "pee", "vmgxsab")); - model = BinaryData.fromObject(model).toObject(ExportBlobList.class); - Assertions.assertEquals("ybkzgcwr", model.blobPath().get(0)); - Assertions.assertEquals("sainqpjwnzl", model.blobPathPrefix().get(0)); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/ExportTests.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/ExportTests.java deleted file mode 100644 index 2d099e8e0e07..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/ExportTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.storageimportexport.models.Export; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExportTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Export model = BinaryData.fromString( - "{\"blobList\":{\"blobPath\":[\"cciqihnhungbwjz\"],\"blobPathPrefix\":[\"ygxgispemvtz\",\"kufubljo\",\"xqeofjaeqjhqjba\",\"v\"]},\"blobListBlobPath\":\"mjqulngsn\"}") - .toObject(Export.class); - Assertions.assertEquals("mjqulngsn", model.blobListBlobPath()); - Assertions.assertEquals("cciqihnhungbwjz", model.blobPath().get(0)); - Assertions.assertEquals("ygxgispemvtz", model.blobPathPrefix().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Export model = new Export().withBlobListBlobPath("mjqulngsn") - .withBlobPath(Arrays.asList("cciqihnhungbwjz")) - .withBlobPathPrefix(Arrays.asList("ygxgispemvtz", "kufubljo", "xqeofjaeqjhqjba", "v")); - model = BinaryData.fromObject(model).toObject(Export.class); - Assertions.assertEquals("mjqulngsn", model.blobListBlobPath()); - Assertions.assertEquals("cciqihnhungbwjz", model.blobPath().get(0)); - Assertions.assertEquals("ygxgispemvtz", model.blobPathPrefix().get(0)); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/IdentityDetailsTests.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/IdentityDetailsTests.java deleted file mode 100644 index 42fa0a2ee7d7..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/IdentityDetailsTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.storageimportexport.models.IdentityDetails; -import com.azure.resourcemanager.storageimportexport.models.IdentityType; -import org.junit.jupiter.api.Assertions; - -public final class IdentityDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityDetails model - = BinaryData.fromString("{\"type\":\"None\",\"principalId\":\"wrwjfeu\",\"tenantId\":\"hutje\"}") - .toObject(IdentityDetails.class); - Assertions.assertEquals(IdentityType.NONE, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityDetails model = new IdentityDetails().withType(IdentityType.NONE); - model = BinaryData.fromObject(model).toObject(IdentityDetails.class); - Assertions.assertEquals(IdentityType.NONE, model.type()); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/JobsDeleteByResourceGroupWithResponseMockTests.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/JobsDeleteByResourceGroupWithResponseMockTests.java deleted file mode 100644 index c845d1306291..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/JobsDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.storageimportexport.StorageImportExportManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - StorageImportExportManager manager = StorageImportExportManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.jobs().deleteByResourceGroupWithResponse("h", "qfbow", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/ListOperationsResponseTests.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/ListOperationsResponseTests.java deleted file mode 100644 index 72cf501544de..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/ListOperationsResponseTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.storageimportexport.fluent.models.OperationInner; -import com.azure.resourcemanager.storageimportexport.models.ListOperationsResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ListOperationsResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListOperationsResponse model = BinaryData.fromString( - "{\"value\":[{\"name\":\"xgjvtbv\",\"display\":{\"provider\":\"sszdnru\",\"resource\":\"guhmuouqfpr\",\"operation\":\"wbnguitnwui\",\"description\":\"a\"}}]}") - .toObject(ListOperationsResponse.class); - Assertions.assertEquals("xgjvtbv", model.value().get(0).name()); - Assertions.assertEquals("sszdnru", model.value().get(0).provider()); - Assertions.assertEquals("guhmuouqfpr", model.value().get(0).resource()); - Assertions.assertEquals("wbnguitnwui", model.value().get(0).operation()); - Assertions.assertEquals("a", model.value().get(0).description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListOperationsResponse model - = new ListOperationsResponse().withValue(Arrays.asList(new OperationInner().withName("xgjvtbv") - .withProvider("sszdnru") - .withResource("guhmuouqfpr") - .withOperation("wbnguitnwui") - .withDescription("a"))); - model = BinaryData.fromObject(model).toObject(ListOperationsResponse.class); - Assertions.assertEquals("xgjvtbv", model.value().get(0).name()); - Assertions.assertEquals("sszdnru", model.value().get(0).provider()); - Assertions.assertEquals("guhmuouqfpr", model.value().get(0).resource()); - Assertions.assertEquals("wbnguitnwui", model.value().get(0).operation()); - Assertions.assertEquals("a", model.value().get(0).description()); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/OperationDisplayTests.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/OperationDisplayTests.java deleted file mode 100644 index 93ff015b4e78..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/OperationDisplayTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.storageimportexport.fluent.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"fufsrpymzi\",\"resource\":\"sezcxtb\",\"operation\":\"gfycc\",\"description\":\"ewmdw\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("fufsrpymzi", model.provider()); - Assertions.assertEquals("sezcxtb", model.resource()); - Assertions.assertEquals("gfycc", model.operation()); - Assertions.assertEquals("ewmdw", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withProvider("fufsrpymzi") - .withResource("sezcxtb") - .withOperation("gfycc") - .withDescription("ewmdw"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("fufsrpymzi", model.provider()); - Assertions.assertEquals("sezcxtb", model.resource()); - Assertions.assertEquals("gfycc", model.operation()); - Assertions.assertEquals("ewmdw", model.description()); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/OperationInnerTests.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/OperationInnerTests.java deleted file mode 100644 index 240923ca5cc5..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/OperationInnerTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.storageimportexport.fluent.models.OperationInner; -import org.junit.jupiter.api.Assertions; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = BinaryData.fromString( - "{\"name\":\"x\",\"display\":{\"provider\":\"izuckyfihrfidfvz\",\"resource\":\"zuhtymwisdkfthwx\",\"operation\":\"t\",\"description\":\"waopvkmijcmmxd\"}}") - .toObject(OperationInner.class); - Assertions.assertEquals("x", model.name()); - Assertions.assertEquals("izuckyfihrfidfvz", model.provider()); - Assertions.assertEquals("zuhtymwisdkfthwx", model.resource()); - Assertions.assertEquals("t", model.operation()); - Assertions.assertEquals("waopvkmijcmmxd", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withName("x") - .withProvider("izuckyfihrfidfvz") - .withResource("zuhtymwisdkfthwx") - .withOperation("t") - .withDescription("waopvkmijcmmxd"); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("x", model.name()); - Assertions.assertEquals("izuckyfihrfidfvz", model.provider()); - Assertions.assertEquals("zuhtymwisdkfthwx", model.resource()); - Assertions.assertEquals("t", model.operation()); - Assertions.assertEquals("waopvkmijcmmxd", model.description()); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/OperationsListMockTests.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/OperationsListMockTests.java deleted file mode 100644 index 34a1a3e434cf..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/OperationsListMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.storageimportexport.StorageImportExportManager; -import com.azure.resourcemanager.storageimportexport.models.Operation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"pdjpjumasxazjp\",\"display\":{\"provider\":\"e\",\"resource\":\"alhbx\",\"operation\":\"e\",\"description\":\"zzvdudgwds\"}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - StorageImportExportManager manager = StorageImportExportManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pdjpjumasxazjp", response.iterator().next().name()); - Assertions.assertEquals("e", response.iterator().next().provider()); - Assertions.assertEquals("alhbx", response.iterator().next().resource()); - Assertions.assertEquals("e", response.iterator().next().operation()); - Assertions.assertEquals("zzvdudgwds", response.iterator().next().description()); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/PackageInformationTests.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/PackageInformationTests.java deleted file mode 100644 index f448dd05f3aa..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/PackageInformationTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.storageimportexport.models.PackageInformation; -import org.junit.jupiter.api.Assertions; - -public final class PackageInformationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PackageInformation model = BinaryData.fromString( - "{\"carrierName\":\"nmayhuybb\",\"trackingNumber\":\"podepoo\",\"driveCount\":4106452916609629681,\"shipDate\":\"uvamiheognarxzxt\"}") - .toObject(PackageInformation.class); - Assertions.assertEquals("nmayhuybb", model.carrierName()); - Assertions.assertEquals("podepoo", model.trackingNumber()); - Assertions.assertEquals(4106452916609629681L, model.driveCount()); - Assertions.assertEquals("uvamiheognarxzxt", model.shipDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PackageInformation model = new PackageInformation().withCarrierName("nmayhuybb") - .withTrackingNumber("podepoo") - .withDriveCount(4106452916609629681L) - .withShipDate("uvamiheognarxzxt"); - model = BinaryData.fromObject(model).toObject(PackageInformation.class); - Assertions.assertEquals("nmayhuybb", model.carrierName()); - Assertions.assertEquals("podepoo", model.trackingNumber()); - Assertions.assertEquals(4106452916609629681L, model.driveCount()); - Assertions.assertEquals("uvamiheognarxzxt", model.shipDate()); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/ReturnShippingTests.java b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/ReturnShippingTests.java deleted file mode 100644 index 4ce5fccc65ed..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/java/com/azure/resourcemanager/storageimportexport/generated/ReturnShippingTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.storageimportexport.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.storageimportexport.models.ReturnShipping; -import org.junit.jupiter.api.Assertions; - -public final class ReturnShippingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReturnShipping model - = BinaryData.fromString("{\"carrierName\":\"jpslwejd\",\"carrierAccountNumber\":\"vwryoqpso\"}") - .toObject(ReturnShipping.class); - Assertions.assertEquals("jpslwejd", model.carrierName()); - Assertions.assertEquals("vwryoqpso", model.carrierAccountNumber()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReturnShipping model = new ReturnShipping().withCarrierName("jpslwejd").withCarrierAccountNumber("vwryoqpso"); - model = BinaryData.fromObject(model).toObject(ReturnShipping.class); - Assertions.assertEquals("jpslwejd", model.carrierName()); - Assertions.assertEquals("vwryoqpso", model.carrierAccountNumber()); - } -} diff --git a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker deleted file mode 100644 index 1f0955d450f0..000000000000 --- a/sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker +++ /dev/null @@ -1 +0,0 @@ -mock-maker-inline diff --git a/sdk/storageimportexport/ci.yml b/sdk/storageimportexport/ci.yml deleted file mode 100644 index 1b92971dbf17..000000000000 --- a/sdk/storageimportexport/ci.yml +++ /dev/null @@ -1,39 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - -trigger: - branches: - include: - - main - - hotfix/* - - release/* - paths: - include: - - sdk/storageimportexport/ci.yml - - sdk/storageimportexport/azure-resourcemanager-storageimportexport/ - exclude: - - sdk/storageimportexport/pom.xml - - sdk/storageimportexport/azure-resourcemanager-storageimportexport/pom.xml - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/storageimportexport/ci.yml - - sdk/storageimportexport/azure-resourcemanager-storageimportexport/ - exclude: - - sdk/storageimportexport/pom.xml - - sdk/storageimportexport/azure-resourcemanager-storageimportexport/pom.xml - -extends: - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: storageimportexport - Artifacts: - - name: azure-resourcemanager-storageimportexport - groupId: com.azure.resourcemanager - safeName: azureresourcemanagerstorageimportexport diff --git a/sdk/storageimportexport/pom.xml b/sdk/storageimportexport/pom.xml deleted file mode 100644 index a0d29695ec7d..000000000000 --- a/sdk/storageimportexport/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - com.azure - azure-storageimportexport-service - pom - 1.0.0 - - - azure-resourcemanager-storageimportexport - - diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/CHANGELOG.md b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/CHANGELOG.md deleted file mode 100644 index 8b60ecbb3c3a..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/CHANGELOG.md +++ /dev/null @@ -1,39 +0,0 @@ -# Release History - -## 1.0.0-beta.7 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.6 (2022-04-29) -### Other Changes -Deprecated. We’re retiring the Azure Video Analyzer preview service, you're advised to transition your applications off of Video Analyzer by 01 December 2022. This SDK is not longer maintained. - -## 1.0.0-beta.5 (2021-11-09) - -- Added device discovery and device detail request for ONVIF enabled devices. -- Added Remote Device Adapter configuration for ingesting video in a private network -- Added retention policy to VideoSink - -## 1.0.0-beta.4 (2021-06-10) - -- Update the description of the package, to add more info on the maven page. -- Update dependency version, `azure-core` to 1.17.0 - -## 1.0.0-beta.3 (2021-05-24) - -- Updated the title and description of the package and updates to readme. - -## 1.0.0-beta.2 (2021-05-24) - -- Updated the title and description of the package. - -## 1.0.0-beta.1 (2021-05-19) -Version 1.0.0-beta.1 is a preview of our efforts in creating a library for Azure Video Analyzer Edge. - -- Initial release. Please see the README and wiki for information on using the new library. diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/README.md b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/README.md deleted file mode 100644 index 9bf354a9429a..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/README.md +++ /dev/null @@ -1,214 +0,0 @@ -# Deprecated. Azure Video Analyzer Edge client library for Java - -Deprecated. We’re retiring the Azure Video Analyzer preview service, you're advised to transition your applications off of Video Analyzer by 01 December 2022. This SDK is not longer maintained. - -Azure Video Analyzer is an [Azure Applied AI Service][applied-ai-service] that provides a platform for you to build intelligent video applications that can span both edge and cloud infrastructures. The platform offers the capability to capture, record, and analyze live video along with publishing the results, video and video analytics, to Azure services at the edge or in the cloud. It is designed to be an extensible platform, enabling you to connect different video inferencing edge modules such as Cognitive services modules, or custom inferencing modules that have been trained with your own data using either open-source machine learning or [Azure Machine Learning][machine-learning]. - -Use the client library for Video Analyzer Edge to: - -- Simplify interactions with the [Microsoft Azure IoT SDKs](https://github.com/azure/azure-iot-sdks) -- Programmatically construct pipeline topologies and live pipelines - -[Product documentation][doc_product] | [Direct methods][doc_direct_methods] | [Source code][source] - -## Getting started - -### Prerequisites - -- A Java Development Kit, version 8 or later. -- You need an active [Azure subscription][azure_sub] and a IoT device connection string to use this package. -- To interact with Azure IoT Hub you will need to add their dependency to your `pom.xml` - -### Include the package - -Install the Azure Video Analyzer Edge client library for Java with Maven: - -# - -```xml - - com.microsoft.azure.sdk.iot - iot-service-client - 1.28.0 - - - com.azure - azure-media-videoanalyzer-edge - 1.0.0-beta.3 - -``` - -- You will need to use the version of the SDK that corresponds to the version of the Video Analyzer edge module you are using. - - | SDK | Video Analyzer edge module | - | ------------ | -------------------------- | - | 1.0.0-beta.5 | 1.1 | - | 1.0.0-beta.4 | 1.0 | - | 1.0.0-beta.3 | 1.0 | - | 1.0.0-beta.2 | 1.0 | - | 1.0.0-beta.1 | 1.0 | - -### Creating a pipeline topology and making requests - -Please visit the [Examples](#examples) for starter code. - -## Key concepts - -### Pipeline topology vs live pipeline - -A _pipeline topology_ is a blueprint or template for creating live pipelines. It defines the parameters of the pipeline using placeholders as values for them. A _live pipeline_ references a pipeline topology and specifies the parameters. This way you are able to have multiple live pipelines referencing the same topology but with different values for parameters. For more information please visit [pipeline topologies and live pipelines][doc_pipelines]. - -## Examples - -### Creating a pipeline topology - -To create a pipeline topology you need to define sources and sinks. - -```java readme-sample-buildPipelineTopology -private static PipelineTopology buildPipeLineTopology() { - IotHubMessageSource msgSource = new IotHubMessageSource("iotMsgSource") - .setHubInputName("${hubSourceInput}"); - - UsernamePasswordCredentials creds = new UsernamePasswordCredentials("${rtspUsername}", "${rtspPassword}"); - - UnsecuredEndpoint endpoint = new UnsecuredEndpoint("${rtspUrl}") - .setCredentials(creds); - - RtspSource rtspSource = new RtspSource("rtspSource", endpoint); - - NodeInput rtspInput = new NodeInput("rtspSource"); - - OutputSelector rtspOutputSelector = new OutputSelector() - .setProperty(OutputSelectorProperty.MEDIA_TYPE) - .setOperator(OutputSelectorOperator.IS) - .setValue("video"); - ImageScale imageScale = new ImageScale() - .setMode(ImageScaleMode.PRESERVE_ASPECT_RATIO) - .setHeight("416") - .setWidth("416"); - ImageFormatBmp imageFormat = new ImageFormatBmp(); - ImageProperties image = new ImageProperties() - .setScale(imageScale) - .setFormat(imageFormat); - ExtensionProcessorBase httpExtension = new HttpExtension("inferenceClient", Arrays.asList(rtspInput), endpoint, image); - - NodeInput nodeInput = new NodeInput("inferenceClient"); - - IotHubMessageSink msgSink = new IotHubMessageSink("msgSink", - Arrays.asList(nodeInput), - "${hubSinkOutputName}"); - - ParameterDeclaration userName = new ParameterDeclaration("rtspUserName", ParameterType.STRING); - - ParameterDeclaration password = new ParameterDeclaration("rtspPassword", ParameterType.SECRET_STRING); - ParameterDeclaration url = new ParameterDeclaration("rtspUrl", ParameterType.STRING); - ParameterDeclaration hubOutput = new ParameterDeclaration("hubSinkOutputName", ParameterType.STRING); - - PipelineTopologyProperties pipeProps = new PipelineTopologyProperties() - .setParameters(Arrays.asList(userName, password, url, hubOutput)) - .setSources(Arrays.asList(rtspSource)) - .setSinks(Arrays.asList(msgSink)) - .setProcessors(Arrays.asList(httpExtension)); - - return new PipelineTopology(TOPOLOGY_NAME) - .setProperties(pipeProps); -} -``` - -### Creating a live pipeline - -To create a live pipeline, you need to have an existing pipeline topology. - -```java readme-sample-buildLivePipeline -private static LivePipeline buildLivePipeline() { - ParameterDefinition hubParam = new ParameterDefinition("hubSinkOutputName") - .setValue("testHubOutput"); - ParameterDefinition userParam = new ParameterDefinition("rtspUserName") - .setValue("testuser"); - ParameterDefinition urlParam = new ParameterDefinition("rtspUrl") - .setValue("rtsp://sample-url-from-camera"); - ParameterDefinition passParam = new ParameterDefinition("rtspPassword") - .setValue("testpass"); - - LivePipelineProperties livePipelineProps = new LivePipelineProperties() - .setParameters(Arrays.asList(urlParam, userParam, passParam, hubParam)) - .setTopologyName(TOPOLOGY_NAME); - - return new LivePipeline(LIVE_PIPELINE_NAME) - .setProperties(livePipelineProps); -} -``` - -### Invoking a direct method - -```java readme-sample-invokeDirectMethodHelper -private static MethodResult invokeDirectMethodHelper(DeviceMethod client, String methodName, String payload) throws IOException, IotHubException { - MethodResult result = null; - try { - result = client.invoke(iothubDeviceid, iothubModuleid, methodName, null, null, payload); - } catch (IotHubException e) { - System.out.println("An error has occurred."); - System.out.println(e.toString()); - } - - return result; -} -``` - -```java readme-sample-setPipelineTopologyRequest -PipelineTopologySetRequest setPipelineTopologyRequest = new PipelineTopologySetRequest(pipelineTopology); -MethodResult setPipelineResult = invokeDirectMethodHelper(dClient, setPipelineTopologyRequest.getMethodName(), setPipelineTopologyRequest.getPayloadAsJson()); -System.out.println(setPipelineResult.getPayload()); -``` - -## Troubleshooting - -When sending a method request using the IoT Hub's `invoke` remember to not type in the method request name directly. Instead use `MethodRequestName.getMethodName()` - - -## Next steps - -- [Samples][samples] -- [Azure IoT Device SDK][iot-device-sdk] -- [Azure IoTHub Service SDK][iot-hub-sdk] - -## Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit https://cla.microsoft.com. - -If you encounter any issues, please open an issue on our [Github][github-page-issues]. - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information, -see the Code of Conduct FAQ or contact opencode@microsoft.com with any -additional questions or comments. - - - -[azure_cli]: https://learn.microsoft.com/cli/azure -[azure_sub]: https://azure.microsoft.com/free/ -[cla]: https://cla.microsoft.com -[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ -[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ -[coc_contact]: mailto:opencode@microsoft.com -[package]: https://aka.ms/ava/sdk/client/java -[samples]: https://aka.ms/video-analyzer-sample -[source]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/videoanalyzer -[doc_direct_methods]: https://learn.microsoft.com/previous-versions/azure/azure-video-analyzer/video-analyzer-docs/articles/azure-video-analyzer/video-analyzer-docs/edge/direct-methods -[doc_pipelines]: https://learn.microsoft.com/previous-versions/azure/azure-video-analyzer/video-analyzer-docs/articles/azure-video-analyzer/video-analyzer-docs/pipeline -[doc_product]: https://learn.microsoft.com/azure/azure-video-analyzer/video-analyzer-docs/ -[iot-device-sdk]: https://central.sonatype.com/artifact/com.microsoft.azure.sdk.iot/iot-service-client -[iot-hub-sdk]: https://github.com/Azure/azure-iot-sdk-java -[github-page-issues]: https://github.com/Azure/azure-sdk-for-java/issues -[applied-ai-service]: https://azure.microsoft.com/product-categories/applied-ai-services/#services -[machine-learning]: https://azure.microsoft.com/services/machine-learning - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fvideoanalyzer%2Fazure-media-videoanalyzer-edge%2FREADME.png) diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/checkstyle-suppressions.xml b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/checkstyle-suppressions.xml deleted file mode 100644 index 4e18c6ea8bca..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/checkstyle-suppressions.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/pom.xml b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/pom.xml deleted file mode 100644 index fc257e594d2c..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ - - 4.0.0 - - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - - - com.azure - azure-media-videoanalyzer-edge - 1.0.0-beta.7 - - Azure Video Analyzer Edge client library for Java - Azure Video Analyzer provides a platform to build intelligent video applications that span the edge and the cloud. The platform offers the capability to capture, record, and analyze live videos along with publishing the results, video, and video analytics, to Azure services in the cloud or the edge. It is designed to be an extensible platform, enabling you to connect different video analysis edge modules such as Cognitive services containers, custom edge modules built by you with open-source machine learning models or custom models trained with your own data. You can then use them to analyze live video without worrying about the complexity of building and running a live video pipeline. Use the client library for Video Analyzer Edge to simplify interactions with the Microsoft Azure IoT SDKs (https://github.com/azure/azure-iot-sdks) and programmatically construct pipeline topologies and live pipelines. - - - src/main/java - checkstyle-suppressions.xml - false - spotbugs-exclude.xml - - - - - azure-java-build-docs - ${site.url}/site/${project.artifactId} - - - - - https://github.com/Azure/azure-sdk-for-java - - - - - com.azure - azure-json - 1.3.0 - - - com.azure - azure-core - 1.54.1 - - - org.junit.jupiter - junit-jupiter-api - 5.11.2 - test - - - org.junit.jupiter - junit-jupiter-engine - 5.11.2 - test - - - org.junit.jupiter - junit-jupiter-params - 5.11.2 - test - - - com.azure - azure-core-serializer-json-jackson - 1.5.4 - test - - - com.microsoft.azure.sdk.iot - iot-service-client - 1.30.0 - test - - - - - - - org.jacoco - jacoco-maven-plugin - 0.8.12 - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.5.0 - - - - - com.microsoft.azure.sdk.iot:iot-service-client:[1.30.0] - - - - - - - - diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/spotbugs-exclude.xml b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/spotbugs-exclude.xml deleted file mode 100644 index 22d72399a229..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/spotbugs-exclude.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/AssetSink.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/AssetSink.java deleted file mode 100644 index afc193b6f664..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/AssetSink.java +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Enables a pipeline topology to record media to an Azure Media Services asset for subsequent playback. - */ -@Fluent -public final class AssetSink extends SinkNodeBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.AssetSink"; - - /* - * An Azure Storage SAS Url which points to container, such as the one created for an Azure Media Services asset. - */ - private final String assetContainerSasUrl; - - /* - * When writing media to an asset, wait until at least this duration of media has been accumulated on the Edge. - * Expressed in increments of 30 seconds, with a minimum of 30 seconds and a recommended maximum of 5 minutes. - */ - private String segmentLength; - - /* - * Path to a local file system directory for temporary caching of media before writing to an Asset. Used when the - * Edge device is temporarily disconnected from Azure. - */ - private final String localMediaCachePath; - - /* - * Maximum amount of disk space that can be used for temporary caching of media. - */ - private final String localMediaCacheMaximumSizeMiB; - - /** - * Creates an instance of AssetSink class. - * - * @param name the name value to set. - * @param inputs the inputs value to set. - * @param assetContainerSasUrl the assetContainerSasUrl value to set. - * @param localMediaCachePath the localMediaCachePath value to set. - * @param localMediaCacheMaximumSizeMiB the localMediaCacheMaximumSizeMiB value to set. - */ - public AssetSink(String name, List inputs, String assetContainerSasUrl, String localMediaCachePath, - String localMediaCacheMaximumSizeMiB) { - super(name, inputs); - this.assetContainerSasUrl = assetContainerSasUrl; - this.localMediaCachePath = localMediaCachePath; - this.localMediaCacheMaximumSizeMiB = localMediaCacheMaximumSizeMiB; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the assetContainerSasUrl property: An Azure Storage SAS Url which points to container, such as the one - * created for an Azure Media Services asset. - * - * @return the assetContainerSasUrl value. - */ - public String getAssetContainerSasUrl() { - return this.assetContainerSasUrl; - } - - /** - * Get the segmentLength property: When writing media to an asset, wait until at least this duration of media has - * been accumulated on the Edge. Expressed in increments of 30 seconds, with a minimum of 30 seconds and a - * recommended maximum of 5 minutes. - * - * @return the segmentLength value. - */ - public String getSegmentLength() { - return this.segmentLength; - } - - /** - * Set the segmentLength property: When writing media to an asset, wait until at least this duration of media has - * been accumulated on the Edge. Expressed in increments of 30 seconds, with a minimum of 30 seconds and a - * recommended maximum of 5 minutes. - * - * @param segmentLength the segmentLength value to set. - * @return the AssetSink object itself. - */ - public AssetSink setSegmentLength(String segmentLength) { - this.segmentLength = segmentLength; - return this; - } - - /** - * Get the localMediaCachePath property: Path to a local file system directory for temporary caching of media before - * writing to an Asset. Used when the Edge device is temporarily disconnected from Azure. - * - * @return the localMediaCachePath value. - */ - public String getLocalMediaCachePath() { - return this.localMediaCachePath; - } - - /** - * Get the localMediaCacheMaximumSizeMiB property: Maximum amount of disk space that can be used for temporary - * caching of media. - * - * @return the localMediaCacheMaximumSizeMiB value. - */ - public String getLocalMediaCacheMaximumSizeMiB() { - return this.localMediaCacheMaximumSizeMiB; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeArrayField("inputs", getInputs(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("assetContainerSasUrl", this.assetContainerSasUrl); - jsonWriter.writeStringField("localMediaCachePath", this.localMediaCachePath); - jsonWriter.writeStringField("localMediaCacheMaximumSizeMiB", this.localMediaCacheMaximumSizeMiB); - jsonWriter.writeStringField("@type", this.type); - jsonWriter.writeStringField("segmentLength", this.segmentLength); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AssetSink from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AssetSink if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AssetSink. - */ - public static AssetSink fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean inputsFound = false; - List inputs = null; - boolean assetContainerSasUrlFound = false; - String assetContainerSasUrl = null; - boolean localMediaCachePathFound = false; - String localMediaCachePath = null; - boolean localMediaCacheMaximumSizeMiBFound = false; - String localMediaCacheMaximumSizeMiB = null; - String type = "#Microsoft.VideoAnalyzer.AssetSink"; - String segmentLength = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("inputs".equals(fieldName)) { - inputs = reader.readArray(reader1 -> NodeInput.fromJson(reader1)); - inputsFound = true; - } else if ("assetContainerSasUrl".equals(fieldName)) { - assetContainerSasUrl = reader.getString(); - assetContainerSasUrlFound = true; - } else if ("localMediaCachePath".equals(fieldName)) { - localMediaCachePath = reader.getString(); - localMediaCachePathFound = true; - } else if ("localMediaCacheMaximumSizeMiB".equals(fieldName)) { - localMediaCacheMaximumSizeMiB = reader.getString(); - localMediaCacheMaximumSizeMiBFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else if ("segmentLength".equals(fieldName)) { - segmentLength = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound - && inputsFound - && assetContainerSasUrlFound - && localMediaCachePathFound - && localMediaCacheMaximumSizeMiBFound) { - AssetSink deserializedAssetSink = new AssetSink(name, inputs, assetContainerSasUrl, localMediaCachePath, - localMediaCacheMaximumSizeMiB); - deserializedAssetSink.type = type; - deserializedAssetSink.segmentLength = segmentLength; - - return deserializedAssetSink; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!inputsFound) { - missingProperties.add("inputs"); - } - if (!assetContainerSasUrlFound) { - missingProperties.add("assetContainerSasUrl"); - } - if (!localMediaCachePathFound) { - missingProperties.add("localMediaCachePath"); - } - if (!localMediaCacheMaximumSizeMiBFound) { - missingProperties.add("localMediaCacheMaximumSizeMiB"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/CertificateSource.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/CertificateSource.java deleted file mode 100644 index 4e02c99f65ec..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/CertificateSource.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base class for certificate sources. - */ -@Immutable -public class CertificateSource implements JsonSerializable { - /* - * Type discriminator for the derived types. - */ - private String type = "CertificateSource"; - - /** - * Creates an instance of CertificateSource class. - */ - public CertificateSource() { - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - public String getType() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CertificateSource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CertificateSource if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the CertificateSource. - */ - public static CertificateSource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("@type".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("#Microsoft.VideoAnalyzer.PemCertificateList".equals(discriminatorValue)) { - return PemCertificateList.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static CertificateSource fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CertificateSource deserializedCertificateSource = new CertificateSource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("@type".equals(fieldName)) { - deserializedCertificateSource.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCertificateSource; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/CognitiveServicesVisionProcessor.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/CognitiveServicesVisionProcessor.java deleted file mode 100644 index e0080c12b168..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/CognitiveServicesVisionProcessor.java +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * A processor that allows the pipeline topology to send video frames to a Cognitive Services Vision extension. - * Inference results are relayed to downstream nodes. - */ -@Fluent -public final class CognitiveServicesVisionProcessor extends ProcessorNodeBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.CognitiveServicesVisionProcessor"; - - /* - * Endpoint to which this processor should connect. - */ - private final EndpointBase endpoint; - - /* - * Describes the parameters of the image that is sent as input to the endpoint. - */ - private ImageProperties image; - - /* - * Describes the sampling options to be applied when forwarding samples to the extension. - */ - private SamplingOptions samplingOptions; - - /* - * Describes the Spatial Analysis operation to be used in the Cognitive Services Vision processor. - */ - private final SpatialAnalysisOperationBase operation; - - /** - * Creates an instance of CognitiveServicesVisionProcessor class. - * - * @param name the name value to set. - * @param inputs the inputs value to set. - * @param endpoint the endpoint value to set. - * @param operation the operation value to set. - */ - public CognitiveServicesVisionProcessor(String name, List inputs, EndpointBase endpoint, - SpatialAnalysisOperationBase operation) { - super(name, inputs); - this.endpoint = endpoint; - this.operation = operation; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the endpoint property: Endpoint to which this processor should connect. - * - * @return the endpoint value. - */ - public EndpointBase getEndpoint() { - return this.endpoint; - } - - /** - * Get the image property: Describes the parameters of the image that is sent as input to the endpoint. - * - * @return the image value. - */ - public ImageProperties getImage() { - return this.image; - } - - /** - * Set the image property: Describes the parameters of the image that is sent as input to the endpoint. - * - * @param image the image value to set. - * @return the CognitiveServicesVisionProcessor object itself. - */ - public CognitiveServicesVisionProcessor setImage(ImageProperties image) { - this.image = image; - return this; - } - - /** - * Get the samplingOptions property: Describes the sampling options to be applied when forwarding samples to the - * extension. - * - * @return the samplingOptions value. - */ - public SamplingOptions getSamplingOptions() { - return this.samplingOptions; - } - - /** - * Set the samplingOptions property: Describes the sampling options to be applied when forwarding samples to the - * extension. - * - * @param samplingOptions the samplingOptions value to set. - * @return the CognitiveServicesVisionProcessor object itself. - */ - public CognitiveServicesVisionProcessor setSamplingOptions(SamplingOptions samplingOptions) { - this.samplingOptions = samplingOptions; - return this; - } - - /** - * Get the operation property: Describes the Spatial Analysis operation to be used in the Cognitive Services Vision - * processor. - * - * @return the operation value. - */ - public SpatialAnalysisOperationBase getOperation() { - return this.operation; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeArrayField("inputs", getInputs(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("endpoint", this.endpoint); - jsonWriter.writeJsonField("operation", this.operation); - jsonWriter.writeStringField("@type", this.type); - jsonWriter.writeJsonField("image", this.image); - jsonWriter.writeJsonField("samplingOptions", this.samplingOptions); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CognitiveServicesVisionProcessor from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CognitiveServicesVisionProcessor if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CognitiveServicesVisionProcessor. - */ - public static CognitiveServicesVisionProcessor fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean inputsFound = false; - List inputs = null; - boolean endpointFound = false; - EndpointBase endpoint = null; - boolean operationFound = false; - SpatialAnalysisOperationBase operation = null; - String type = "#Microsoft.VideoAnalyzer.CognitiveServicesVisionProcessor"; - ImageProperties image = null; - SamplingOptions samplingOptions = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("inputs".equals(fieldName)) { - inputs = reader.readArray(reader1 -> NodeInput.fromJson(reader1)); - inputsFound = true; - } else if ("endpoint".equals(fieldName)) { - endpoint = EndpointBase.fromJson(reader); - endpointFound = true; - } else if ("operation".equals(fieldName)) { - operation = SpatialAnalysisOperationBase.fromJson(reader); - operationFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else if ("image".equals(fieldName)) { - image = ImageProperties.fromJson(reader); - } else if ("samplingOptions".equals(fieldName)) { - samplingOptions = SamplingOptions.fromJson(reader); - } else { - reader.skipChildren(); - } - } - if (nameFound && inputsFound && endpointFound && operationFound) { - CognitiveServicesVisionProcessor deserializedCognitiveServicesVisionProcessor - = new CognitiveServicesVisionProcessor(name, inputs, endpoint, operation); - deserializedCognitiveServicesVisionProcessor.type = type; - deserializedCognitiveServicesVisionProcessor.image = image; - deserializedCognitiveServicesVisionProcessor.samplingOptions = samplingOptions; - - return deserializedCognitiveServicesVisionProcessor; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!inputsFound) { - missingProperties.add("inputs"); - } - if (!endpointFound) { - missingProperties.add("endpoint"); - } - if (!operationFound) { - missingProperties.add("operation"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/CredentialsBase.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/CredentialsBase.java deleted file mode 100644 index f423b4ec7d07..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/CredentialsBase.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base class for credential objects. - */ -@Immutable -public class CredentialsBase implements JsonSerializable { - /* - * Type discriminator for the derived types. - */ - private String type = "CredentialsBase"; - - /** - * Creates an instance of CredentialsBase class. - */ - public CredentialsBase() { - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - public String getType() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CredentialsBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CredentialsBase if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the CredentialsBase. - */ - public static CredentialsBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("@type".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("#Microsoft.VideoAnalyzer.UsernamePasswordCredentials".equals(discriminatorValue)) { - return UsernamePasswordCredentials.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.HttpHeaderCredentials".equals(discriminatorValue)) { - return HttpHeaderCredentials.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.SymmetricKeyCredentials".equals(discriminatorValue)) { - return SymmetricKeyCredentials.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static CredentialsBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CredentialsBase deserializedCredentialsBase = new CredentialsBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("@type".equals(fieldName)) { - deserializedCredentialsBase.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCredentialsBase; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/DiscoveredOnvifDevice.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/DiscoveredOnvifDevice.java deleted file mode 100644 index fe13056306f7..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/DiscoveredOnvifDevice.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The discovered properties of the ONVIF device that are returned during the discovery. - */ -@Fluent -public final class DiscoveredOnvifDevice implements JsonSerializable { - /* - * The unique identifier of the ONVIF device that was discovered in the same subnet as the IoT Edge device. - */ - private String serviceIdentifier; - - /* - * The IP address of the ONVIF device that was discovered in the same subnet as the IoT Edge device. - */ - private String remoteIPAddress; - - /* - * An array of hostnames for the ONVIF discovered devices that are in the same subnet as the IoT Edge device. - */ - private List scopes; - - /* - * An array of media profile endpoints that the ONVIF discovered device supports. - */ - private List endpoints; - - /** - * Creates an instance of DiscoveredOnvifDevice class. - */ - public DiscoveredOnvifDevice() { - } - - /** - * Get the serviceIdentifier property: The unique identifier of the ONVIF device that was discovered in the same - * subnet as the IoT Edge device. - * - * @return the serviceIdentifier value. - */ - public String getServiceIdentifier() { - return this.serviceIdentifier; - } - - /** - * Set the serviceIdentifier property: The unique identifier of the ONVIF device that was discovered in the same - * subnet as the IoT Edge device. - * - * @param serviceIdentifier the serviceIdentifier value to set. - * @return the DiscoveredOnvifDevice object itself. - */ - public DiscoveredOnvifDevice setServiceIdentifier(String serviceIdentifier) { - this.serviceIdentifier = serviceIdentifier; - return this; - } - - /** - * Get the remoteIPAddress property: The IP address of the ONVIF device that was discovered in the same subnet as - * the IoT Edge device. - * - * @return the remoteIPAddress value. - */ - public String getRemoteIPAddress() { - return this.remoteIPAddress; - } - - /** - * Set the remoteIPAddress property: The IP address of the ONVIF device that was discovered in the same subnet as - * the IoT Edge device. - * - * @param remoteIPAddress the remoteIPAddress value to set. - * @return the DiscoveredOnvifDevice object itself. - */ - public DiscoveredOnvifDevice setRemoteIPAddress(String remoteIPAddress) { - this.remoteIPAddress = remoteIPAddress; - return this; - } - - /** - * Get the scopes property: An array of hostnames for the ONVIF discovered devices that are in the same subnet as - * the IoT Edge device. - * - * @return the scopes value. - */ - public List getScopes() { - return this.scopes; - } - - /** - * Set the scopes property: An array of hostnames for the ONVIF discovered devices that are in the same subnet as - * the IoT Edge device. - * - * @param scopes the scopes value to set. - * @return the DiscoveredOnvifDevice object itself. - */ - public DiscoveredOnvifDevice setScopes(List scopes) { - this.scopes = scopes; - return this; - } - - /** - * Get the endpoints property: An array of media profile endpoints that the ONVIF discovered device supports. - * - * @return the endpoints value. - */ - public List getEndpoints() { - return this.endpoints; - } - - /** - * Set the endpoints property: An array of media profile endpoints that the ONVIF discovered device supports. - * - * @param endpoints the endpoints value to set. - * @return the DiscoveredOnvifDevice object itself. - */ - public DiscoveredOnvifDevice setEndpoints(List endpoints) { - this.endpoints = endpoints; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("serviceIdentifier", this.serviceIdentifier); - jsonWriter.writeStringField("remoteIPAddress", this.remoteIPAddress); - jsonWriter.writeArrayField("scopes", this.scopes, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("endpoints", this.endpoints, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiscoveredOnvifDevice from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiscoveredOnvifDevice if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiscoveredOnvifDevice. - */ - public static DiscoveredOnvifDevice fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiscoveredOnvifDevice deserializedDiscoveredOnvifDevice = new DiscoveredOnvifDevice(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serviceIdentifier".equals(fieldName)) { - deserializedDiscoveredOnvifDevice.serviceIdentifier = reader.getString(); - } else if ("remoteIPAddress".equals(fieldName)) { - deserializedDiscoveredOnvifDevice.remoteIPAddress = reader.getString(); - } else if ("scopes".equals(fieldName)) { - List scopes = reader.readArray(reader1 -> reader1.getString()); - deserializedDiscoveredOnvifDevice.scopes = scopes; - } else if ("endpoints".equals(fieldName)) { - List endpoints = reader.readArray(reader1 -> reader1.getString()); - deserializedDiscoveredOnvifDevice.endpoints = endpoints; - } else { - reader.skipChildren(); - } - } - - return deserializedDiscoveredOnvifDevice; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/DiscoveredOnvifDeviceCollection.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/DiscoveredOnvifDeviceCollection.java deleted file mode 100644 index 9e1e09322ed1..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/DiscoveredOnvifDeviceCollection.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A list of ONVIF devices that were discovered in the same subnet as the IoT Edge device. - */ -@Fluent -public final class DiscoveredOnvifDeviceCollection implements JsonSerializable { - /* - * An array of ONVIF devices that have been discovered in the same subnet as the IoT Edge device. - */ - private List value; - - /** - * Creates an instance of DiscoveredOnvifDeviceCollection class. - */ - public DiscoveredOnvifDeviceCollection() { - } - - /** - * Get the value property: An array of ONVIF devices that have been discovered in the same subnet as the IoT Edge - * device. - * - * @return the value value. - */ - public List getValue() { - return this.value; - } - - /** - * Set the value property: An array of ONVIF devices that have been discovered in the same subnet as the IoT Edge - * device. - * - * @param value the value value to set. - * @return the DiscoveredOnvifDeviceCollection object itself. - */ - public DiscoveredOnvifDeviceCollection setValue(List value) { - this.value = value; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiscoveredOnvifDeviceCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiscoveredOnvifDeviceCollection if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiscoveredOnvifDeviceCollection. - */ - public static DiscoveredOnvifDeviceCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiscoveredOnvifDeviceCollection deserializedDiscoveredOnvifDeviceCollection - = new DiscoveredOnvifDeviceCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> DiscoveredOnvifDevice.fromJson(reader1)); - deserializedDiscoveredOnvifDeviceCollection.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedDiscoveredOnvifDeviceCollection; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/EndpointBase.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/EndpointBase.java deleted file mode 100644 index e8b963db5ce1..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/EndpointBase.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base class for endpoints. - */ -@Fluent -public class EndpointBase implements JsonSerializable { - /* - * Type discriminator for the derived types. - */ - private String type = "EndpointBase"; - - /* - * Credentials to be presented to the endpoint. - */ - private CredentialsBase credentials; - - /* - * The endpoint URL for Video Analyzer to connect to. - */ - private final String url; - - /** - * Creates an instance of EndpointBase class. - * - * @param url the url value to set. - */ - public EndpointBase(String url) { - this.url = url; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - public String getType() { - return this.type; - } - - /** - * Get the credentials property: Credentials to be presented to the endpoint. - * - * @return the credentials value. - */ - public CredentialsBase getCredentials() { - return this.credentials; - } - - /** - * Set the credentials property: Credentials to be presented to the endpoint. - * - * @param credentials the credentials value to set. - * @return the EndpointBase object itself. - */ - public EndpointBase setCredentials(CredentialsBase credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the url property: The endpoint URL for Video Analyzer to connect to. - * - * @return the url value. - */ - public String getUrl() { - return this.url; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("url", this.url); - jsonWriter.writeStringField("@type", this.type); - jsonWriter.writeJsonField("credentials", this.credentials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EndpointBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EndpointBase if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EndpointBase. - */ - public static EndpointBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("@type".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("#Microsoft.VideoAnalyzer.UnsecuredEndpoint".equals(discriminatorValue)) { - return UnsecuredEndpoint.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.TlsEndpoint".equals(discriminatorValue)) { - return TlsEndpoint.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static EndpointBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean urlFound = false; - String url = null; - String type = null; - CredentialsBase credentials = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("url".equals(fieldName)) { - url = reader.getString(); - urlFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else if ("credentials".equals(fieldName)) { - credentials = CredentialsBase.fromJson(reader); - } else { - reader.skipChildren(); - } - } - if (urlFound) { - EndpointBase deserializedEndpointBase = new EndpointBase(url); - deserializedEndpointBase.type = type; - deserializedEndpointBase.credentials = credentials; - - return deserializedEndpointBase; - } - throw new IllegalStateException("Missing required property: url"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ExtensionProcessorBase.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ExtensionProcessorBase.java deleted file mode 100644 index acd8fb35f1c5..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ExtensionProcessorBase.java +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Base class for pipeline extension processors. Pipeline extensions allow for custom media analysis and processing to - * be plugged into the Video Analyzer pipeline. - */ -@Fluent -public class ExtensionProcessorBase extends ProcessorNodeBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.ExtensionProcessorBase"; - - /* - * Endpoint details of the pipeline extension plugin. - */ - private final EndpointBase endpoint; - - /* - * Image transformations and formatting options to be applied to the video frame(s) prior submission to the pipeline - * extension plugin. - */ - private final ImageProperties image; - - /* - * Media sampling parameters that define how often media is submitted to the extension plugin. - */ - private SamplingOptions samplingOptions; - - /** - * Creates an instance of ExtensionProcessorBase class. - * - * @param name the name value to set. - * @param inputs the inputs value to set. - * @param endpoint the endpoint value to set. - * @param image the image value to set. - */ - public ExtensionProcessorBase(String name, List inputs, EndpointBase endpoint, ImageProperties image) { - super(name, inputs); - this.endpoint = endpoint; - this.image = image; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the endpoint property: Endpoint details of the pipeline extension plugin. - * - * @return the endpoint value. - */ - public EndpointBase getEndpoint() { - return this.endpoint; - } - - /** - * Get the image property: Image transformations and formatting options to be applied to the video frame(s) prior - * submission to the pipeline extension plugin. - * - * @return the image value. - */ - public ImageProperties getImage() { - return this.image; - } - - /** - * Get the samplingOptions property: Media sampling parameters that define how often media is submitted to the - * extension plugin. - * - * @return the samplingOptions value. - */ - public SamplingOptions getSamplingOptions() { - return this.samplingOptions; - } - - /** - * Set the samplingOptions property: Media sampling parameters that define how often media is submitted to the - * extension plugin. - * - * @param samplingOptions the samplingOptions value to set. - * @return the ExtensionProcessorBase object itself. - */ - public ExtensionProcessorBase setSamplingOptions(SamplingOptions samplingOptions) { - this.samplingOptions = samplingOptions; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeArrayField("inputs", getInputs(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("endpoint", this.endpoint); - jsonWriter.writeJsonField("image", this.image); - jsonWriter.writeStringField("@type", this.type); - jsonWriter.writeJsonField("samplingOptions", this.samplingOptions); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExtensionProcessorBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExtensionProcessorBase if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ExtensionProcessorBase. - */ - public static ExtensionProcessorBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("@type".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("#Microsoft.VideoAnalyzer.GrpcExtension".equals(discriminatorValue)) { - return GrpcExtension.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.HttpExtension".equals(discriminatorValue)) { - return HttpExtension.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ExtensionProcessorBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean inputsFound = false; - List inputs = null; - boolean endpointFound = false; - EndpointBase endpoint = null; - boolean imageFound = false; - ImageProperties image = null; - String type = "#Microsoft.VideoAnalyzer.ExtensionProcessorBase"; - SamplingOptions samplingOptions = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("inputs".equals(fieldName)) { - inputs = reader.readArray(reader1 -> NodeInput.fromJson(reader1)); - inputsFound = true; - } else if ("endpoint".equals(fieldName)) { - endpoint = EndpointBase.fromJson(reader); - endpointFound = true; - } else if ("image".equals(fieldName)) { - image = ImageProperties.fromJson(reader); - imageFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else if ("samplingOptions".equals(fieldName)) { - samplingOptions = SamplingOptions.fromJson(reader); - } else { - reader.skipChildren(); - } - } - if (nameFound && inputsFound && endpointFound && imageFound) { - ExtensionProcessorBase deserializedExtensionProcessorBase - = new ExtensionProcessorBase(name, inputs, endpoint, image); - deserializedExtensionProcessorBase.type = type; - deserializedExtensionProcessorBase.samplingOptions = samplingOptions; - - return deserializedExtensionProcessorBase; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!inputsFound) { - missingProperties.add("inputs"); - } - if (!endpointFound) { - missingProperties.add("endpoint"); - } - if (!imageFound) { - missingProperties.add("image"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/FileSink.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/FileSink.java deleted file mode 100644 index d1bf24eb8f58..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/FileSink.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * File sink allows for video and audio content to be recorded on the file system on the edge device. - */ -@Immutable -public final class FileSink extends SinkNodeBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.FileSink"; - - /* - * Absolute directory path where media files will be stored. - */ - private final String baseDirectoryPath; - - /* - * File name pattern for creating new files when performing event based recording. The pattern must include at least - * one system variable. - */ - private final String fileNamePattern; - - /* - * Maximum amount of disk space that can be used for storing files from this sink. Once this limit is reached, the - * oldest files from this sink will be automatically deleted. - */ - private final String maximumSizeMiB; - - /** - * Creates an instance of FileSink class. - * - * @param name the name value to set. - * @param inputs the inputs value to set. - * @param baseDirectoryPath the baseDirectoryPath value to set. - * @param fileNamePattern the fileNamePattern value to set. - * @param maximumSizeMiB the maximumSizeMiB value to set. - */ - public FileSink(String name, List inputs, String baseDirectoryPath, String fileNamePattern, - String maximumSizeMiB) { - super(name, inputs); - this.baseDirectoryPath = baseDirectoryPath; - this.fileNamePattern = fileNamePattern; - this.maximumSizeMiB = maximumSizeMiB; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the baseDirectoryPath property: Absolute directory path where media files will be stored. - * - * @return the baseDirectoryPath value. - */ - public String getBaseDirectoryPath() { - return this.baseDirectoryPath; - } - - /** - * Get the fileNamePattern property: File name pattern for creating new files when performing event based recording. - * The pattern must include at least one system variable. - * - * @return the fileNamePattern value. - */ - public String getFileNamePattern() { - return this.fileNamePattern; - } - - /** - * Get the maximumSizeMiB property: Maximum amount of disk space that can be used for storing files from this sink. - * Once this limit is reached, the oldest files from this sink will be automatically deleted. - * - * @return the maximumSizeMiB value. - */ - public String getMaximumSizeMiB() { - return this.maximumSizeMiB; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeArrayField("inputs", getInputs(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("baseDirectoryPath", this.baseDirectoryPath); - jsonWriter.writeStringField("fileNamePattern", this.fileNamePattern); - jsonWriter.writeStringField("maximumSizeMiB", this.maximumSizeMiB); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FileSink from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FileSink if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the FileSink. - */ - public static FileSink fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean inputsFound = false; - List inputs = null; - boolean baseDirectoryPathFound = false; - String baseDirectoryPath = null; - boolean fileNamePatternFound = false; - String fileNamePattern = null; - boolean maximumSizeMiBFound = false; - String maximumSizeMiB = null; - String type = "#Microsoft.VideoAnalyzer.FileSink"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("inputs".equals(fieldName)) { - inputs = reader.readArray(reader1 -> NodeInput.fromJson(reader1)); - inputsFound = true; - } else if ("baseDirectoryPath".equals(fieldName)) { - baseDirectoryPath = reader.getString(); - baseDirectoryPathFound = true; - } else if ("fileNamePattern".equals(fieldName)) { - fileNamePattern = reader.getString(); - fileNamePatternFound = true; - } else if ("maximumSizeMiB".equals(fieldName)) { - maximumSizeMiB = reader.getString(); - maximumSizeMiBFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound && inputsFound && baseDirectoryPathFound && fileNamePatternFound && maximumSizeMiBFound) { - FileSink deserializedFileSink - = new FileSink(name, inputs, baseDirectoryPath, fileNamePattern, maximumSizeMiB); - deserializedFileSink.type = type; - - return deserializedFileSink; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!inputsFound) { - missingProperties.add("inputs"); - } - if (!baseDirectoryPathFound) { - missingProperties.add("baseDirectoryPath"); - } - if (!fileNamePatternFound) { - missingProperties.add("fileNamePattern"); - } - if (!maximumSizeMiBFound) { - missingProperties.add("maximumSizeMiB"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/GrpcExtension.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/GrpcExtension.java deleted file mode 100644 index d13c2572c2f6..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/GrpcExtension.java +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * GRPC extension processor allows pipeline extension plugins to be connected to the pipeline through over a gRPC - * channel. Extension plugins must act as an gRPC server. Please see https://aka.ms/ava-extension-grpc for details. - */ -@Fluent -public final class GrpcExtension extends ExtensionProcessorBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.GrpcExtension"; - - /* - * Specifies how media is transferred to the extension plugin. - */ - private final GrpcExtensionDataTransfer dataTransfer; - - /* - * An optional configuration string that is sent to the extension plugin. The configuration string is specific to - * each custom extension and it not understood neither validated by Video Analyzer. Please see - * https://aka.ms/ava-extension-grpc for details. - */ - private String extensionConfiguration; - - /** - * Creates an instance of GrpcExtension class. - * - * @param name the name value to set. - * @param inputs the inputs value to set. - * @param endpoint the endpoint value to set. - * @param image the image value to set. - * @param dataTransfer the dataTransfer value to set. - */ - public GrpcExtension(String name, List inputs, EndpointBase endpoint, ImageProperties image, - GrpcExtensionDataTransfer dataTransfer) { - super(name, inputs, endpoint, image); - this.dataTransfer = dataTransfer; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the dataTransfer property: Specifies how media is transferred to the extension plugin. - * - * @return the dataTransfer value. - */ - public GrpcExtensionDataTransfer getDataTransfer() { - return this.dataTransfer; - } - - /** - * Get the extensionConfiguration property: An optional configuration string that is sent to the extension plugin. - * The configuration string is specific to each custom extension and it not understood neither validated by Video - * Analyzer. Please see https://aka.ms/ava-extension-grpc for details. - * - * @return the extensionConfiguration value. - */ - public String getExtensionConfiguration() { - return this.extensionConfiguration; - } - - /** - * Set the extensionConfiguration property: An optional configuration string that is sent to the extension plugin. - * The configuration string is specific to each custom extension and it not understood neither validated by Video - * Analyzer. Please see https://aka.ms/ava-extension-grpc for details. - * - * @param extensionConfiguration the extensionConfiguration value to set. - * @return the GrpcExtension object itself. - */ - public GrpcExtension setExtensionConfiguration(String extensionConfiguration) { - this.extensionConfiguration = extensionConfiguration; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public GrpcExtension setSamplingOptions(SamplingOptions samplingOptions) { - super.setSamplingOptions(samplingOptions); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeArrayField("inputs", getInputs(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("endpoint", getEndpoint()); - jsonWriter.writeJsonField("image", getImage()); - jsonWriter.writeJsonField("samplingOptions", getSamplingOptions()); - jsonWriter.writeJsonField("dataTransfer", this.dataTransfer); - jsonWriter.writeStringField("@type", this.type); - jsonWriter.writeStringField("extensionConfiguration", this.extensionConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GrpcExtension from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GrpcExtension if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the GrpcExtension. - */ - public static GrpcExtension fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean inputsFound = false; - List inputs = null; - boolean endpointFound = false; - EndpointBase endpoint = null; - boolean imageFound = false; - ImageProperties image = null; - SamplingOptions samplingOptions = null; - boolean dataTransferFound = false; - GrpcExtensionDataTransfer dataTransfer = null; - String type = "#Microsoft.VideoAnalyzer.GrpcExtension"; - String extensionConfiguration = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("inputs".equals(fieldName)) { - inputs = reader.readArray(reader1 -> NodeInput.fromJson(reader1)); - inputsFound = true; - } else if ("endpoint".equals(fieldName)) { - endpoint = EndpointBase.fromJson(reader); - endpointFound = true; - } else if ("image".equals(fieldName)) { - image = ImageProperties.fromJson(reader); - imageFound = true; - } else if ("samplingOptions".equals(fieldName)) { - samplingOptions = SamplingOptions.fromJson(reader); - } else if ("dataTransfer".equals(fieldName)) { - dataTransfer = GrpcExtensionDataTransfer.fromJson(reader); - dataTransferFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else if ("extensionConfiguration".equals(fieldName)) { - extensionConfiguration = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound && inputsFound && endpointFound && imageFound && dataTransferFound) { - GrpcExtension deserializedGrpcExtension - = new GrpcExtension(name, inputs, endpoint, image, dataTransfer); - deserializedGrpcExtension.setSamplingOptions(samplingOptions); - deserializedGrpcExtension.type = type; - deserializedGrpcExtension.extensionConfiguration = extensionConfiguration; - - return deserializedGrpcExtension; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!inputsFound) { - missingProperties.add("inputs"); - } - if (!endpointFound) { - missingProperties.add("endpoint"); - } - if (!imageFound) { - missingProperties.add("image"); - } - if (!dataTransferFound) { - missingProperties.add("dataTransfer"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/GrpcExtensionDataTransfer.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/GrpcExtensionDataTransfer.java deleted file mode 100644 index 9b38a5ac9046..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/GrpcExtensionDataTransfer.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes how media is transferred to the extension plugin. - */ -@Fluent -public final class GrpcExtensionDataTransfer implements JsonSerializable { - /* - * The share memory buffer for sample transfers, in mebibytes. It can only be used with the 'SharedMemory' transfer - * mode. - */ - private String sharedMemorySizeMiB; - - /* - * Data transfer mode: embedded or sharedMemory. - */ - private final GrpcExtensionDataTransferMode mode; - - /** - * Creates an instance of GrpcExtensionDataTransfer class. - * - * @param mode the mode value to set. - */ - public GrpcExtensionDataTransfer(GrpcExtensionDataTransferMode mode) { - this.mode = mode; - } - - /** - * Get the sharedMemorySizeMiB property: The share memory buffer for sample transfers, in mebibytes. It can only be - * used with the 'SharedMemory' transfer mode. - * - * @return the sharedMemorySizeMiB value. - */ - public String getSharedMemorySizeMiB() { - return this.sharedMemorySizeMiB; - } - - /** - * Set the sharedMemorySizeMiB property: The share memory buffer for sample transfers, in mebibytes. It can only be - * used with the 'SharedMemory' transfer mode. - * - * @param sharedMemorySizeMiB the sharedMemorySizeMiB value to set. - * @return the GrpcExtensionDataTransfer object itself. - */ - public GrpcExtensionDataTransfer setSharedMemorySizeMiB(String sharedMemorySizeMiB) { - this.sharedMemorySizeMiB = sharedMemorySizeMiB; - return this; - } - - /** - * Get the mode property: Data transfer mode: embedded or sharedMemory. - * - * @return the mode value. - */ - public GrpcExtensionDataTransferMode getMode() { - return this.mode; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeStringField("sharedMemorySizeMiB", this.sharedMemorySizeMiB); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GrpcExtensionDataTransfer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GrpcExtensionDataTransfer if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the GrpcExtensionDataTransfer. - */ - public static GrpcExtensionDataTransfer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean modeFound = false; - GrpcExtensionDataTransferMode mode = null; - String sharedMemorySizeMiB = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - mode = GrpcExtensionDataTransferMode.fromString(reader.getString()); - modeFound = true; - } else if ("sharedMemorySizeMiB".equals(fieldName)) { - sharedMemorySizeMiB = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (modeFound) { - GrpcExtensionDataTransfer deserializedGrpcExtensionDataTransfer = new GrpcExtensionDataTransfer(mode); - deserializedGrpcExtensionDataTransfer.sharedMemorySizeMiB = sharedMemorySizeMiB; - - return deserializedGrpcExtensionDataTransfer; - } - throw new IllegalStateException("Missing required property: mode"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/GrpcExtensionDataTransferMode.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/GrpcExtensionDataTransferMode.java deleted file mode 100644 index 580fcf4de7b2..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/GrpcExtensionDataTransferMode.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Data transfer mode: embedded or sharedMemory. - */ -public final class GrpcExtensionDataTransferMode extends ExpandableStringEnum { - /** - * Media samples are embedded into the gRPC messages. This mode is less efficient but it requires a simpler - * implementations and can be used with plugins which are not on the same node as the Video Analyzer module. - */ - public static final GrpcExtensionDataTransferMode EMBEDDED = fromString("embedded"); - - /** - * Media samples are made available through shared memory. This mode enables efficient data transfers but it - * requires that the extension plugin to be co-located on the same node and sharing the same shared memory space. - */ - public static final GrpcExtensionDataTransferMode SHARED_MEMORY = fromString("sharedMemory"); - - /** - * Creates a new instance of GrpcExtensionDataTransferMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public GrpcExtensionDataTransferMode() { - } - - /** - * Creates or finds a GrpcExtensionDataTransferMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding GrpcExtensionDataTransferMode. - */ - public static GrpcExtensionDataTransferMode fromString(String name) { - return fromString(name, GrpcExtensionDataTransferMode.class); - } - - /** - * Gets known GrpcExtensionDataTransferMode values. - * - * @return known GrpcExtensionDataTransferMode values. - */ - public static Collection values() { - return values(GrpcExtensionDataTransferMode.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/H264Configuration.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/H264Configuration.java deleted file mode 100644 index 9a7c080ba419..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/H264Configuration.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Class representing the H264 Configuration. - */ -@Fluent -public final class H264Configuration implements JsonSerializable { - /* - * Group of Video frames length. - */ - private Float govLength; - - /* - * The H264 Profile - */ - private H264Profile profile; - - /** - * Creates an instance of H264Configuration class. - */ - public H264Configuration() { - } - - /** - * Get the govLength property: Group of Video frames length. - * - * @return the govLength value. - */ - public Float getGovLength() { - return this.govLength; - } - - /** - * Set the govLength property: Group of Video frames length. - * - * @param govLength the govLength value to set. - * @return the H264Configuration object itself. - */ - public H264Configuration setGovLength(Float govLength) { - this.govLength = govLength; - return this; - } - - /** - * Get the profile property: The H264 Profile. - * - * @return the profile value. - */ - public H264Profile getProfile() { - return this.profile; - } - - /** - * Set the profile property: The H264 Profile. - * - * @param profile the profile value to set. - * @return the H264Configuration object itself. - */ - public H264Configuration setProfile(H264Profile profile) { - this.profile = profile; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("govLength", this.govLength); - jsonWriter.writeStringField("profile", this.profile == null ? null : this.profile.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of H264Configuration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of H264Configuration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the H264Configuration. - */ - public static H264Configuration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - H264Configuration deserializedH264Configuration = new H264Configuration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("govLength".equals(fieldName)) { - deserializedH264Configuration.govLength = reader.getNullable(JsonReader::getFloat); - } else if ("profile".equals(fieldName)) { - deserializedH264Configuration.profile = H264Profile.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedH264Configuration; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/H264Profile.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/H264Profile.java deleted file mode 100644 index 5bb8271cd273..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/H264Profile.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The H264 Profile. - */ -public final class H264Profile extends ExpandableStringEnum { - /** - * Static value Baseline for H264Profile. - */ - public static final H264Profile BASELINE = fromString("Baseline"); - - /** - * Static value Main for H264Profile. - */ - public static final H264Profile MAIN = fromString("Main"); - - /** - * Static value Extended for H264Profile. - */ - public static final H264Profile EXTENDED = fromString("Extended"); - - /** - * Static value High for H264Profile. - */ - public static final H264Profile HIGH = fromString("High"); - - /** - * Creates a new instance of H264Profile value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public H264Profile() { - } - - /** - * Creates or finds a H264Profile from its string representation. - * - * @param name a name to look for. - * @return the corresponding H264Profile. - */ - public static H264Profile fromString(String name) { - return fromString(name, H264Profile.class); - } - - /** - * Gets known H264Profile values. - * - * @return known H264Profile values. - */ - public static Collection values() { - return values(H264Profile.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/HttpExtension.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/HttpExtension.java deleted file mode 100644 index 1b3d650d8212..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/HttpExtension.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * HTTP extension processor allows pipeline extension plugins to be connected to the pipeline through over the HTTP - * protocol. Extension plugins must act as an HTTP server. Please see https://aka.ms/ava-extension-http for details. - */ -@Fluent -public final class HttpExtension extends ExtensionProcessorBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.HttpExtension"; - - /** - * Creates an instance of HttpExtension class. - * - * @param name the name value to set. - * @param inputs the inputs value to set. - * @param endpoint the endpoint value to set. - * @param image the image value to set. - */ - public HttpExtension(String name, List inputs, EndpointBase endpoint, ImageProperties image) { - super(name, inputs, endpoint, image); - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public HttpExtension setSamplingOptions(SamplingOptions samplingOptions) { - super.setSamplingOptions(samplingOptions); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeArrayField("inputs", getInputs(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("endpoint", getEndpoint()); - jsonWriter.writeJsonField("image", getImage()); - jsonWriter.writeJsonField("samplingOptions", getSamplingOptions()); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HttpExtension from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HttpExtension if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the HttpExtension. - */ - public static HttpExtension fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean inputsFound = false; - List inputs = null; - boolean endpointFound = false; - EndpointBase endpoint = null; - boolean imageFound = false; - ImageProperties image = null; - SamplingOptions samplingOptions = null; - String type = "#Microsoft.VideoAnalyzer.HttpExtension"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("inputs".equals(fieldName)) { - inputs = reader.readArray(reader1 -> NodeInput.fromJson(reader1)); - inputsFound = true; - } else if ("endpoint".equals(fieldName)) { - endpoint = EndpointBase.fromJson(reader); - endpointFound = true; - } else if ("image".equals(fieldName)) { - image = ImageProperties.fromJson(reader); - imageFound = true; - } else if ("samplingOptions".equals(fieldName)) { - samplingOptions = SamplingOptions.fromJson(reader); - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound && inputsFound && endpointFound && imageFound) { - HttpExtension deserializedHttpExtension = new HttpExtension(name, inputs, endpoint, image); - deserializedHttpExtension.setSamplingOptions(samplingOptions); - deserializedHttpExtension.type = type; - - return deserializedHttpExtension; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!inputsFound) { - missingProperties.add("inputs"); - } - if (!endpointFound) { - missingProperties.add("endpoint"); - } - if (!imageFound) { - missingProperties.add("image"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/HttpHeaderCredentials.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/HttpHeaderCredentials.java deleted file mode 100644 index 97c249cb2ee4..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/HttpHeaderCredentials.java +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * HTTP header credentials. - */ -@Immutable -public final class HttpHeaderCredentials extends CredentialsBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.HttpHeaderCredentials"; - - /* - * HTTP header name. - */ - private final String headerName; - - /* - * HTTP header value. It is recommended that this value is parameterized as a secret string in order to prevent this - * value to be returned as part of the resource on API requests. - */ - private final String headerValue; - - /** - * Creates an instance of HttpHeaderCredentials class. - * - * @param headerName the headerName value to set. - * @param headerValue the headerValue value to set. - */ - public HttpHeaderCredentials(String headerName, String headerValue) { - this.headerName = headerName; - this.headerValue = headerValue; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the headerName property: HTTP header name. - * - * @return the headerName value. - */ - public String getHeaderName() { - return this.headerName; - } - - /** - * Get the headerValue property: HTTP header value. It is recommended that this value is parameterized as a secret - * string in order to prevent this value to be returned as part of the resource on API requests. - * - * @return the headerValue value. - */ - public String getHeaderValue() { - return this.headerValue; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("headerName", this.headerName); - jsonWriter.writeStringField("headerValue", this.headerValue); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HttpHeaderCredentials from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HttpHeaderCredentials if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the HttpHeaderCredentials. - */ - public static HttpHeaderCredentials fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean headerNameFound = false; - String headerName = null; - boolean headerValueFound = false; - String headerValue = null; - String type = "#Microsoft.VideoAnalyzer.HttpHeaderCredentials"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("headerName".equals(fieldName)) { - headerName = reader.getString(); - headerNameFound = true; - } else if ("headerValue".equals(fieldName)) { - headerValue = reader.getString(); - headerValueFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (headerNameFound && headerValueFound) { - HttpHeaderCredentials deserializedHttpHeaderCredentials - = new HttpHeaderCredentials(headerName, headerValue); - deserializedHttpHeaderCredentials.type = type; - - return deserializedHttpHeaderCredentials; - } - List missingProperties = new ArrayList<>(); - if (!headerNameFound) { - missingProperties.add("headerName"); - } - if (!headerValueFound) { - missingProperties.add("headerValue"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatBmp.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatBmp.java deleted file mode 100644 index de97c5a27487..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatBmp.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * BMP image encoding. - */ -@Immutable -public final class ImageFormatBmp extends ImageFormatProperties { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.ImageFormatBmp"; - - /** - * Creates an instance of ImageFormatBmp class. - */ - public ImageFormatBmp() { - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageFormatBmp from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageFormatBmp if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ImageFormatBmp. - */ - public static ImageFormatBmp fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageFormatBmp deserializedImageFormatBmp = new ImageFormatBmp(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("@type".equals(fieldName)) { - deserializedImageFormatBmp.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedImageFormatBmp; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatJpeg.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatJpeg.java deleted file mode 100644 index d6d789fca67b..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatJpeg.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * JPEG image encoding. - */ -@Fluent -public final class ImageFormatJpeg extends ImageFormatProperties { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.ImageFormatJpeg"; - - /* - * Image quality value between 0 to 100 (best quality). - */ - private String quality; - - /** - * Creates an instance of ImageFormatJpeg class. - */ - public ImageFormatJpeg() { - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the quality property: Image quality value between 0 to 100 (best quality). - * - * @return the quality value. - */ - public String getQuality() { - return this.quality; - } - - /** - * Set the quality property: Image quality value between 0 to 100 (best quality). - * - * @param quality the quality value to set. - * @return the ImageFormatJpeg object itself. - */ - public ImageFormatJpeg setQuality(String quality) { - this.quality = quality; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@type", this.type); - jsonWriter.writeStringField("quality", this.quality); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageFormatJpeg from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageFormatJpeg if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ImageFormatJpeg. - */ - public static ImageFormatJpeg fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageFormatJpeg deserializedImageFormatJpeg = new ImageFormatJpeg(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("@type".equals(fieldName)) { - deserializedImageFormatJpeg.type = reader.getString(); - } else if ("quality".equals(fieldName)) { - deserializedImageFormatJpeg.quality = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedImageFormatJpeg; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatPng.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatPng.java deleted file mode 100644 index 301779d56c34..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatPng.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * PNG image encoding. - */ -@Immutable -public final class ImageFormatPng extends ImageFormatProperties { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.ImageFormatPng"; - - /** - * Creates an instance of ImageFormatPng class. - */ - public ImageFormatPng() { - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageFormatPng from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageFormatPng if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ImageFormatPng. - */ - public static ImageFormatPng fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageFormatPng deserializedImageFormatPng = new ImageFormatPng(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("@type".equals(fieldName)) { - deserializedImageFormatPng.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedImageFormatPng; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatProperties.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatProperties.java deleted file mode 100644 index 77f010cc9e25..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatProperties.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base class for image formatting properties. - */ -@Immutable -public class ImageFormatProperties implements JsonSerializable { - /* - * Type discriminator for the derived types. - */ - private String type = "ImageFormatProperties"; - - /** - * Creates an instance of ImageFormatProperties class. - */ - public ImageFormatProperties() { - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - public String getType() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageFormatProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageFormatProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ImageFormatProperties. - */ - public static ImageFormatProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("@type".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("#Microsoft.VideoAnalyzer.ImageFormatRaw".equals(discriminatorValue)) { - return ImageFormatRaw.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.ImageFormatJpeg".equals(discriminatorValue)) { - return ImageFormatJpeg.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.ImageFormatBmp".equals(discriminatorValue)) { - return ImageFormatBmp.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.ImageFormatPng".equals(discriminatorValue)) { - return ImageFormatPng.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ImageFormatProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageFormatProperties deserializedImageFormatProperties = new ImageFormatProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("@type".equals(fieldName)) { - deserializedImageFormatProperties.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedImageFormatProperties; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatRaw.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatRaw.java deleted file mode 100644 index 81d819049f8f..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatRaw.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Raw image formatting. - */ -@Immutable -public final class ImageFormatRaw extends ImageFormatProperties { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.ImageFormatRaw"; - - /* - * Pixel format to be applied to the raw image. - */ - private final ImageFormatRawPixelFormat pixelFormat; - - /** - * Creates an instance of ImageFormatRaw class. - * - * @param pixelFormat the pixelFormat value to set. - */ - public ImageFormatRaw(ImageFormatRawPixelFormat pixelFormat) { - this.pixelFormat = pixelFormat; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the pixelFormat property: Pixel format to be applied to the raw image. - * - * @return the pixelFormat value. - */ - public ImageFormatRawPixelFormat getPixelFormat() { - return this.pixelFormat; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("pixelFormat", this.pixelFormat == null ? null : this.pixelFormat.toString()); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageFormatRaw from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageFormatRaw if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ImageFormatRaw. - */ - public static ImageFormatRaw fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean pixelFormatFound = false; - ImageFormatRawPixelFormat pixelFormat = null; - String type = "#Microsoft.VideoAnalyzer.ImageFormatRaw"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("pixelFormat".equals(fieldName)) { - pixelFormat = ImageFormatRawPixelFormat.fromString(reader.getString()); - pixelFormatFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (pixelFormatFound) { - ImageFormatRaw deserializedImageFormatRaw = new ImageFormatRaw(pixelFormat); - deserializedImageFormatRaw.type = type; - - return deserializedImageFormatRaw; - } - throw new IllegalStateException("Missing required property: pixelFormat"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatRawPixelFormat.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatRawPixelFormat.java deleted file mode 100644 index e248d0779883..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageFormatRawPixelFormat.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Pixel format to be applied to the raw image. - */ -public final class ImageFormatRawPixelFormat extends ExpandableStringEnum { - /** - * Planar YUV 4:2:0, 12bpp, (1 Cr and Cb sample per 2x2 Y samples). - */ - public static final ImageFormatRawPixelFormat YUV420P = fromString("yuv420p"); - - /** - * Packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian. - */ - public static final ImageFormatRawPixelFormat RGB565BE = fromString("rgb565be"); - - /** - * Packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian. - */ - public static final ImageFormatRawPixelFormat RGB565LE = fromString("rgb565le"); - - /** - * Packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined. - */ - public static final ImageFormatRawPixelFormat RGB555BE = fromString("rgb555be"); - - /** - * Packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined. - */ - public static final ImageFormatRawPixelFormat RGB555LE = fromString("rgb555le"); - - /** - * Packed RGB 8:8:8, 24bpp, RGBRGB. - */ - public static final ImageFormatRawPixelFormat RGB24 = fromString("rgb24"); - - /** - * Packed RGB 8:8:8, 24bpp, BGRBGR. - */ - public static final ImageFormatRawPixelFormat BGR24 = fromString("bgr24"); - - /** - * Packed ARGB 8:8:8:8, 32bpp, ARGBARGB. - */ - public static final ImageFormatRawPixelFormat ARGB = fromString("argb"); - - /** - * Packed RGBA 8:8:8:8, 32bpp, RGBARGBA. - */ - public static final ImageFormatRawPixelFormat RGBA = fromString("rgba"); - - /** - * Packed ABGR 8:8:8:8, 32bpp, ABGRABGR. - */ - public static final ImageFormatRawPixelFormat ABGR = fromString("abgr"); - - /** - * Packed BGRA 8:8:8:8, 32bpp, BGRABGRA. - */ - public static final ImageFormatRawPixelFormat BGRA = fromString("bgra"); - - /** - * Creates a new instance of ImageFormatRawPixelFormat value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ImageFormatRawPixelFormat() { - } - - /** - * Creates or finds a ImageFormatRawPixelFormat from its string representation. - * - * @param name a name to look for. - * @return the corresponding ImageFormatRawPixelFormat. - */ - public static ImageFormatRawPixelFormat fromString(String name) { - return fromString(name, ImageFormatRawPixelFormat.class); - } - - /** - * Gets known ImageFormatRawPixelFormat values. - * - * @return known ImageFormatRawPixelFormat values. - */ - public static Collection values() { - return values(ImageFormatRawPixelFormat.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageProperties.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageProperties.java deleted file mode 100644 index 2ee7bbee1b8b..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageProperties.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Image transformations and formatting options to be applied to the video frame(s). - */ -@Fluent -public final class ImageProperties implements JsonSerializable { - /* - * Image scaling mode. - */ - private ImageScale scale; - - /* - * Base class for image formatting properties. - */ - private ImageFormatProperties format; - - /** - * Creates an instance of ImageProperties class. - */ - public ImageProperties() { - } - - /** - * Get the scale property: Image scaling mode. - * - * @return the scale value. - */ - public ImageScale getScale() { - return this.scale; - } - - /** - * Set the scale property: Image scaling mode. - * - * @param scale the scale value to set. - * @return the ImageProperties object itself. - */ - public ImageProperties setScale(ImageScale scale) { - this.scale = scale; - return this; - } - - /** - * Get the format property: Base class for image formatting properties. - * - * @return the format value. - */ - public ImageFormatProperties getFormat() { - return this.format; - } - - /** - * Set the format property: Base class for image formatting properties. - * - * @param format the format value to set. - * @return the ImageProperties object itself. - */ - public ImageProperties setFormat(ImageFormatProperties format) { - this.format = format; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("scale", this.scale); - jsonWriter.writeJsonField("format", this.format); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ImageProperties. - */ - public static ImageProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageProperties deserializedImageProperties = new ImageProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scale".equals(fieldName)) { - deserializedImageProperties.scale = ImageScale.fromJson(reader); - } else if ("format".equals(fieldName)) { - deserializedImageProperties.format = ImageFormatProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedImageProperties; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageScale.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageScale.java deleted file mode 100644 index 447498eb3d93..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageScale.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Image scaling mode. - */ -@Fluent -public final class ImageScale implements JsonSerializable { - /* - * Describes the image scaling mode to be applied. Default mode is 'pad'. - */ - private ImageScaleMode mode; - - /* - * The desired output image width. - */ - private String width; - - /* - * The desired output image height. - */ - private String height; - - /** - * Creates an instance of ImageScale class. - */ - public ImageScale() { - } - - /** - * Get the mode property: Describes the image scaling mode to be applied. Default mode is 'pad'. - * - * @return the mode value. - */ - public ImageScaleMode getMode() { - return this.mode; - } - - /** - * Set the mode property: Describes the image scaling mode to be applied. Default mode is 'pad'. - * - * @param mode the mode value to set. - * @return the ImageScale object itself. - */ - public ImageScale setMode(ImageScaleMode mode) { - this.mode = mode; - return this; - } - - /** - * Get the width property: The desired output image width. - * - * @return the width value. - */ - public String getWidth() { - return this.width; - } - - /** - * Set the width property: The desired output image width. - * - * @param width the width value to set. - * @return the ImageScale object itself. - */ - public ImageScale setWidth(String width) { - this.width = width; - return this; - } - - /** - * Get the height property: The desired output image height. - * - * @return the height value. - */ - public String getHeight() { - return this.height; - } - - /** - * Set the height property: The desired output image height. - * - * @param height the height value to set. - * @return the ImageScale object itself. - */ - public ImageScale setHeight(String height) { - this.height = height; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeStringField("width", this.width); - jsonWriter.writeStringField("height", this.height); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageScale from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageScale if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the ImageScale. - */ - public static ImageScale fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageScale deserializedImageScale = new ImageScale(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mode".equals(fieldName)) { - deserializedImageScale.mode = ImageScaleMode.fromString(reader.getString()); - } else if ("width".equals(fieldName)) { - deserializedImageScale.width = reader.getString(); - } else if ("height".equals(fieldName)) { - deserializedImageScale.height = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedImageScale; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageScaleMode.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageScaleMode.java deleted file mode 100644 index 60637578bcbd..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ImageScaleMode.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Describes the image scaling mode to be applied. Default mode is 'pad'. - */ -public final class ImageScaleMode extends ExpandableStringEnum { - /** - * Preserves the same aspect ratio as the input image. If only one image dimension is provided, the second dimension - * is calculated based on the input image aspect ratio. When 2 dimensions are provided, the image is resized to fit - * the most constraining dimension, considering the input image size and aspect ratio. - */ - public static final ImageScaleMode PRESERVE_ASPECT_RATIO = fromString("preserveAspectRatio"); - - /** - * Pads the image with black horizontal stripes (letterbox) or black vertical stripes (pillar-box) so the image is - * resized to the specified dimensions while not altering the content aspect ratio. - */ - public static final ImageScaleMode PAD = fromString("pad"); - - /** - * Stretches the original image so it resized to the specified dimensions. - */ - public static final ImageScaleMode STRETCH = fromString("stretch"); - - /** - * Creates a new instance of ImageScaleMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ImageScaleMode() { - } - - /** - * Creates or finds a ImageScaleMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ImageScaleMode. - */ - public static ImageScaleMode fromString(String name) { - return fromString(name, ImageScaleMode.class); - } - - /** - * Gets known ImageScaleMode values. - * - * @return known ImageScaleMode values. - */ - public static Collection values() { - return values(ImageScaleMode.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/IotHubDeviceConnection.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/IotHubDeviceConnection.java deleted file mode 100644 index fe8e0a4d6eb5..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/IotHubDeviceConnection.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Information that enables communication between the IoT Hub and the IoT device - allowing this edge module to act as a - * transparent gateway between the two. - */ -@Fluent -public final class IotHubDeviceConnection implements JsonSerializable { - /* - * The name of the IoT device configured and managed in IoT Hub. (case-sensitive) - */ - private final String deviceId; - - /* - * IoT device connection credentials. Currently IoT device symmetric key credentials are supported. - */ - private CredentialsBase credentials; - - /** - * Creates an instance of IotHubDeviceConnection class. - * - * @param deviceId the deviceId value to set. - */ - public IotHubDeviceConnection(String deviceId) { - this.deviceId = deviceId; - } - - /** - * Get the deviceId property: The name of the IoT device configured and managed in IoT Hub. (case-sensitive). - * - * @return the deviceId value. - */ - public String getDeviceId() { - return this.deviceId; - } - - /** - * Get the credentials property: IoT device connection credentials. Currently IoT device symmetric key credentials - * are supported. - * - * @return the credentials value. - */ - public CredentialsBase getCredentials() { - return this.credentials; - } - - /** - * Set the credentials property: IoT device connection credentials. Currently IoT device symmetric key credentials - * are supported. - * - * @param credentials the credentials value to set. - * @return the IotHubDeviceConnection object itself. - */ - public IotHubDeviceConnection setCredentials(CredentialsBase credentials) { - this.credentials = credentials; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deviceId", this.deviceId); - jsonWriter.writeJsonField("credentials", this.credentials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IotHubDeviceConnection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IotHubDeviceConnection if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IotHubDeviceConnection. - */ - public static IotHubDeviceConnection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean deviceIdFound = false; - String deviceId = null; - CredentialsBase credentials = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deviceId".equals(fieldName)) { - deviceId = reader.getString(); - deviceIdFound = true; - } else if ("credentials".equals(fieldName)) { - credentials = CredentialsBase.fromJson(reader); - } else { - reader.skipChildren(); - } - } - if (deviceIdFound) { - IotHubDeviceConnection deserializedIotHubDeviceConnection = new IotHubDeviceConnection(deviceId); - deserializedIotHubDeviceConnection.credentials = credentials; - - return deserializedIotHubDeviceConnection; - } - throw new IllegalStateException("Missing required property: deviceId"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/IotHubMessageSink.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/IotHubMessageSink.java deleted file mode 100644 index d6c5bc831df1..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/IotHubMessageSink.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * IoT Hub Message sink allows for pipeline messages to published into the IoT Edge Hub. Published messages can then be - * delivered to the cloud and other modules via routes declared in the IoT Edge deployment manifest. - */ -@Immutable -public final class IotHubMessageSink extends SinkNodeBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.IotHubMessageSink"; - - /* - * Name of the Iot Edge Hub output to which the messages will be published. - */ - private final String hubOutputName; - - /** - * Creates an instance of IotHubMessageSink class. - * - * @param name the name value to set. - * @param inputs the inputs value to set. - * @param hubOutputName the hubOutputName value to set. - */ - public IotHubMessageSink(String name, List inputs, String hubOutputName) { - super(name, inputs); - this.hubOutputName = hubOutputName; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the hubOutputName property: Name of the Iot Edge Hub output to which the messages will be published. - * - * @return the hubOutputName value. - */ - public String getHubOutputName() { - return this.hubOutputName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeArrayField("inputs", getInputs(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("hubOutputName", this.hubOutputName); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IotHubMessageSink from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IotHubMessageSink if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IotHubMessageSink. - */ - public static IotHubMessageSink fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean inputsFound = false; - List inputs = null; - boolean hubOutputNameFound = false; - String hubOutputName = null; - String type = "#Microsoft.VideoAnalyzer.IotHubMessageSink"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("inputs".equals(fieldName)) { - inputs = reader.readArray(reader1 -> NodeInput.fromJson(reader1)); - inputsFound = true; - } else if ("hubOutputName".equals(fieldName)) { - hubOutputName = reader.getString(); - hubOutputNameFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound && inputsFound && hubOutputNameFound) { - IotHubMessageSink deserializedIotHubMessageSink = new IotHubMessageSink(name, inputs, hubOutputName); - deserializedIotHubMessageSink.type = type; - - return deserializedIotHubMessageSink; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!inputsFound) { - missingProperties.add("inputs"); - } - if (!hubOutputNameFound) { - missingProperties.add("hubOutputName"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/IotHubMessageSource.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/IotHubMessageSource.java deleted file mode 100644 index 0a732400c369..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/IotHubMessageSource.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * IoT Hub Message source allows for the pipeline to consume messages from the IoT Edge Hub. Messages can be routed from - * other IoT modules via routes declared in the IoT Edge deployment manifest. - */ -@Fluent -public final class IotHubMessageSource extends SourceNodeBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.IotHubMessageSource"; - - /* - * Name of the IoT Edge Hub input from which messages will be consumed. - */ - private String hubInputName; - - /** - * Creates an instance of IotHubMessageSource class. - * - * @param name the name value to set. - */ - public IotHubMessageSource(String name) { - super(name); - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the hubInputName property: Name of the IoT Edge Hub input from which messages will be consumed. - * - * @return the hubInputName value. - */ - public String getHubInputName() { - return this.hubInputName; - } - - /** - * Set the hubInputName property: Name of the IoT Edge Hub input from which messages will be consumed. - * - * @param hubInputName the hubInputName value to set. - * @return the IotHubMessageSource object itself. - */ - public IotHubMessageSource setHubInputName(String hubInputName) { - this.hubInputName = hubInputName; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeStringField("@type", this.type); - jsonWriter.writeStringField("hubInputName", this.hubInputName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IotHubMessageSource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IotHubMessageSource if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IotHubMessageSource. - */ - public static IotHubMessageSource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - String type = "#Microsoft.VideoAnalyzer.IotHubMessageSource"; - String hubInputName = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else if ("hubInputName".equals(fieldName)) { - hubInputName = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - IotHubMessageSource deserializedIotHubMessageSource = new IotHubMessageSource(name); - deserializedIotHubMessageSource.type = type; - deserializedIotHubMessageSource.hubInputName = hubInputName; - - return deserializedIotHubMessageSource; - } - throw new IllegalStateException("Missing required property: name"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ItemNonSetRequestBase.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ItemNonSetRequestBase.java deleted file mode 100644 index 6dd947065d74..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ItemNonSetRequestBase.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The ItemNonSetRequestBase model. */ -@Fluent -public class ItemNonSetRequestBase extends MethodRequest { - /* - * method name - */ - private final String name; - - /** - * Creates an instance of ItemNonSetRequestBase class. - * - * @param name the name value to set. - */ - public ItemNonSetRequestBase(String name) { - this.name = name; - } - - /** - * Get the name property: method name. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - jsonWriter.writeStringField("name", name); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ItemNonSetRequestBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ItemNonSetRequestBase if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ItemNonSetRequestBase. - */ - public static ItemNonSetRequestBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String apiVersion = null; - boolean nameFound = false; - String name = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else { - reader.skipChildren(); - } - } - if (nameFound) { - ItemNonSetRequestBase deserialized = new ItemNonSetRequestBase(name); - deserialized.setApiVersion(apiVersion); - - return deserialized; - } - - throw new IllegalStateException("Missing required property: name"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LineCrossingProcessor.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LineCrossingProcessor.java deleted file mode 100644 index 08405fa1121c..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LineCrossingProcessor.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Line crossing processor allows for the detection of tracked objects moving across one or more predefined lines. It - * must be downstream of an object tracker of downstream on an AI extension node that generates sequenceId for objects - * which are tracked across different frames of the video. Inference events are generated every time objects crosses - * from one side of the line to another. - */ -@Immutable -public final class LineCrossingProcessor extends ProcessorNodeBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.LineCrossingProcessor"; - - /* - * An array of lines used to compute line crossing events. - */ - private final List lines; - - /** - * Creates an instance of LineCrossingProcessor class. - * - * @param name the name value to set. - * @param inputs the inputs value to set. - * @param lines the lines value to set. - */ - public LineCrossingProcessor(String name, List inputs, List lines) { - super(name, inputs); - this.lines = lines; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the lines property: An array of lines used to compute line crossing events. - * - * @return the lines value. - */ - public List getLines() { - return this.lines; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeArrayField("inputs", getInputs(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("lines", this.lines, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LineCrossingProcessor from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LineCrossingProcessor if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LineCrossingProcessor. - */ - public static LineCrossingProcessor fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean inputsFound = false; - List inputs = null; - boolean linesFound = false; - List lines = null; - String type = "#Microsoft.VideoAnalyzer.LineCrossingProcessor"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("inputs".equals(fieldName)) { - inputs = reader.readArray(reader1 -> NodeInput.fromJson(reader1)); - inputsFound = true; - } else if ("lines".equals(fieldName)) { - lines = reader.readArray(reader1 -> NamedLineBase.fromJson(reader1)); - linesFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound && inputsFound && linesFound) { - LineCrossingProcessor deserializedLineCrossingProcessor - = new LineCrossingProcessor(name, inputs, lines); - deserializedLineCrossingProcessor.type = type; - - return deserializedLineCrossingProcessor; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!inputsFound) { - missingProperties.add("inputs"); - } - if (!linesFound) { - missingProperties.add("lines"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipeline.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipeline.java deleted file mode 100644 index 7e88f110c6dd..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipeline.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Live Pipeline represents an unique instance of a pipeline topology which is used for real-time content ingestion and - * analysis. - */ -@Fluent -public class LivePipeline implements JsonSerializable { - /* - * Live pipeline unique identifier. - */ - private final String name; - - /* - * Read-only system metadata associated with this object. - */ - private SystemData systemData; - - /* - * Live pipeline properties. - */ - private LivePipelineProperties properties; - - /** - * Creates an instance of LivePipeline class. - * - * @param name the name value to set. - */ - public LivePipeline(String name) { - this.name = name; - } - - /** - * Get the name property: Live pipeline unique identifier. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Get the systemData property: Read-only system metadata associated with this object. - * - * @return the systemData value. - */ - public SystemData getSystemData() { - return this.systemData; - } - - /** - * Set the systemData property: Read-only system metadata associated with this object. - * - * @param systemData the systemData value to set. - * @return the LivePipeline object itself. - */ - public LivePipeline setSystemData(SystemData systemData) { - this.systemData = systemData; - return this; - } - - /** - * Get the properties property: Live pipeline properties. - * - * @return the properties value. - */ - public LivePipelineProperties getProperties() { - return this.properties; - } - - /** - * Set the properties property: Live pipeline properties. - * - * @param properties the properties value to set. - * @return the LivePipeline object itself. - */ - public LivePipeline setProperties(LivePipelineProperties properties) { - this.properties = properties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("systemData", this.systemData); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LivePipeline from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LivePipeline if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LivePipeline. - */ - public static LivePipeline fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - SystemData systemData = null; - LivePipelineProperties properties = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("systemData".equals(fieldName)) { - systemData = SystemData.fromJson(reader); - } else if ("properties".equals(fieldName)) { - properties = LivePipelineProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - LivePipeline deserializedLivePipeline = new LivePipeline(name); - deserializedLivePipeline.systemData = systemData; - deserializedLivePipeline.properties = properties; - - return deserializedLivePipeline; - } - throw new IllegalStateException("Missing required property: name"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineActivateRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineActivateRequest.java deleted file mode 100644 index 4c360b185eb0..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineActivateRequest.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Activates an existing live pipeline. - */ -@Fluent -public final class LivePipelineActivateRequest extends MethodRequestEmptyBodyBase { - - /* - * method name - */ - private String methodName; - - /** - * Creates an instance of LivePipelineActivateRequest class. - * - * @param name the name value to set. - */ - public LivePipelineActivateRequest(String name) { - super(name); - } - - /** - * Get the methodName property: method name. - * - * @return the methodName value. - */ - public String getMethodName() { - return this.methodName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LivePipelineActivateRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LivePipelineActivateRequest if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LivePipelineActivateRequest. - */ - public static LivePipelineActivateRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - String apiVersion = null; - String methodName = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("methodName".equals(fieldName)) { - methodName = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - LivePipelineActivateRequest deserializedLivePipelineActivateRequest - = new LivePipelineActivateRequest(name); - deserializedLivePipelineActivateRequest.setApiVersion(apiVersion); - deserializedLivePipelineActivateRequest.methodName = methodName; - return deserializedLivePipelineActivateRequest; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineCollection.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineCollection.java deleted file mode 100644 index 80e0665d1674..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineCollection.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A collection of live pipelines. - */ -@Fluent -public final class LivePipelineCollection implements JsonSerializable { - /* - * List of live pipelines. - */ - private List value; - - /* - * A continuation token to be used in subsequent calls when enumerating through the collection. This is returned - * when the collection results won't fit in a single response. - */ - private String continuationToken; - - /** - * Creates an instance of LivePipelineCollection class. - */ - public LivePipelineCollection() { - } - - /** - * Get the value property: List of live pipelines. - * - * @return the value value. - */ - public List getValue() { - return this.value; - } - - /** - * Set the value property: List of live pipelines. - * - * @param value the value value to set. - * @return the LivePipelineCollection object itself. - */ - public LivePipelineCollection setValue(List value) { - this.value = value; - return this; - } - - /** - * Get the continuationToken property: A continuation token to be used in subsequent calls when enumerating through - * the collection. This is returned when the collection results won't fit in a single response. - * - * @return the continuationToken value. - */ - public String getContinuationToken() { - return this.continuationToken; - } - - /** - * Set the continuationToken property: A continuation token to be used in subsequent calls when enumerating through - * the collection. This is returned when the collection results won't fit in a single response. - * - * @param continuationToken the continuationToken value to set. - * @return the LivePipelineCollection object itself. - */ - public LivePipelineCollection setContinuationToken(String continuationToken) { - this.continuationToken = continuationToken; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("@continuationToken", this.continuationToken); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LivePipelineCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LivePipelineCollection if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the LivePipelineCollection. - */ - public static LivePipelineCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LivePipelineCollection deserializedLivePipelineCollection = new LivePipelineCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> LivePipeline.fromJson(reader1)); - deserializedLivePipelineCollection.value = value; - } else if ("@continuationToken".equals(fieldName)) { - deserializedLivePipelineCollection.continuationToken = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedLivePipelineCollection; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineDeactivateRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineDeactivateRequest.java deleted file mode 100644 index 9dff19bd2fc8..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineDeactivateRequest.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Deactivates an existing live pipeline. - */ -@Fluent -public final class LivePipelineDeactivateRequest extends MethodRequestEmptyBodyBase { - - /* - * method name - */ - private String methodName; - - /** - * Creates an instance of LivePipelineDeactivateRequest class. - * - * @param name the name value to set. - */ - public LivePipelineDeactivateRequest(String name) { - super(name); - } - - /** - * Get the methodName property: method name. - * - * @return the methodName value. - */ - public String getMethodName() { - return this.methodName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LivePipelineDeactivateRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LivePipelineDeactivateRequest if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LivePipelineDeactivateRequest. - */ - public static LivePipelineDeactivateRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - String apiVersion = null; - String methodName = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("methodName".equals(fieldName)) { - methodName = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - LivePipelineDeactivateRequest deserializedLivePipelineDeactivateRequest - = new LivePipelineDeactivateRequest(name); - deserializedLivePipelineDeactivateRequest.setApiVersion(apiVersion); - deserializedLivePipelineDeactivateRequest.methodName = methodName; - return deserializedLivePipelineDeactivateRequest; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineDeleteRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineDeleteRequest.java deleted file mode 100644 index 0ed6a673b9c7..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineDeleteRequest.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Deletes an existing live pipeline. - */ -@Fluent -public final class LivePipelineDeleteRequest extends MethodRequestEmptyBodyBase { - - /* - * method name - */ - private String methodName; - - /** - * Creates an instance of LivePipelineDeleteRequest class. - * - * @param name the name value to set. - */ - public LivePipelineDeleteRequest(String name) { - super(name); - } - - /** - * Get the methodName property: method name. - * - * @return the methodName value. - */ - public String getMethodName() { - return this.methodName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LivePipelineDeleteRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LivePipelineDeleteRequest if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LivePipelineDeleteRequest. - */ - public static LivePipelineDeleteRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - String apiVersion = null; - String methodName = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("methodName".equals(fieldName)) { - methodName = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - LivePipelineDeleteRequest deserializedLivePipelineDeleteRequest = new LivePipelineDeleteRequest(name); - deserializedLivePipelineDeleteRequest.setApiVersion(apiVersion); - deserializedLivePipelineDeleteRequest.methodName = methodName; - return deserializedLivePipelineDeleteRequest; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineGetRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineGetRequest.java deleted file mode 100644 index 409c09cb16b2..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineGetRequest.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Retrieves an existing live pipeline. - */ -@Fluent -public final class LivePipelineGetRequest extends MethodRequestEmptyBodyBase { - - /* - * method name - */ - private String methodName; - - /** - * Creates an instance of LivePipelineGetRequest class. - * - * @param name the name value to set. - */ - public LivePipelineGetRequest(String name) { - super(name); - } - - /** - * Get the methodName property: method name. - * - * @return the methodName value. - */ - public String getMethodName() { - return this.methodName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LivePipelineGetRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LivePipelineGetRequest if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LivePipelineGetRequest. - */ - public static LivePipelineGetRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - String apiVersion = null; - String methodName = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("methodName".equals(fieldName)) { - methodName = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - LivePipelineGetRequest deserializedLivePipelineGetRequest = new LivePipelineGetRequest(name); - deserializedLivePipelineGetRequest.setApiVersion(apiVersion); - deserializedLivePipelineGetRequest.methodName = methodName; - return deserializedLivePipelineGetRequest; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineListRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineListRequest.java deleted file mode 100644 index 2811ca3e23c0..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineListRequest.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * List all existing live pipelines. - */ -@Fluent -public final class LivePipelineListRequest extends MethodRequest { - - /* - * method name - */ - private String methodName; - - /** - * Creates an instance of LivePipelineListRequest class. - */ - public LivePipelineListRequest() { - } - - /** - * Get the methodName property: method name. - * - * @return the methodName value. - */ - public String getMethodName() { - return this.methodName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LivePipelineListRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LivePipelineListRequest if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LivePipelineListRequest. - */ - public static LivePipelineListRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LivePipelineListRequest deserializedLivePipelineListRequest = new LivePipelineListRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("@apiVersion".equals(fieldName)) { - deserializedLivePipelineListRequest.setApiVersion(reader.getString()); - } else if ("methodName".equals(fieldName)) { - deserializedLivePipelineListRequest.methodName = reader.getString(); - } else { - reader.skipChildren(); - } - } - return deserializedLivePipelineListRequest; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineProperties.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineProperties.java deleted file mode 100644 index 36bdb9c92976..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineProperties.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Live pipeline properties. - */ -@Fluent -public final class LivePipelineProperties implements JsonSerializable { - /* - * An optional description of the live pipeline. - */ - private String description; - - /* - * The reference to an existing pipeline topology defined for real-time content processing. When activated, this - * live pipeline will process content according to the pipeline topology definition. - */ - private String topologyName; - - /* - * List of the instance level parameter values for the user-defined topology parameters. A pipeline can only define - * or override parameters values for parameters which have been declared in the referenced topology. Topology - * parameters without a default value must be defined. Topology parameters with a default value can be optionally be - * overridden. - */ - private List parameters; - - /* - * Current pipeline state (read-only). - */ - private LivePipelineState state; - - /** - * Creates an instance of LivePipelineProperties class. - */ - public LivePipelineProperties() { - } - - /** - * Get the description property: An optional description of the live pipeline. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: An optional description of the live pipeline. - * - * @param description the description value to set. - * @return the LivePipelineProperties object itself. - */ - public LivePipelineProperties setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the topologyName property: The reference to an existing pipeline topology defined for real-time content - * processing. When activated, this live pipeline will process content according to the pipeline topology - * definition. - * - * @return the topologyName value. - */ - public String getTopologyName() { - return this.topologyName; - } - - /** - * Set the topologyName property: The reference to an existing pipeline topology defined for real-time content - * processing. When activated, this live pipeline will process content according to the pipeline topology - * definition. - * - * @param topologyName the topologyName value to set. - * @return the LivePipelineProperties object itself. - */ - public LivePipelineProperties setTopologyName(String topologyName) { - this.topologyName = topologyName; - return this; - } - - /** - * Get the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @return the parameters value. - */ - public List getParameters() { - return this.parameters; - } - - /** - * Set the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @param parameters the parameters value to set. - * @return the LivePipelineProperties object itself. - */ - public LivePipelineProperties setParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the state property: Current pipeline state (read-only). - * - * @return the state value. - */ - public LivePipelineState getState() { - return this.state; - } - - /** - * Set the state property: Current pipeline state (read-only). - * - * @param state the state value to set. - * @return the LivePipelineProperties object itself. - */ - public LivePipelineProperties setState(LivePipelineState state) { - this.state = state; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("topologyName", this.topologyName); - jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LivePipelineProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LivePipelineProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the LivePipelineProperties. - */ - public static LivePipelineProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LivePipelineProperties deserializedLivePipelineProperties = new LivePipelineProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedLivePipelineProperties.description = reader.getString(); - } else if ("topologyName".equals(fieldName)) { - deserializedLivePipelineProperties.topologyName = reader.getString(); - } else if ("parameters".equals(fieldName)) { - List parameters - = reader.readArray(reader1 -> ParameterDefinition.fromJson(reader1)); - deserializedLivePipelineProperties.parameters = parameters; - } else if ("state".equals(fieldName)) { - deserializedLivePipelineProperties.state = LivePipelineState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedLivePipelineProperties; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineSetRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineSetRequest.java deleted file mode 100644 index 18bea361bff6..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineSetRequest.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.io.UncheckedIOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Creates a new live pipeline or updates an existing one. - */ -@Fluent -public final class LivePipelineSetRequest extends MethodRequest { - - /* - * Live Pipeline represents an unique instance of a pipeline topology which is used for real-time content ingestion - * and analysis. - */ - private final LivePipeline livePipeline; - - /* - * method name - */ - private String methodName; - - /** - * Creates an instance of LivePipelineSetRequest class. - * - * @param livePipeline the livePipeline value to set. - */ - public LivePipelineSetRequest(LivePipeline livePipeline) { - this.livePipeline = livePipeline; - } - - /** - * Get the livePipeline property: Live Pipeline represents an unique instance of a pipeline topology which is used - * for real-time content ingestion and analysis. - * - * @return the livePipeline value. - */ - public LivePipeline getLivePipeline() { - return this.livePipeline; - } - - /** - * Get the methodName property: method name. - * - * @return the methodName value. - */ - public String getMethodName() { - return this.methodName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - jsonWriter.writeJsonField("livePipeline", this.livePipeline); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LivePipelineSetRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LivePipelineSetRequest if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LivePipelineSetRequest. - */ - public static LivePipelineSetRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String apiVersion = null; - boolean livePipelineFound = false; - LivePipeline livePipeline = null; - String methodName = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("livePipeline".equals(fieldName)) { - livePipeline = LivePipeline.fromJson(reader); - livePipelineFound = true; - } else if ("methodName".equals(fieldName)) { - methodName = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (livePipelineFound) { - LivePipelineSetRequest deserializedLivePipelineSetRequest = new LivePipelineSetRequest(livePipeline); - deserializedLivePipelineSetRequest.setApiVersion(apiVersion); - deserializedLivePipelineSetRequest.methodName = methodName; - return deserializedLivePipelineSetRequest; - } - List missingProperties = new ArrayList<>(); - if (!livePipelineFound) { - missingProperties.add("livePipeline"); - } - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } - - /** - * Get the payload as JSON: the serialized form of the request body - * - * @throws UncheckedIOException UncheckedIOException - * @return the payload as JSON - */ - public String getPayloadAsJson() { - return new LivePipelineSetRequestBody(this.livePipeline.getName()) - .setSystemData(this.livePipeline.getSystemData()) - .setProperties(this.livePipeline.getProperties()) - .getPayloadAsJson(); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineSetRequestBody.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineSetRequestBody.java deleted file mode 100644 index cefcfb1fe3fd..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineSetRequestBody.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Live Pipeline represents an unique instance of a pipeline topology which is used for real-time content ingestion and - * analysis. - */ -@Fluent -public final class LivePipelineSetRequestBody extends MethodRequest { - - /* - * Live pipeline unique identifier. - */ - private final String name; - - /* - * Read-only system metadata associated with this object. - */ - private SystemData systemData; - - /* - * Live pipeline properties. - */ - private LivePipelineProperties properties; - - /** - * Creates an instance of LivePipelineSetRequestBody class. - * - * @param name the name value to set. - */ - public LivePipelineSetRequestBody(String name) { - this.name = name; - } - - /** - * Get the name property: Live pipeline unique identifier. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Get the systemData property: Read-only system metadata associated with this object. - * - * @return the systemData value. - */ - public SystemData getSystemData() { - return this.systemData; - } - - /** - * Set the systemData property: Read-only system metadata associated with this object. - * - * @param systemData the systemData value to set. - * @return the LivePipelineSetRequestBody object itself. - */ - public LivePipelineSetRequestBody setSystemData(SystemData systemData) { - this.systemData = systemData; - return this; - } - - /** - * Get the properties property: Live pipeline properties. - * - * @return the properties value. - */ - public LivePipelineProperties getProperties() { - return this.properties; - } - - /** - * Set the properties property: Live pipeline properties. - * - * @param properties the properties value to set. - * @return the LivePipelineSetRequestBody object itself. - */ - public LivePipelineSetRequestBody setProperties(LivePipelineProperties properties) { - this.properties = properties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("systemData", this.systemData); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LivePipelineSetRequestBody from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LivePipelineSetRequestBody if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LivePipelineSetRequestBody. - */ - public static LivePipelineSetRequestBody fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String apiVersion = null; - boolean nameFound = false; - String name = null; - SystemData systemData = null; - LivePipelineProperties properties = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("systemData".equals(fieldName)) { - systemData = SystemData.fromJson(reader); - } else if ("properties".equals(fieldName)) { - properties = LivePipelineProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - LivePipelineSetRequestBody deserializedLivePipelineSetRequestBody - = new LivePipelineSetRequestBody(name); - deserializedLivePipelineSetRequestBody.setApiVersion(apiVersion); - deserializedLivePipelineSetRequestBody.systemData = systemData; - deserializedLivePipelineSetRequestBody.properties = properties; - return deserializedLivePipelineSetRequestBody; - } - throw new IllegalStateException("Missing required property: name"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineState.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineState.java deleted file mode 100644 index 1229ef38f8ca..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/LivePipelineState.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Current pipeline state (read-only). - */ -public final class LivePipelineState extends ExpandableStringEnum { - /** - * The live pipeline is idle and not processing media. - */ - public static final LivePipelineState INACTIVE = fromString("inactive"); - - /** - * The live pipeline is transitioning into the active state. - */ - public static final LivePipelineState ACTIVATING = fromString("activating"); - - /** - * The live pipeline is active and able to process media. If your data source is not available, for instance, if - * your RTSP camera is powered off or unreachable, the pipeline will still be active and periodically retrying the - * connection. Your Azure subscription will be billed for the duration in which the live pipeline is in the active - * state. - */ - public static final LivePipelineState ACTIVE = fromString("active"); - - /** - * The live pipeline is transitioning into the inactive state. - */ - public static final LivePipelineState DEACTIVATING = fromString("deactivating"); - - /** - * Creates a new instance of LivePipelineState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LivePipelineState() { - } - - /** - * Creates or finds a LivePipelineState from its string representation. - * - * @param name a name to look for. - * @return the corresponding LivePipelineState. - */ - public static LivePipelineState fromString(String name) { - return fromString(name, LivePipelineState.class); - } - - /** - * Gets known LivePipelineState values. - * - * @return known LivePipelineState values. - */ - public static Collection values() { - return values(LivePipelineState.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MediaProfile.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MediaProfile.java deleted file mode 100644 index 74af54392637..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MediaProfile.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Class representing the ONVIF MediaProfiles. - */ -@Fluent -public final class MediaProfile implements JsonSerializable { - /* - * The name of the Media Profile. - */ - private String name; - - /* - * Object representing the URI that will be used to request for media streaming. - */ - private Object mediaUri; - - /* - * The Video encoder configuration. - */ - private VideoEncoderConfiguration videoEncoderConfiguration; - - /** - * Creates an instance of MediaProfile class. - */ - public MediaProfile() { - } - - /** - * Get the name property: The name of the Media Profile. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Set the name property: The name of the Media Profile. - * - * @param name the name value to set. - * @return the MediaProfile object itself. - */ - public MediaProfile setName(String name) { - this.name = name; - return this; - } - - /** - * Get the mediaUri property: Object representing the URI that will be used to request for media streaming. - * - * @return the mediaUri value. - */ - public Object getMediaUri() { - return this.mediaUri; - } - - /** - * Set the mediaUri property: Object representing the URI that will be used to request for media streaming. - * - * @param mediaUri the mediaUri value to set. - * @return the MediaProfile object itself. - */ - public MediaProfile setMediaUri(Object mediaUri) { - this.mediaUri = mediaUri; - return this; - } - - /** - * Get the videoEncoderConfiguration property: The Video encoder configuration. - * - * @return the videoEncoderConfiguration value. - */ - public VideoEncoderConfiguration getVideoEncoderConfiguration() { - return this.videoEncoderConfiguration; - } - - /** - * Set the videoEncoderConfiguration property: The Video encoder configuration. - * - * @param videoEncoderConfiguration the videoEncoderConfiguration value to set. - * @return the MediaProfile object itself. - */ - public MediaProfile setVideoEncoderConfiguration(VideoEncoderConfiguration videoEncoderConfiguration) { - this.videoEncoderConfiguration = videoEncoderConfiguration; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeUntypedField("mediaUri", this.mediaUri); - jsonWriter.writeJsonField("videoEncoderConfiguration", this.videoEncoderConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MediaProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MediaProfile if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the MediaProfile. - */ - public static MediaProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MediaProfile deserializedMediaProfile = new MediaProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedMediaProfile.name = reader.getString(); - } else if ("mediaUri".equals(fieldName)) { - deserializedMediaProfile.mediaUri = reader.readUntyped(); - } else if ("videoEncoderConfiguration".equals(fieldName)) { - deserializedMediaProfile.videoEncoderConfiguration = VideoEncoderConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMediaProfile; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MediaUri.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MediaUri.java deleted file mode 100644 index e8583da31379..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MediaUri.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Object representing the URI that will be used to request for media streaming. - */ -@Fluent -public final class MediaUri implements JsonSerializable { - /* - * URI that can be used for media streaming. - */ - private String uri; - - /** - * Creates an instance of MediaUri class. - */ - public MediaUri() { - } - - /** - * Get the uri property: URI that can be used for media streaming. - * - * @return the uri value. - */ - public String getUri() { - return this.uri; - } - - /** - * Set the uri property: URI that can be used for media streaming. - * - * @param uri the uri value to set. - * @return the MediaUri object itself. - */ - public MediaUri setUri(String uri) { - this.uri = uri; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("uri", this.uri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MediaUri from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MediaUri if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the MediaUri. - */ - public static MediaUri fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MediaUri deserializedMediaUri = new MediaUri(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("uri".equals(fieldName)) { - deserializedMediaUri.uri = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMediaUri; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MethodRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MethodRequest.java deleted file mode 100644 index 576dc1aa78a8..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MethodRequest.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.io.UncheckedIOException; - -/** - * Base class for direct method calls. - */ -@Fluent -public class MethodRequest implements JsonSerializable { - - /* - * Video Analyzer API version. - */ - private String apiVersion = "1.1"; - - /** - * Creates an instance of MethodRequest class. - */ - public MethodRequest() { - } - - /** - * Get the apiVersion property: Video Analyzer API version. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** - * Set the apiVersion property: Video Analyzer API version. - * - * @param apiVersion the apiVersion value to set. - * @return the MethodRequest object itself. - */ - MethodRequest setApiVersion(String apiVersion) { - this.apiVersion = apiVersion; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@apiVersion", this.apiVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MethodRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MethodRequest if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the MethodRequest. - */ - public static MethodRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MethodRequest deserializedMethodRequest = new MethodRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("@apiVersion".equals(fieldName)) { - deserializedMethodRequest.apiVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - return deserializedMethodRequest; - }); - } - - private static final ClientLogger LOGGER = new ClientLogger(MethodRequest.class); - - /** - * Get the payload as JSON: the serialized form of the request body - * - * @throws UncheckedIOException UncheckedIOException - * @return the payload as JSON - */ - public String getPayloadAsJson() { - try { - return this.toJsonString(); - } catch (IOException ex) { - throw LOGGER.logExceptionAsError(new UncheckedIOException(ex)); - } - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MethodRequestEmptyBodyBase.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MethodRequestEmptyBodyBase.java deleted file mode 100644 index e5336b5ce0cc..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MethodRequestEmptyBodyBase.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The MethodRequestEmptyBodyBase model. - */ -@Fluent -public class MethodRequestEmptyBodyBase extends MethodRequest { - - /* - * Resource name. - */ - private final String name; - - /** - * Creates an instance of MethodRequestEmptyBodyBase class. - * - * @param name the name value to set. - */ - public MethodRequestEmptyBodyBase(String name) { - this.name = name; - } - - /** - * Get the name property: Resource name. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - jsonWriter.writeStringField("name", this.name); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MethodRequestEmptyBodyBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MethodRequestEmptyBodyBase if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MethodRequestEmptyBodyBase. - */ - public static MethodRequestEmptyBodyBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String apiVersion = null; - boolean nameFound = false; - String name = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else { - reader.skipChildren(); - } - } - if (nameFound) { - MethodRequestEmptyBodyBase deserializedMethodRequestEmptyBodyBase - = new MethodRequestEmptyBodyBase(name); - deserializedMethodRequestEmptyBodyBase.setApiVersion(apiVersion); - return deserializedMethodRequestEmptyBodyBase; - } - throw new IllegalStateException("Missing required property: name"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MotionDetectionProcessor.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MotionDetectionProcessor.java deleted file mode 100644 index 1128d0289f61..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MotionDetectionProcessor.java +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Motion detection processor allows for motion detection on the video stream. It generates motion events whenever - * motion is present on the video. - */ -@Fluent -public final class MotionDetectionProcessor extends ProcessorNodeBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.MotionDetectionProcessor"; - - /* - * Motion detection sensitivity: low, medium, high. - */ - private MotionDetectionSensitivity sensitivity; - - /* - * Indicates whether the processor should detect and output the regions within the video frame where motion was - * detected. Default is true. - */ - private Boolean outputMotionRegion; - - /* - * Time window duration on which events are aggregated before being emitted. Value must be specified in ISO8601 - * duration format (i.e. "PT2S" equals 2 seconds). Use 0 seconds for no aggregation. Default is 1 second. - */ - private String eventAggregationWindow; - - /** - * Creates an instance of MotionDetectionProcessor class. - * - * @param name the name value to set. - * @param inputs the inputs value to set. - */ - public MotionDetectionProcessor(String name, List inputs) { - super(name, inputs); - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the sensitivity property: Motion detection sensitivity: low, medium, high. - * - * @return the sensitivity value. - */ - public MotionDetectionSensitivity getSensitivity() { - return this.sensitivity; - } - - /** - * Set the sensitivity property: Motion detection sensitivity: low, medium, high. - * - * @param sensitivity the sensitivity value to set. - * @return the MotionDetectionProcessor object itself. - */ - public MotionDetectionProcessor setSensitivity(MotionDetectionSensitivity sensitivity) { - this.sensitivity = sensitivity; - return this; - } - - /** - * Get the outputMotionRegion property: Indicates whether the processor should detect and output the regions within - * the video frame where motion was detected. Default is true. - * - * @return the outputMotionRegion value. - */ - public Boolean isOutputMotionRegion() { - return this.outputMotionRegion; - } - - /** - * Set the outputMotionRegion property: Indicates whether the processor should detect and output the regions within - * the video frame where motion was detected. Default is true. - * - * @param outputMotionRegion the outputMotionRegion value to set. - * @return the MotionDetectionProcessor object itself. - */ - public MotionDetectionProcessor setOutputMotionRegion(Boolean outputMotionRegion) { - this.outputMotionRegion = outputMotionRegion; - return this; - } - - /** - * Get the eventAggregationWindow property: Time window duration on which events are aggregated before being - * emitted. Value must be specified in ISO8601 duration format (i.e. "PT2S" equals 2 seconds). Use 0 seconds for no - * aggregation. Default is 1 second. - * - * @return the eventAggregationWindow value. - */ - public String getEventAggregationWindow() { - return this.eventAggregationWindow; - } - - /** - * Set the eventAggregationWindow property: Time window duration on which events are aggregated before being - * emitted. Value must be specified in ISO8601 duration format (i.e. "PT2S" equals 2 seconds). Use 0 seconds for no - * aggregation. Default is 1 second. - * - * @param eventAggregationWindow the eventAggregationWindow value to set. - * @return the MotionDetectionProcessor object itself. - */ - public MotionDetectionProcessor setEventAggregationWindow(String eventAggregationWindow) { - this.eventAggregationWindow = eventAggregationWindow; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeArrayField("inputs", getInputs(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("@type", this.type); - jsonWriter.writeStringField("sensitivity", this.sensitivity == null ? null : this.sensitivity.toString()); - jsonWriter.writeBooleanField("outputMotionRegion", this.outputMotionRegion); - jsonWriter.writeStringField("eventAggregationWindow", this.eventAggregationWindow); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MotionDetectionProcessor from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MotionDetectionProcessor if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MotionDetectionProcessor. - */ - public static MotionDetectionProcessor fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean inputsFound = false; - List inputs = null; - String type = "#Microsoft.VideoAnalyzer.MotionDetectionProcessor"; - MotionDetectionSensitivity sensitivity = null; - Boolean outputMotionRegion = null; - String eventAggregationWindow = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("inputs".equals(fieldName)) { - inputs = reader.readArray(reader1 -> NodeInput.fromJson(reader1)); - inputsFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else if ("sensitivity".equals(fieldName)) { - sensitivity = MotionDetectionSensitivity.fromString(reader.getString()); - } else if ("outputMotionRegion".equals(fieldName)) { - outputMotionRegion = reader.getNullable(JsonReader::getBoolean); - } else if ("eventAggregationWindow".equals(fieldName)) { - eventAggregationWindow = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound && inputsFound) { - MotionDetectionProcessor deserializedMotionDetectionProcessor - = new MotionDetectionProcessor(name, inputs); - deserializedMotionDetectionProcessor.type = type; - deserializedMotionDetectionProcessor.sensitivity = sensitivity; - deserializedMotionDetectionProcessor.outputMotionRegion = outputMotionRegion; - deserializedMotionDetectionProcessor.eventAggregationWindow = eventAggregationWindow; - - return deserializedMotionDetectionProcessor; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!inputsFound) { - missingProperties.add("inputs"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MotionDetectionSensitivity.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MotionDetectionSensitivity.java deleted file mode 100644 index fc2fb649a5d8..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/MotionDetectionSensitivity.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Motion detection sensitivity: low, medium, high. - */ -public final class MotionDetectionSensitivity extends ExpandableStringEnum { - /** - * Low sensitivity. - */ - public static final MotionDetectionSensitivity LOW = fromString("low"); - - /** - * Medium sensitivity. - */ - public static final MotionDetectionSensitivity MEDIUM = fromString("medium"); - - /** - * High sensitivity. - */ - public static final MotionDetectionSensitivity HIGH = fromString("high"); - - /** - * Creates a new instance of MotionDetectionSensitivity value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MotionDetectionSensitivity() { - } - - /** - * Creates or finds a MotionDetectionSensitivity from its string representation. - * - * @param name a name to look for. - * @return the corresponding MotionDetectionSensitivity. - */ - public static MotionDetectionSensitivity fromString(String name) { - return fromString(name, MotionDetectionSensitivity.class); - } - - /** - * Gets known MotionDetectionSensitivity values. - * - * @return known MotionDetectionSensitivity values. - */ - public static Collection values() { - return values(MotionDetectionSensitivity.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/Mpeg4Configuration.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/Mpeg4Configuration.java deleted file mode 100644 index 262b5fc1793a..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/Mpeg4Configuration.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Class representing the MPEG4 Configuration. - */ -@Fluent -public final class Mpeg4Configuration implements JsonSerializable { - /* - * Group of Video frames length. - */ - private Float govLength; - - /* - * The MPEG4 Profile - */ - private Mpeg4Profile profile; - - /** - * Creates an instance of Mpeg4Configuration class. - */ - public Mpeg4Configuration() { - } - - /** - * Get the govLength property: Group of Video frames length. - * - * @return the govLength value. - */ - public Float getGovLength() { - return this.govLength; - } - - /** - * Set the govLength property: Group of Video frames length. - * - * @param govLength the govLength value to set. - * @return the Mpeg4Configuration object itself. - */ - public Mpeg4Configuration setGovLength(Float govLength) { - this.govLength = govLength; - return this; - } - - /** - * Get the profile property: The MPEG4 Profile. - * - * @return the profile value. - */ - public Mpeg4Profile getProfile() { - return this.profile; - } - - /** - * Set the profile property: The MPEG4 Profile. - * - * @param profile the profile value to set. - * @return the Mpeg4Configuration object itself. - */ - public Mpeg4Configuration setProfile(Mpeg4Profile profile) { - this.profile = profile; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("govLength", this.govLength); - jsonWriter.writeStringField("profile", this.profile == null ? null : this.profile.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Mpeg4Configuration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Mpeg4Configuration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the Mpeg4Configuration. - */ - public static Mpeg4Configuration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Mpeg4Configuration deserializedMpeg4Configuration = new Mpeg4Configuration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("govLength".equals(fieldName)) { - deserializedMpeg4Configuration.govLength = reader.getNullable(JsonReader::getFloat); - } else if ("profile".equals(fieldName)) { - deserializedMpeg4Configuration.profile = Mpeg4Profile.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMpeg4Configuration; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/Mpeg4Profile.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/Mpeg4Profile.java deleted file mode 100644 index 71f23eb288eb..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/Mpeg4Profile.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The MPEG4 Profile. - */ -public final class Mpeg4Profile extends ExpandableStringEnum { - /** - * Simple Profile. - */ - public static final Mpeg4Profile SP = fromString("SP"); - - /** - * Advanced Simple Profile. - */ - public static final Mpeg4Profile ASP = fromString("ASP"); - - /** - * Creates a new instance of Mpeg4Profile value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Mpeg4Profile() { - } - - /** - * Creates or finds a Mpeg4Profile from its string representation. - * - * @param name a name to look for. - * @return the corresponding Mpeg4Profile. - */ - public static Mpeg4Profile fromString(String name) { - return fromString(name, Mpeg4Profile.class); - } - - /** - * Gets known Mpeg4Profile values. - * - * @return known Mpeg4Profile values. - */ - public static Collection values() { - return values(Mpeg4Profile.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/NamedLineBase.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/NamedLineBase.java deleted file mode 100644 index 14e3a4e3090f..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/NamedLineBase.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base class for named lines. - */ -@Immutable -public class NamedLineBase implements JsonSerializable { - /* - * The Type discriminator for the derived types. - */ - private String type = "NamedLineBase"; - - /* - * Line name. Must be unique within the node. - */ - private final String name; - - /** - * Creates an instance of NamedLineBase class. - * - * @param name the name value to set. - */ - public NamedLineBase(String name) { - this.name = name; - } - - /** - * Get the type property: The Type discriminator for the derived types. - * - * @return the type value. - */ - public String getType() { - return this.type; - } - - /** - * Get the name property: Line name. Must be unique within the node. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NamedLineBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NamedLineBase if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the NamedLineBase. - */ - public static NamedLineBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("@type".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("#Microsoft.VideoAnalyzer.NamedLineString".equals(discriminatorValue)) { - return NamedLineString.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static NamedLineBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - String type = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - NamedLineBase deserializedNamedLineBase = new NamedLineBase(name); - deserializedNamedLineBase.type = type; - - return deserializedNamedLineBase; - } - throw new IllegalStateException("Missing required property: name"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/NamedLineString.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/NamedLineString.java deleted file mode 100644 index 0091a8841a89..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/NamedLineString.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Describes a line configuration. - */ -@Immutable -public final class NamedLineString extends NamedLineBase { - /* - * The Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.NamedLineString"; - - /* - * Point coordinates for the line start and end, respectively. Example: '[[0.3, 0.2],[0.9, 0.8]]'. Each point is - * expressed as [LEFT, TOP] coordinate ratios ranging from 0.0 to 1.0, where [0,0] is the upper-left frame corner - * and [1, 1] is the bottom-right frame corner. - */ - private final String line; - - /** - * Creates an instance of NamedLineString class. - * - * @param name the name value to set. - * @param line the line value to set. - */ - public NamedLineString(String name, String line) { - super(name); - this.line = line; - } - - /** - * Get the type property: The Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the line property: Point coordinates for the line start and end, respectively. Example: '[[0.3, 0.2],[0.9, - * 0.8]]'. Each point is expressed as [LEFT, TOP] coordinate ratios ranging from 0.0 to 1.0, where [0,0] is the - * upper-left frame corner and [1, 1] is the bottom-right frame corner. - * - * @return the line value. - */ - public String getLine() { - return this.line; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeStringField("line", this.line); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NamedLineString from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NamedLineString if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the NamedLineString. - */ - public static NamedLineString fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean lineFound = false; - String line = null; - String type = "#Microsoft.VideoAnalyzer.NamedLineString"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("line".equals(fieldName)) { - line = reader.getString(); - lineFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound && lineFound) { - NamedLineString deserializedNamedLineString = new NamedLineString(name, line); - deserializedNamedLineString.type = type; - - return deserializedNamedLineString; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!lineFound) { - missingProperties.add("line"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/NamedPolygonBase.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/NamedPolygonBase.java deleted file mode 100644 index 5396179e49e7..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/NamedPolygonBase.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Describes the named polygon. - */ -@Immutable -public class NamedPolygonBase implements JsonSerializable { - /* - * The Type discriminator for the derived types. - */ - private String type = "NamedPolygonBase"; - - /* - * Polygon name. Must be unique within the node. - */ - private final String name; - - /** - * Creates an instance of NamedPolygonBase class. - * - * @param name the name value to set. - */ - public NamedPolygonBase(String name) { - this.name = name; - } - - /** - * Get the type property: The Type discriminator for the derived types. - * - * @return the type value. - */ - public String getType() { - return this.type; - } - - /** - * Get the name property: Polygon name. Must be unique within the node. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NamedPolygonBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NamedPolygonBase if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the NamedPolygonBase. - */ - public static NamedPolygonBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("@type".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("#Microsoft.VideoAnalyzer.NamedPolygonString".equals(discriminatorValue)) { - return NamedPolygonString.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static NamedPolygonBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - String type = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - NamedPolygonBase deserializedNamedPolygonBase = new NamedPolygonBase(name); - deserializedNamedPolygonBase.type = type; - - return deserializedNamedPolygonBase; - } - throw new IllegalStateException("Missing required property: name"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/NamedPolygonString.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/NamedPolygonString.java deleted file mode 100644 index e61b848309ea..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/NamedPolygonString.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Describes a closed polygon configuration. - */ -@Immutable -public final class NamedPolygonString extends NamedPolygonBase { - /* - * The Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.NamedPolygonString"; - - /* - * Point coordinates for the polygon. Example: '[[0.3, 0.2],[0.9, 0.8],[0.7, 0.6]]'. Each point is expressed as - * [LEFT, TOP] coordinate ratios ranging from 0.0 to 1.0, where [0,0] is the upper-left frame corner and [1, 1] is - * the bottom-right frame corner. - */ - private final String polygon; - - /** - * Creates an instance of NamedPolygonString class. - * - * @param name the name value to set. - * @param polygon the polygon value to set. - */ - public NamedPolygonString(String name, String polygon) { - super(name); - this.polygon = polygon; - } - - /** - * Get the type property: The Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the polygon property: Point coordinates for the polygon. Example: '[[0.3, 0.2],[0.9, 0.8],[0.7, 0.6]]'. Each - * point is expressed as [LEFT, TOP] coordinate ratios ranging from 0.0 to 1.0, where [0,0] is the upper-left frame - * corner and [1, 1] is the bottom-right frame corner. - * - * @return the polygon value. - */ - public String getPolygon() { - return this.polygon; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeStringField("polygon", this.polygon); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NamedPolygonString from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NamedPolygonString if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the NamedPolygonString. - */ - public static NamedPolygonString fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean polygonFound = false; - String polygon = null; - String type = "#Microsoft.VideoAnalyzer.NamedPolygonString"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("polygon".equals(fieldName)) { - polygon = reader.getString(); - polygonFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound && polygonFound) { - NamedPolygonString deserializedNamedPolygonString = new NamedPolygonString(name, polygon); - deserializedNamedPolygonString.type = type; - - return deserializedNamedPolygonString; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!polygonFound) { - missingProperties.add("polygon"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/NodeInput.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/NodeInput.java deleted file mode 100644 index b8e94b00e767..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/NodeInput.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Describes an input signal to be used on a pipeline node. - */ -@Fluent -public final class NodeInput implements JsonSerializable { - /* - * The name of the upstream node in the pipeline which output is used as input of the current node. - */ - private final String nodeName; - - /* - * Allows for the selection of specific data streams (eg. video only) from another node. - */ - private List outputSelectors; - - /** - * Creates an instance of NodeInput class. - * - * @param nodeName the nodeName value to set. - */ - public NodeInput(String nodeName) { - this.nodeName = nodeName; - } - - /** - * Get the nodeName property: The name of the upstream node in the pipeline which output is used as input of the - * current node. - * - * @return the nodeName value. - */ - public String getNodeName() { - return this.nodeName; - } - - /** - * Get the outputSelectors property: Allows for the selection of specific data streams (eg. video only) from another - * node. - * - * @return the outputSelectors value. - */ - public List getOutputSelectors() { - return this.outputSelectors; - } - - /** - * Set the outputSelectors property: Allows for the selection of specific data streams (eg. video only) from another - * node. - * - * @param outputSelectors the outputSelectors value to set. - * @return the NodeInput object itself. - */ - public NodeInput setOutputSelectors(List outputSelectors) { - this.outputSelectors = outputSelectors; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nodeName", this.nodeName); - jsonWriter.writeArrayField("outputSelectors", this.outputSelectors, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NodeInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NodeInput if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the NodeInput. - */ - public static NodeInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nodeNameFound = false; - String nodeName = null; - List outputSelectors = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nodeName".equals(fieldName)) { - nodeName = reader.getString(); - nodeNameFound = true; - } else if ("outputSelectors".equals(fieldName)) { - outputSelectors = reader.readArray(reader1 -> OutputSelector.fromJson(reader1)); - } else { - reader.skipChildren(); - } - } - if (nodeNameFound) { - NodeInput deserializedNodeInput = new NodeInput(nodeName); - deserializedNodeInput.outputSelectors = outputSelectors; - - return deserializedNodeInput; - } - throw new IllegalStateException("Missing required property: nodeName"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ObjectTrackingAccuracy.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ObjectTrackingAccuracy.java deleted file mode 100644 index 6efcb5464f3a..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ObjectTrackingAccuracy.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Object tracker accuracy: low, medium, high. Higher accuracy leads to higher CPU consumption in average. - */ -public final class ObjectTrackingAccuracy extends ExpandableStringEnum { - /** - * Low accuracy. - */ - public static final ObjectTrackingAccuracy LOW = fromString("low"); - - /** - * Medium accuracy. - */ - public static final ObjectTrackingAccuracy MEDIUM = fromString("medium"); - - /** - * High accuracy. - */ - public static final ObjectTrackingAccuracy HIGH = fromString("high"); - - /** - * Creates a new instance of ObjectTrackingAccuracy value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ObjectTrackingAccuracy() { - } - - /** - * Creates or finds a ObjectTrackingAccuracy from its string representation. - * - * @param name a name to look for. - * @return the corresponding ObjectTrackingAccuracy. - */ - public static ObjectTrackingAccuracy fromString(String name) { - return fromString(name, ObjectTrackingAccuracy.class); - } - - /** - * Gets known ObjectTrackingAccuracy values. - * - * @return known ObjectTrackingAccuracy values. - */ - public static Collection values() { - return values(ObjectTrackingAccuracy.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ObjectTrackingProcessor.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ObjectTrackingProcessor.java deleted file mode 100644 index 23b5dbc44953..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ObjectTrackingProcessor.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Object tracker processor allows for continuous tracking of one of more objects over a finite sequence of video - * frames. It must be used downstream of an object detector extension node, thus allowing for the extension to be - * configured to to perform inferences on sparse frames through the use of the 'maximumSamplesPerSecond' sampling - * property. The object tracker node will then track the detected objects over the frames in which the detector is not - * invoked resulting on a smother tracking of detected objects across the continuum of video frames. The tracker will - * stop tracking objects which are not subsequently detected by the upstream detector on the subsequent detections. - */ -@Fluent -public final class ObjectTrackingProcessor extends ProcessorNodeBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.ObjectTrackingProcessor"; - - /* - * Object tracker accuracy: low, medium, high. Higher accuracy leads to higher CPU consumption in average. - */ - private ObjectTrackingAccuracy accuracy; - - /** - * Creates an instance of ObjectTrackingProcessor class. - * - * @param name the name value to set. - * @param inputs the inputs value to set. - */ - public ObjectTrackingProcessor(String name, List inputs) { - super(name, inputs); - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the accuracy property: Object tracker accuracy: low, medium, high. Higher accuracy leads to higher CPU - * consumption in average. - * - * @return the accuracy value. - */ - public ObjectTrackingAccuracy getAccuracy() { - return this.accuracy; - } - - /** - * Set the accuracy property: Object tracker accuracy: low, medium, high. Higher accuracy leads to higher CPU - * consumption in average. - * - * @param accuracy the accuracy value to set. - * @return the ObjectTrackingProcessor object itself. - */ - public ObjectTrackingProcessor setAccuracy(ObjectTrackingAccuracy accuracy) { - this.accuracy = accuracy; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeArrayField("inputs", getInputs(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("@type", this.type); - jsonWriter.writeStringField("accuracy", this.accuracy == null ? null : this.accuracy.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ObjectTrackingProcessor from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ObjectTrackingProcessor if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ObjectTrackingProcessor. - */ - public static ObjectTrackingProcessor fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean inputsFound = false; - List inputs = null; - String type = "#Microsoft.VideoAnalyzer.ObjectTrackingProcessor"; - ObjectTrackingAccuracy accuracy = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("inputs".equals(fieldName)) { - inputs = reader.readArray(reader1 -> NodeInput.fromJson(reader1)); - inputsFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else if ("accuracy".equals(fieldName)) { - accuracy = ObjectTrackingAccuracy.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - if (nameFound && inputsFound) { - ObjectTrackingProcessor deserializedObjectTrackingProcessor = new ObjectTrackingProcessor(name, inputs); - deserializedObjectTrackingProcessor.type = type; - deserializedObjectTrackingProcessor.accuracy = accuracy; - - return deserializedObjectTrackingProcessor; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!inputsFound) { - missingProperties.add("inputs"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifDevice.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifDevice.java deleted file mode 100644 index 0fe1b2e679b7..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifDevice.java +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The ONVIF device properties. - */ -@Fluent -public final class OnvifDevice implements JsonSerializable { - /* - * The hostname of the ONVIF device. - */ - private OnvifHostName hostname; - - /* - * The system date and time of the ONVIF device. - */ - private OnvifSystemDateTime systemDateTime; - - /* - * The ONVIF device DNS properties. - */ - private OnvifDns dns; - - /* - * An array of of ONVIF media profiles supported by the ONVIF device. - */ - private List mediaProfiles; - - /** - * Creates an instance of OnvifDevice class. - */ - public OnvifDevice() { - } - - /** - * Get the hostname property: The hostname of the ONVIF device. - * - * @return the hostname value. - */ - public OnvifHostName getHostname() { - return this.hostname; - } - - /** - * Set the hostname property: The hostname of the ONVIF device. - * - * @param hostname the hostname value to set. - * @return the OnvifDevice object itself. - */ - public OnvifDevice setHostname(OnvifHostName hostname) { - this.hostname = hostname; - return this; - } - - /** - * Get the systemDateTime property: The system date and time of the ONVIF device. - * - * @return the systemDateTime value. - */ - public OnvifSystemDateTime getSystemDateTime() { - return this.systemDateTime; - } - - /** - * Set the systemDateTime property: The system date and time of the ONVIF device. - * - * @param systemDateTime the systemDateTime value to set. - * @return the OnvifDevice object itself. - */ - public OnvifDevice setSystemDateTime(OnvifSystemDateTime systemDateTime) { - this.systemDateTime = systemDateTime; - return this; - } - - /** - * Get the dns property: The ONVIF device DNS properties. - * - * @return the dns value. - */ - public OnvifDns getDns() { - return this.dns; - } - - /** - * Set the dns property: The ONVIF device DNS properties. - * - * @param dns the dns value to set. - * @return the OnvifDevice object itself. - */ - public OnvifDevice setDns(OnvifDns dns) { - this.dns = dns; - return this; - } - - /** - * Get the mediaProfiles property: An array of of ONVIF media profiles supported by the ONVIF device. - * - * @return the mediaProfiles value. - */ - public List getMediaProfiles() { - return this.mediaProfiles; - } - - /** - * Set the mediaProfiles property: An array of of ONVIF media profiles supported by the ONVIF device. - * - * @param mediaProfiles the mediaProfiles value to set. - * @return the OnvifDevice object itself. - */ - public OnvifDevice setMediaProfiles(List mediaProfiles) { - this.mediaProfiles = mediaProfiles; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("hostname", this.hostname); - jsonWriter.writeJsonField("systemDateTime", this.systemDateTime); - jsonWriter.writeJsonField("dns", this.dns); - jsonWriter.writeArrayField("mediaProfiles", this.mediaProfiles, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OnvifDevice from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OnvifDevice if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OnvifDevice. - */ - public static OnvifDevice fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OnvifDevice deserializedOnvifDevice = new OnvifDevice(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("hostname".equals(fieldName)) { - deserializedOnvifDevice.hostname = OnvifHostName.fromJson(reader); - } else if ("systemDateTime".equals(fieldName)) { - deserializedOnvifDevice.systemDateTime = OnvifSystemDateTime.fromJson(reader); - } else if ("dns".equals(fieldName)) { - deserializedOnvifDevice.dns = OnvifDns.fromJson(reader); - } else if ("mediaProfiles".equals(fieldName)) { - List mediaProfiles = reader.readArray(reader1 -> MediaProfile.fromJson(reader1)); - deserializedOnvifDevice.mediaProfiles = mediaProfiles; - } else { - reader.skipChildren(); - } - } - - return deserializedOnvifDevice; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifDeviceDiscoverRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifDeviceDiscoverRequest.java deleted file mode 100644 index 5f8cebfd6f34..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifDeviceDiscoverRequest.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Lists all the discoverable ONVIF devices on the same subnet as the Edge Module. - */ -@Fluent -public final class OnvifDeviceDiscoverRequest extends MethodRequest { - - /* - * The amount of time that the ONVIF device discovery will wait for supported device responses. - */ - private String discoveryDuration; - - /* - * method name - */ - private String methodName; - - /** - * Creates an instance of OnvifDeviceDiscoverRequest class. - */ - public OnvifDeviceDiscoverRequest() { - } - - /** - * Get the discoveryDuration property: The amount of time that the ONVIF device discovery will wait for supported - * device responses. - * - * @return the discoveryDuration value. - */ - public String getDiscoveryDuration() { - return this.discoveryDuration; - } - - /** - * Set the discoveryDuration property: The amount of time that the ONVIF device discovery will wait for supported - * device responses. - * - * @param discoveryDuration the discoveryDuration value to set. - * @return the OnvifDeviceDiscoverRequest object itself. - */ - public OnvifDeviceDiscoverRequest setDiscoveryDuration(String discoveryDuration) { - this.discoveryDuration = discoveryDuration; - return this; - } - - /** - * Get the methodName property: method name. - * - * @return the methodName value. - */ - public String getMethodName() { - return this.methodName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - jsonWriter.writeStringField("discoveryDuration", this.discoveryDuration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OnvifDeviceDiscoverRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OnvifDeviceDiscoverRequest if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OnvifDeviceDiscoverRequest. - */ - public static OnvifDeviceDiscoverRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OnvifDeviceDiscoverRequest deserializedOnvifDeviceDiscoverRequest = new OnvifDeviceDiscoverRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("@apiVersion".equals(fieldName)) { - deserializedOnvifDeviceDiscoverRequest.setApiVersion(reader.getString()); - } else if ("methodName".equals(fieldName)) { - deserializedOnvifDeviceDiscoverRequest.methodName = reader.getString(); - } else if ("discoveryDuration".equals(fieldName)) { - deserializedOnvifDeviceDiscoverRequest.discoveryDuration = reader.getString(); - } else { - reader.skipChildren(); - } - } - return deserializedOnvifDeviceDiscoverRequest; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifDeviceGetRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifDeviceGetRequest.java deleted file mode 100644 index b1bf90969584..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifDeviceGetRequest.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Retrieves properties and media profiles of an ONVIF device. - */ -@Fluent -public final class OnvifDeviceGetRequest extends MethodRequest { - - /* - * Base class for endpoints. - */ - private final EndpointBase endpoint; - - /* - * method name - */ - private String methodName; - - /** - * Creates an instance of OnvifDeviceGetRequest class. - * - * @param endpoint the endpoint value to set. - */ - public OnvifDeviceGetRequest(EndpointBase endpoint) { - this.endpoint = endpoint; - } - - /** - * Get the endpoint property: Base class for endpoints. - * - * @return the endpoint value. - */ - public EndpointBase getEndpoint() { - return this.endpoint; - } - - /** - * Get the methodName property: method name. - * - * @return the methodName value. - */ - public String getMethodName() { - return this.methodName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - jsonWriter.writeJsonField("endpoint", this.endpoint); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OnvifDeviceGetRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OnvifDeviceGetRequest if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the OnvifDeviceGetRequest. - */ - public static OnvifDeviceGetRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String apiVersion = null; - boolean endpointFound = false; - EndpointBase endpoint = null; - String methodName = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("endpoint".equals(fieldName)) { - endpoint = EndpointBase.fromJson(reader); - endpointFound = true; - } else if ("methodName".equals(fieldName)) { - methodName = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (endpointFound) { - OnvifDeviceGetRequest deserializedOnvifDeviceGetRequest = new OnvifDeviceGetRequest(endpoint); - deserializedOnvifDeviceGetRequest.setApiVersion(apiVersion); - deserializedOnvifDeviceGetRequest.methodName = methodName; - return deserializedOnvifDeviceGetRequest; - } - List missingProperties = new ArrayList<>(); - if (!endpointFound) { - missingProperties.add("endpoint"); - } - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifDns.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifDns.java deleted file mode 100644 index 1bdac4c7b3f7..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifDns.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The ONVIF device DNS properties. - */ -@Fluent -public final class OnvifDns implements JsonSerializable { - /* - * Result value showing if the ONVIF device is configured to use DHCP. - */ - private Boolean fromDhcp; - - /* - * An array of IPv4 address for the discovered ONVIF device. - */ - private List ipv4Address; - - /* - * An array of IPv6 address for the discovered ONVIF device. - */ - private List ipv6Address; - - /** - * Creates an instance of OnvifDns class. - */ - public OnvifDns() { - } - - /** - * Get the fromDhcp property: Result value showing if the ONVIF device is configured to use DHCP. - * - * @return the fromDhcp value. - */ - public Boolean isFromDhcp() { - return this.fromDhcp; - } - - /** - * Set the fromDhcp property: Result value showing if the ONVIF device is configured to use DHCP. - * - * @param fromDhcp the fromDhcp value to set. - * @return the OnvifDns object itself. - */ - public OnvifDns setFromDhcp(Boolean fromDhcp) { - this.fromDhcp = fromDhcp; - return this; - } - - /** - * Get the ipv4Address property: An array of IPv4 address for the discovered ONVIF device. - * - * @return the ipv4Address value. - */ - public List getIpv4Address() { - return this.ipv4Address; - } - - /** - * Set the ipv4Address property: An array of IPv4 address for the discovered ONVIF device. - * - * @param ipv4Address the ipv4Address value to set. - * @return the OnvifDns object itself. - */ - public OnvifDns setIpv4Address(List ipv4Address) { - this.ipv4Address = ipv4Address; - return this; - } - - /** - * Get the ipv6Address property: An array of IPv6 address for the discovered ONVIF device. - * - * @return the ipv6Address value. - */ - public List getIpv6Address() { - return this.ipv6Address; - } - - /** - * Set the ipv6Address property: An array of IPv6 address for the discovered ONVIF device. - * - * @param ipv6Address the ipv6Address value to set. - * @return the OnvifDns object itself. - */ - public OnvifDns setIpv6Address(List ipv6Address) { - this.ipv6Address = ipv6Address; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("fromDhcp", this.fromDhcp); - jsonWriter.writeArrayField("ipv4Address", this.ipv4Address, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("ipv6Address", this.ipv6Address, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OnvifDns from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OnvifDns if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the OnvifDns. - */ - public static OnvifDns fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OnvifDns deserializedOnvifDns = new OnvifDns(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fromDhcp".equals(fieldName)) { - deserializedOnvifDns.fromDhcp = reader.getNullable(JsonReader::getBoolean); - } else if ("ipv4Address".equals(fieldName)) { - List ipv4Address = reader.readArray(reader1 -> reader1.getString()); - deserializedOnvifDns.ipv4Address = ipv4Address; - } else if ("ipv6Address".equals(fieldName)) { - List ipv6Address = reader.readArray(reader1 -> reader1.getString()); - deserializedOnvifDns.ipv6Address = ipv6Address; - } else { - reader.skipChildren(); - } - } - - return deserializedOnvifDns; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifHostName.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifHostName.java deleted file mode 100644 index 01607c093d8e..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifHostName.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ONVIF device DNS properties. - */ -@Fluent -public final class OnvifHostName implements JsonSerializable { - /* - * Result value showing if the ONVIF device is configured to use DHCP. - */ - private Boolean fromDhcp; - - /* - * The hostname of the ONVIF device. - */ - private String hostname; - - /** - * Creates an instance of OnvifHostName class. - */ - public OnvifHostName() { - } - - /** - * Get the fromDhcp property: Result value showing if the ONVIF device is configured to use DHCP. - * - * @return the fromDhcp value. - */ - public Boolean isFromDhcp() { - return this.fromDhcp; - } - - /** - * Set the fromDhcp property: Result value showing if the ONVIF device is configured to use DHCP. - * - * @param fromDhcp the fromDhcp value to set. - * @return the OnvifHostName object itself. - */ - public OnvifHostName setFromDhcp(Boolean fromDhcp) { - this.fromDhcp = fromDhcp; - return this; - } - - /** - * Get the hostname property: The hostname of the ONVIF device. - * - * @return the hostname value. - */ - public String getHostname() { - return this.hostname; - } - - /** - * Set the hostname property: The hostname of the ONVIF device. - * - * @param hostname the hostname value to set. - * @return the OnvifHostName object itself. - */ - public OnvifHostName setHostname(String hostname) { - this.hostname = hostname; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("fromDhcp", this.fromDhcp); - jsonWriter.writeStringField("hostname", this.hostname); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OnvifHostName from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OnvifHostName if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OnvifHostName. - */ - public static OnvifHostName fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OnvifHostName deserializedOnvifHostName = new OnvifHostName(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fromDhcp".equals(fieldName)) { - deserializedOnvifHostName.fromDhcp = reader.getNullable(JsonReader::getBoolean); - } else if ("hostname".equals(fieldName)) { - deserializedOnvifHostName.hostname = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOnvifHostName; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifSystemDateTime.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifSystemDateTime.java deleted file mode 100644 index 65d2e703fb73..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifSystemDateTime.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ONVIF device DNS properties. - */ -@Fluent -public final class OnvifSystemDateTime implements JsonSerializable { - /* - * An enum value determining whether the date time was configured using NTP or manual. - */ - private OnvifSystemDateTimeType type; - - /* - * The device datetime returned when calling the request. - */ - private String time; - - /* - * The timezone of the ONVIF device datetime. - */ - private String timeZone; - - /** - * Creates an instance of OnvifSystemDateTime class. - */ - public OnvifSystemDateTime() { - } - - /** - * Get the type property: An enum value determining whether the date time was configured using NTP or manual. - * - * @return the type value. - */ - public OnvifSystemDateTimeType getType() { - return this.type; - } - - /** - * Set the type property: An enum value determining whether the date time was configured using NTP or manual. - * - * @param type the type value to set. - * @return the OnvifSystemDateTime object itself. - */ - public OnvifSystemDateTime setType(OnvifSystemDateTimeType type) { - this.type = type; - return this; - } - - /** - * Get the time property: The device datetime returned when calling the request. - * - * @return the time value. - */ - public String getTime() { - return this.time; - } - - /** - * Set the time property: The device datetime returned when calling the request. - * - * @param time the time value to set. - * @return the OnvifSystemDateTime object itself. - */ - public OnvifSystemDateTime setTime(String time) { - this.time = time; - return this; - } - - /** - * Get the timeZone property: The timezone of the ONVIF device datetime. - * - * @return the timeZone value. - */ - public String getTimeZone() { - return this.timeZone; - } - - /** - * Set the timeZone property: The timezone of the ONVIF device datetime. - * - * @param timeZone the timeZone value to set. - * @return the OnvifSystemDateTime object itself. - */ - public OnvifSystemDateTime setTimeZone(String timeZone) { - this.timeZone = timeZone; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("time", this.time); - jsonWriter.writeStringField("timeZone", this.timeZone); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OnvifSystemDateTime from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OnvifSystemDateTime if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OnvifSystemDateTime. - */ - public static OnvifSystemDateTime fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OnvifSystemDateTime deserializedOnvifSystemDateTime = new OnvifSystemDateTime(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedOnvifSystemDateTime.type = OnvifSystemDateTimeType.fromString(reader.getString()); - } else if ("time".equals(fieldName)) { - deserializedOnvifSystemDateTime.time = reader.getString(); - } else if ("timeZone".equals(fieldName)) { - deserializedOnvifSystemDateTime.timeZone = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOnvifSystemDateTime; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifSystemDateTimeType.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifSystemDateTimeType.java deleted file mode 100644 index 721ad0d79e57..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OnvifSystemDateTimeType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * An enum value determining whether the date time was configured using NTP or manual. - */ -public final class OnvifSystemDateTimeType extends ExpandableStringEnum { - /** - * Static value Ntp for OnvifSystemDateTimeType. - */ - public static final OnvifSystemDateTimeType NTP = fromString("Ntp"); - - /** - * Static value Manual for OnvifSystemDateTimeType. - */ - public static final OnvifSystemDateTimeType MANUAL = fromString("Manual"); - - /** - * Creates a new instance of OnvifSystemDateTimeType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OnvifSystemDateTimeType() { - } - - /** - * Creates or finds a OnvifSystemDateTimeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OnvifSystemDateTimeType. - */ - public static OnvifSystemDateTimeType fromString(String name) { - return fromString(name, OnvifSystemDateTimeType.class); - } - - /** - * Gets known OnvifSystemDateTimeType values. - * - * @return known OnvifSystemDateTimeType values. - */ - public static Collection values() { - return values(OnvifSystemDateTimeType.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OutputSelector.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OutputSelector.java deleted file mode 100644 index 0553d05f2ae5..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OutputSelector.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Allows for the selection of particular streams from another node. - */ -@Fluent -public final class OutputSelector implements JsonSerializable { - /* - * The property of the data stream to be used as the selection criteria. - */ - private OutputSelectorProperty property; - - /* - * The operator to compare properties by. - */ - private OutputSelectorOperator operator; - - /* - * Value to compare against. - */ - private String value; - - /** - * Creates an instance of OutputSelector class. - */ - public OutputSelector() { - } - - /** - * Get the property property: The property of the data stream to be used as the selection criteria. - * - * @return the property value. - */ - public OutputSelectorProperty getProperty() { - return this.property; - } - - /** - * Set the property property: The property of the data stream to be used as the selection criteria. - * - * @param property the property value to set. - * @return the OutputSelector object itself. - */ - public OutputSelector setProperty(OutputSelectorProperty property) { - this.property = property; - return this; - } - - /** - * Get the operator property: The operator to compare properties by. - * - * @return the operator value. - */ - public OutputSelectorOperator getOperator() { - return this.operator; - } - - /** - * Set the operator property: The operator to compare properties by. - * - * @param operator the operator value to set. - * @return the OutputSelector object itself. - */ - public OutputSelector setOperator(OutputSelectorOperator operator) { - this.operator = operator; - return this; - } - - /** - * Get the value property: Value to compare against. - * - * @return the value value. - */ - public String getValue() { - return this.value; - } - - /** - * Set the value property: Value to compare against. - * - * @param value the value value to set. - * @return the OutputSelector object itself. - */ - public OutputSelector setValue(String value) { - this.value = value; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("property", this.property == null ? null : this.property.toString()); - jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OutputSelector from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OutputSelector if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OutputSelector. - */ - public static OutputSelector fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OutputSelector deserializedOutputSelector = new OutputSelector(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("property".equals(fieldName)) { - deserializedOutputSelector.property = OutputSelectorProperty.fromString(reader.getString()); - } else if ("operator".equals(fieldName)) { - deserializedOutputSelector.operator = OutputSelectorOperator.fromString(reader.getString()); - } else if ("value".equals(fieldName)) { - deserializedOutputSelector.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOutputSelector; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OutputSelectorOperator.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OutputSelectorOperator.java deleted file mode 100644 index c55ee1a3e8ea..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OutputSelectorOperator.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The operator to compare properties by. - */ -public final class OutputSelectorOperator extends ExpandableStringEnum { - /** - * The property is of the type defined by value. - */ - public static final OutputSelectorOperator IS = fromString("is"); - - /** - * The property is not of the type defined by value. - */ - public static final OutputSelectorOperator IS_NOT = fromString("isNot"); - - /** - * Creates a new instance of OutputSelectorOperator value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OutputSelectorOperator() { - } - - /** - * Creates or finds a OutputSelectorOperator from its string representation. - * - * @param name a name to look for. - * @return the corresponding OutputSelectorOperator. - */ - public static OutputSelectorOperator fromString(String name) { - return fromString(name, OutputSelectorOperator.class); - } - - /** - * Gets known OutputSelectorOperator values. - * - * @return known OutputSelectorOperator values. - */ - public static Collection values() { - return values(OutputSelectorOperator.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OutputSelectorProperty.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OutputSelectorProperty.java deleted file mode 100644 index 686d40c492d3..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/OutputSelectorProperty.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The property of the data stream to be used as the selection criteria. - */ -public final class OutputSelectorProperty extends ExpandableStringEnum { - /** - * The stream's MIME type or subtype: audio, video or application. - */ - public static final OutputSelectorProperty MEDIA_TYPE = fromString("mediaType"); - - /** - * Creates a new instance of OutputSelectorProperty value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OutputSelectorProperty() { - } - - /** - * Creates or finds a OutputSelectorProperty from its string representation. - * - * @param name a name to look for. - * @return the corresponding OutputSelectorProperty. - */ - public static OutputSelectorProperty fromString(String name) { - return fromString(name, OutputSelectorProperty.class); - } - - /** - * Gets known OutputSelectorProperty values. - * - * @return known OutputSelectorProperty values. - */ - public static Collection values() { - return values(OutputSelectorProperty.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ParameterDeclaration.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ParameterDeclaration.java deleted file mode 100644 index cf574b1e62cb..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ParameterDeclaration.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Single topology parameter declaration. Declared parameters can and must be referenced throughout the topology and can - * optionally have default values to be used when they are not defined in the pipeline instances. - */ -@Fluent -public final class ParameterDeclaration implements JsonSerializable { - /* - * Name of the parameter. - */ - private final String name; - - /* - * Type of the parameter. - */ - private final ParameterType type; - - /* - * Description of the parameter. - */ - private String description; - - /* - * The default value for the parameter to be used if the live pipeline does not specify a value. - */ - private String defaultProperty; - - /** - * Creates an instance of ParameterDeclaration class. - * - * @param name the name value to set. - * @param type the type value to set. - */ - public ParameterDeclaration(String name, ParameterType type) { - this.name = name; - this.type = type; - } - - /** - * Get the name property: Name of the parameter. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Get the type property: Type of the parameter. - * - * @return the type value. - */ - public ParameterType getType() { - return this.type; - } - - /** - * Get the description property: Description of the parameter. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Description of the parameter. - * - * @param description the description value to set. - * @return the ParameterDeclaration object itself. - */ - public ParameterDeclaration setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the defaultProperty property: The default value for the parameter to be used if the live pipeline does not - * specify a value. - * - * @return the defaultProperty value. - */ - public String getDefaultProperty() { - return this.defaultProperty; - } - - /** - * Set the defaultProperty property: The default value for the parameter to be used if the live pipeline does not - * specify a value. - * - * @param defaultProperty the defaultProperty value to set. - * @return the ParameterDeclaration object itself. - */ - public ParameterDeclaration setDefaultProperty(String defaultProperty) { - this.defaultProperty = defaultProperty; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("default", this.defaultProperty); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ParameterDeclaration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ParameterDeclaration if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ParameterDeclaration. - */ - public static ParameterDeclaration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean typeFound = false; - ParameterType type = null; - String description = null; - String defaultProperty = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("type".equals(fieldName)) { - type = ParameterType.fromString(reader.getString()); - typeFound = true; - } else if ("description".equals(fieldName)) { - description = reader.getString(); - } else if ("default".equals(fieldName)) { - defaultProperty = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound && typeFound) { - ParameterDeclaration deserializedParameterDeclaration = new ParameterDeclaration(name, type); - deserializedParameterDeclaration.description = description; - deserializedParameterDeclaration.defaultProperty = defaultProperty; - - return deserializedParameterDeclaration; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!typeFound) { - missingProperties.add("type"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ParameterDefinition.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ParameterDefinition.java deleted file mode 100644 index ac55821cfd5a..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ParameterDefinition.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines the parameter value of an specific pipeline topology parameter. See pipeline topology parameters for more - * information. - */ -@Fluent -public final class ParameterDefinition implements JsonSerializable { - /* - * Name of the parameter declared in the pipeline topology. - */ - private final String name; - - /* - * Parameter value to be applied on this specific live pipeline. - */ - private String value; - - /** - * Creates an instance of ParameterDefinition class. - * - * @param name the name value to set. - */ - public ParameterDefinition(String name) { - this.name = name; - } - - /** - * Get the name property: Name of the parameter declared in the pipeline topology. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Get the value property: Parameter value to be applied on this specific live pipeline. - * - * @return the value value. - */ - public String getValue() { - return this.value; - } - - /** - * Set the value property: Parameter value to be applied on this specific live pipeline. - * - * @param value the value value to set. - * @return the ParameterDefinition object itself. - */ - public ParameterDefinition setValue(String value) { - this.value = value; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ParameterDefinition from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ParameterDefinition if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ParameterDefinition. - */ - public static ParameterDefinition fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - String value = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("value".equals(fieldName)) { - value = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - ParameterDefinition deserializedParameterDefinition = new ParameterDefinition(name); - deserializedParameterDefinition.value = value; - - return deserializedParameterDefinition; - } - throw new IllegalStateException("Missing required property: name"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ParameterType.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ParameterType.java deleted file mode 100644 index a4f5a7b391ef..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ParameterType.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of the parameter. - */ -public final class ParameterType extends ExpandableStringEnum { - /** - * The parameter's value is a string. - */ - public static final ParameterType STRING = fromString("string"); - - /** - * The parameter's value is a string that holds sensitive information. - */ - public static final ParameterType SECRET_STRING = fromString("secretString"); - - /** - * The parameter's value is a 32-bit signed integer. - */ - public static final ParameterType INT = fromString("int"); - - /** - * The parameter's value is a 64-bit double-precision floating point. - */ - public static final ParameterType DOUBLE = fromString("double"); - - /** - * The parameter's value is a boolean value that is either true or false. - */ - public static final ParameterType BOOL = fromString("bool"); - - /** - * Creates a new instance of ParameterType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ParameterType() { - } - - /** - * Creates or finds a ParameterType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ParameterType. - */ - public static ParameterType fromString(String name) { - return fromString(name, ParameterType.class); - } - - /** - * Gets known ParameterType values. - * - * @return known ParameterType values. - */ - public static Collection values() { - return values(ParameterType.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PemCertificateList.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PemCertificateList.java deleted file mode 100644 index a8dca50031a0..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PemCertificateList.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A list of PEM formatted certificates. - */ -@Immutable -public final class PemCertificateList extends CertificateSource { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.PemCertificateList"; - - /* - * PEM formatted public certificates. One certificate per entry. - */ - private final List certificates; - - /** - * Creates an instance of PemCertificateList class. - * - * @param certificates the certificates value to set. - */ - public PemCertificateList(List certificates) { - this.certificates = certificates; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the certificates property: PEM formatted public certificates. One certificate per entry. - * - * @return the certificates value. - */ - public List getCertificates() { - return this.certificates; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("certificates", this.certificates, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PemCertificateList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PemCertificateList if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PemCertificateList. - */ - public static PemCertificateList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean certificatesFound = false; - List certificates = null; - String type = "#Microsoft.VideoAnalyzer.PemCertificateList"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("certificates".equals(fieldName)) { - certificates = reader.readArray(reader1 -> reader1.getString()); - certificatesFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (certificatesFound) { - PemCertificateList deserializedPemCertificateList = new PemCertificateList(certificates); - deserializedPemCertificateList.type = type; - - return deserializedPemCertificateList; - } - throw new IllegalStateException("Missing required property: certificates"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopology.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopology.java deleted file mode 100644 index e27ebeabba4b..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopology.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Pipeline topology describes the processing steps to be applied when processing media for a particular outcome. The - * topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances - * which share the same processing characteristics. For instance, a pipeline topology which acquires data from a RTSP - * camera, process it with an specific AI model and stored the data on the cloud can be reused across many different - * cameras, as long as the same processing should be applied across all the cameras. Individual instance properties can - * be defined through the use of user-defined parameters, which allow for a topology to be parameterized, thus allowing - * individual pipelines to refer to different values, such as individual cameras RTSP endpoints and credentials. Overall - * a topology is composed of the following: - * - * - Parameters: list of user defined parameters that can be references across the topology nodes. - * - Sources: list of one or more data sources nodes such as an RTSP source which allows for media to be ingested from - * cameras. - * - Processors: list of nodes which perform data analysis or transformations. - * -Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. - */ -@Fluent -public class PipelineTopology implements JsonSerializable { - /* - * Pipeline topology unique identifier. - */ - private final String name; - - /* - * Read-only system metadata associated with this object. - */ - private SystemData systemData; - - /* - * Pipeline topology properties. - */ - private PipelineTopologyProperties properties; - - /** - * Creates an instance of PipelineTopology class. - * - * @param name the name value to set. - */ - public PipelineTopology(String name) { - this.name = name; - } - - /** - * Get the name property: Pipeline topology unique identifier. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Get the systemData property: Read-only system metadata associated with this object. - * - * @return the systemData value. - */ - public SystemData getSystemData() { - return this.systemData; - } - - /** - * Set the systemData property: Read-only system metadata associated with this object. - * - * @param systemData the systemData value to set. - * @return the PipelineTopology object itself. - */ - public PipelineTopology setSystemData(SystemData systemData) { - this.systemData = systemData; - return this; - } - - /** - * Get the properties property: Pipeline topology properties. - * - * @return the properties value. - */ - public PipelineTopologyProperties getProperties() { - return this.properties; - } - - /** - * Set the properties property: Pipeline topology properties. - * - * @param properties the properties value to set. - * @return the PipelineTopology object itself. - */ - public PipelineTopology setProperties(PipelineTopologyProperties properties) { - this.properties = properties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("systemData", this.systemData); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PipelineTopology from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PipelineTopology if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PipelineTopology. - */ - public static PipelineTopology fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - SystemData systemData = null; - PipelineTopologyProperties properties = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("systemData".equals(fieldName)) { - systemData = SystemData.fromJson(reader); - } else if ("properties".equals(fieldName)) { - properties = PipelineTopologyProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - PipelineTopology deserializedPipelineTopology = new PipelineTopology(name); - deserializedPipelineTopology.systemData = systemData; - deserializedPipelineTopology.properties = properties; - - return deserializedPipelineTopology; - } - throw new IllegalStateException("Missing required property: name"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologyCollection.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologyCollection.java deleted file mode 100644 index 1038e274b38a..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologyCollection.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A collection of pipeline topologies. - */ -@Fluent -public final class PipelineTopologyCollection implements JsonSerializable { - /* - * List of pipeline topologies. - */ - private List value; - - /* - * A continuation token to be used in subsequent calls when enumerating through the collection. This is returned - * when the collection results won't fit in a single response. - */ - private String continuationToken; - - /** - * Creates an instance of PipelineTopologyCollection class. - */ - public PipelineTopologyCollection() { - } - - /** - * Get the value property: List of pipeline topologies. - * - * @return the value value. - */ - public List getValue() { - return this.value; - } - - /** - * Set the value property: List of pipeline topologies. - * - * @param value the value value to set. - * @return the PipelineTopologyCollection object itself. - */ - public PipelineTopologyCollection setValue(List value) { - this.value = value; - return this; - } - - /** - * Get the continuationToken property: A continuation token to be used in subsequent calls when enumerating through - * the collection. This is returned when the collection results won't fit in a single response. - * - * @return the continuationToken value. - */ - public String getContinuationToken() { - return this.continuationToken; - } - - /** - * Set the continuationToken property: A continuation token to be used in subsequent calls when enumerating through - * the collection. This is returned when the collection results won't fit in a single response. - * - * @param continuationToken the continuationToken value to set. - * @return the PipelineTopologyCollection object itself. - */ - public PipelineTopologyCollection setContinuationToken(String continuationToken) { - this.continuationToken = continuationToken; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("@continuationToken", this.continuationToken); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PipelineTopologyCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PipelineTopologyCollection if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PipelineTopologyCollection. - */ - public static PipelineTopologyCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PipelineTopologyCollection deserializedPipelineTopologyCollection = new PipelineTopologyCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> PipelineTopology.fromJson(reader1)); - deserializedPipelineTopologyCollection.value = value; - } else if ("@continuationToken".equals(fieldName)) { - deserializedPipelineTopologyCollection.continuationToken = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPipelineTopologyCollection; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologyDeleteRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologyDeleteRequest.java deleted file mode 100644 index 62dda998a50a..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologyDeleteRequest.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Deletes an existing pipeline topology. - */ -@Fluent -public final class PipelineTopologyDeleteRequest extends MethodRequestEmptyBodyBase { - - /* - * method name - */ - private String methodName; - - /** - * Creates an instance of PipelineTopologyDeleteRequest class. - * - * @param name the name value to set. - */ - public PipelineTopologyDeleteRequest(String name) { - super(name); - } - - /** - * Get the methodName property: method name. - * - * @return the methodName value. - */ - public String getMethodName() { - return this.methodName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PipelineTopologyDeleteRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PipelineTopologyDeleteRequest if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PipelineTopologyDeleteRequest. - */ - public static PipelineTopologyDeleteRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - String apiVersion = null; - String methodName = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("methodName".equals(fieldName)) { - methodName = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - PipelineTopologyDeleteRequest deserializedPipelineTopologyDeleteRequest - = new PipelineTopologyDeleteRequest(name); - deserializedPipelineTopologyDeleteRequest.setApiVersion(apiVersion); - deserializedPipelineTopologyDeleteRequest.methodName = methodName; - return deserializedPipelineTopologyDeleteRequest; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologyGetRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologyGetRequest.java deleted file mode 100644 index 561a2deae821..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologyGetRequest.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Retrieves an existing pipeline topology. - */ -@Fluent -public final class PipelineTopologyGetRequest extends MethodRequestEmptyBodyBase { - - /* - * method name - */ - private String methodName; - - /** - * Creates an instance of PipelineTopologyGetRequest class. - * - * @param name the name value to set. - */ - public PipelineTopologyGetRequest(String name) { - super(name); - } - - /** - * Get the methodName property: method name. - * - * @return the methodName value. - */ - public String getMethodName() { - return this.methodName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PipelineTopologyGetRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PipelineTopologyGetRequest if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PipelineTopologyGetRequest. - */ - public static PipelineTopologyGetRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - String apiVersion = null; - String methodName = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("methodName".equals(fieldName)) { - methodName = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - PipelineTopologyGetRequest deserializedPipelineTopologyGetRequest - = new PipelineTopologyGetRequest(name); - deserializedPipelineTopologyGetRequest.setApiVersion(apiVersion); - deserializedPipelineTopologyGetRequest.methodName = methodName; - return deserializedPipelineTopologyGetRequest; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologyListRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologyListRequest.java deleted file mode 100644 index be2a03df2779..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologyListRequest.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * List all existing pipeline topologies. - */ -@Fluent -public final class PipelineTopologyListRequest extends MethodRequest { - - /* - * method name - */ - private String methodName; - - /** - * Creates an instance of PipelineTopologyListRequest class. - */ - public PipelineTopologyListRequest() { - } - - /** - * Get the methodName property: method name. - * - * @return the methodName value. - */ - public String getMethodName() { - return this.methodName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PipelineTopologyListRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PipelineTopologyListRequest if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PipelineTopologyListRequest. - */ - public static PipelineTopologyListRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PipelineTopologyListRequest deserializedPipelineTopologyListRequest = new PipelineTopologyListRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("@apiVersion".equals(fieldName)) { - deserializedPipelineTopologyListRequest.setApiVersion(reader.getString()); - } else if ("methodName".equals(fieldName)) { - deserializedPipelineTopologyListRequest.methodName = reader.getString(); - } else { - reader.skipChildren(); - } - } - return deserializedPipelineTopologyListRequest; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologyProperties.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologyProperties.java deleted file mode 100644 index 034e5a0d6ed3..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologyProperties.java +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Pipeline topology properties. - */ -@Fluent -public final class PipelineTopologyProperties implements JsonSerializable { - /* - * An optional description of the pipeline topology. It is recommended that the expected use of the topology to be - * described here. - */ - private String description; - - /* - * List of the topology parameter declarations. Parameters declared here can be referenced throughout the topology - * nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can have optional default values and can - * later be defined in individual instances of the pipeline. - */ - private List parameters; - - /* - * List of the topology source nodes. Source nodes enable external data to be ingested by the pipeline. - */ - private List sources; - - /* - * List of the topology processor nodes. Processor nodes enable pipeline data to be analyzed, processed or - * transformed. - */ - private List processors; - - /* - * List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. - */ - private List sinks; - - /** - * Creates an instance of PipelineTopologyProperties class. - */ - public PipelineTopologyProperties() { - } - - /** - * Get the description property: An optional description of the pipeline topology. It is recommended that the - * expected use of the topology to be described here. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: An optional description of the pipeline topology. It is recommended that the - * expected use of the topology to be described here. - * - * @param description the description value to set. - * @return the PipelineTopologyProperties object itself. - */ - public PipelineTopologyProperties setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the parameters property: List of the topology parameter declarations. Parameters declared here can be - * referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can - * have optional default values and can later be defined in individual instances of the pipeline. - * - * @return the parameters value. - */ - public List getParameters() { - return this.parameters; - } - - /** - * Set the parameters property: List of the topology parameter declarations. Parameters declared here can be - * referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can - * have optional default values and can later be defined in individual instances of the pipeline. - * - * @param parameters the parameters value to set. - * @return the PipelineTopologyProperties object itself. - */ - public PipelineTopologyProperties setParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the sources property: List of the topology source nodes. Source nodes enable external data to be ingested by - * the pipeline. - * - * @return the sources value. - */ - public List getSources() { - return this.sources; - } - - /** - * Set the sources property: List of the topology source nodes. Source nodes enable external data to be ingested by - * the pipeline. - * - * @param sources the sources value to set. - * @return the PipelineTopologyProperties object itself. - */ - public PipelineTopologyProperties setSources(List sources) { - this.sources = sources; - return this; - } - - /** - * Get the processors property: List of the topology processor nodes. Processor nodes enable pipeline data to be - * analyzed, processed or transformed. - * - * @return the processors value. - */ - public List getProcessors() { - return this.processors; - } - - /** - * Set the processors property: List of the topology processor nodes. Processor nodes enable pipeline data to be - * analyzed, processed or transformed. - * - * @param processors the processors value to set. - * @return the PipelineTopologyProperties object itself. - */ - public PipelineTopologyProperties setProcessors(List processors) { - this.processors = processors; - return this; - } - - /** - * Get the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. - * - * @return the sinks value. - */ - public List getSinks() { - return this.sinks; - } - - /** - * Set the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. - * - * @param sinks the sinks value to set. - * @return the PipelineTopologyProperties object itself. - */ - public PipelineTopologyProperties setSinks(List sinks) { - this.sinks = sinks; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("sources", this.sources, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("processors", this.processors, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("sinks", this.sinks, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PipelineTopologyProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PipelineTopologyProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PipelineTopologyProperties. - */ - public static PipelineTopologyProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PipelineTopologyProperties deserializedPipelineTopologyProperties = new PipelineTopologyProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedPipelineTopologyProperties.description = reader.getString(); - } else if ("parameters".equals(fieldName)) { - List parameters - = reader.readArray(reader1 -> ParameterDeclaration.fromJson(reader1)); - deserializedPipelineTopologyProperties.parameters = parameters; - } else if ("sources".equals(fieldName)) { - List sources = reader.readArray(reader1 -> SourceNodeBase.fromJson(reader1)); - deserializedPipelineTopologyProperties.sources = sources; - } else if ("processors".equals(fieldName)) { - List processors - = reader.readArray(reader1 -> ProcessorNodeBase.fromJson(reader1)); - deserializedPipelineTopologyProperties.processors = processors; - } else if ("sinks".equals(fieldName)) { - List sinks = reader.readArray(reader1 -> SinkNodeBase.fromJson(reader1)); - deserializedPipelineTopologyProperties.sinks = sinks; - } else { - reader.skipChildren(); - } - } - - return deserializedPipelineTopologyProperties; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologySetRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologySetRequest.java deleted file mode 100644 index 9987f765fe48..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologySetRequest.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.io.UncheckedIOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Creates a new pipeline topology or updates an existing one. - */ -@Fluent -public final class PipelineTopologySetRequest extends MethodRequest { - - /* - * Pipeline topology describes the processing steps to be applied when processing media for a particular outcome. - * The topology should be defined according to the scenario to be achieved and can be reused across many pipeline - * instances which share the same processing characteristics. For instance, a pipeline topology which acquires data - * from a RTSP camera, process it with an specific AI model and stored the data on the cloud can be reused across - * many different cameras, as long as the same processing should be applied across all the cameras. Individual - * instance properties can be defined through the use of user-defined parameters, which allow for a topology to be - * parameterized, thus allowing individual pipelines to refer to different values, such as individual cameras RTSP - * endpoints and credentials. Overall a topology is composed of the following: - * - * - Parameters: list of user defined parameters that can be references across the topology nodes. - * - Sources: list of one or more data sources nodes such as an RTSP source which allows for media to be ingested - * from cameras. - * - Processors: list of nodes which perform data analysis or transformations. - * -Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. - */ - private final PipelineTopology pipelineTopology; - - /* - * method name - */ - private String methodName; - - /** - * Creates an instance of PipelineTopologySetRequest class. - * - * @param pipelineTopology the pipelineTopology value to set. - */ - public PipelineTopologySetRequest(PipelineTopology pipelineTopology) { - this.pipelineTopology = pipelineTopology; - } - - /** - * Get the pipelineTopology property: Pipeline topology describes the processing steps to be applied when processing - * media for a particular outcome. The topology should be defined according to the scenario to be achieved and can - * be reused across many pipeline instances which share the same processing characteristics. For instance, a - * pipeline topology which acquires data from a RTSP camera, process it with an specific AI model and stored the - * data on the cloud can be reused across many different cameras, as long as the same processing should be applied - * across all the cameras. Individual instance properties can be defined through the use of user-defined parameters, - * which allow for a topology to be parameterized, thus allowing individual pipelines to refer to different values, - * such as individual cameras RTSP endpoints and credentials. Overall a topology is composed of the following: - * - * - Parameters: list of user defined parameters that can be references across the topology nodes. - * - Sources: list of one or more data sources nodes such as an RTSP source which allows for media to be ingested - * from cameras. - * - Processors: list of nodes which perform data analysis or transformations. - * -Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. - * - * @return the pipelineTopology value. - */ - public PipelineTopology getPipelineTopology() { - return this.pipelineTopology; - } - - /** - * Get the methodName property: method name. - * - * @return the methodName value. - */ - public String getMethodName() { - return this.methodName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - jsonWriter.writeJsonField("pipelineTopology", this.pipelineTopology); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PipelineTopologySetRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PipelineTopologySetRequest if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PipelineTopologySetRequest. - */ - public static PipelineTopologySetRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String apiVersion = null; - boolean pipelineTopologyFound = false; - PipelineTopology pipelineTopology = null; - String methodName = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("pipelineTopology".equals(fieldName)) { - pipelineTopology = PipelineTopology.fromJson(reader); - pipelineTopologyFound = true; - } else if ("methodName".equals(fieldName)) { - methodName = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (pipelineTopologyFound) { - PipelineTopologySetRequest deserializedPipelineTopologySetRequest - = new PipelineTopologySetRequest(pipelineTopology); - deserializedPipelineTopologySetRequest.setApiVersion(apiVersion); - deserializedPipelineTopologySetRequest.methodName = methodName; - return deserializedPipelineTopologySetRequest; - } - List missingProperties = new ArrayList<>(); - if (!pipelineTopologyFound) { - missingProperties.add("pipelineTopology"); - } - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } - - /** - * Get the payload as JSON: the serialized form of the request body - * - * @throws UncheckedIOException UncheckedIOException - * @return the payload as JSON - */ - public String getPayloadAsJson() { - return new PipelineTopologySetRequestBody(this.pipelineTopology.getName()) - .setSystemData(this.pipelineTopology.getSystemData()) - .setProperties(this.pipelineTopology.getProperties()) - .getPayloadAsJson(); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologySetRequestBody.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologySetRequestBody.java deleted file mode 100644 index 759a495007c3..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/PipelineTopologySetRequestBody.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Pipeline topology describes the processing steps to be applied when processing media for a particular outcome. The - * topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances - * which share the same processing characteristics. For instance, a pipeline topology which acquires data from a RTSP - * camera, process it with an specific AI model and stored the data on the cloud can be reused across many different - * cameras, as long as the same processing should be applied across all the cameras. Individual instance properties can - * be defined through the use of user-defined parameters, which allow for a topology to be parameterized, thus allowing - * individual pipelines to refer to different values, such as individual cameras RTSP endpoints and credentials. Overall - * a topology is composed of the following: - * - * - Parameters: list of user defined parameters that can be references across the topology nodes. - * - Sources: list of one or more data sources nodes such as an RTSP source which allows for media to be ingested from - * cameras. - * - Processors: list of nodes which perform data analysis or transformations. - * -Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. - */ -@Fluent -public final class PipelineTopologySetRequestBody extends MethodRequest { - - /* - * Pipeline topology unique identifier. - */ - private final String name; - - /* - * Read-only system metadata associated with this object. - */ - private SystemData systemData; - - /* - * Pipeline topology properties. - */ - private PipelineTopologyProperties properties; - - /** - * Creates an instance of PipelineTopologySetRequestBody class. - * - * @param name the name value to set. - */ - public PipelineTopologySetRequestBody(String name) { - this.name = name; - } - - /** - * Get the name property: Pipeline topology unique identifier. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Get the systemData property: Read-only system metadata associated with this object. - * - * @return the systemData value. - */ - public SystemData getSystemData() { - return this.systemData; - } - - /** - * Set the systemData property: Read-only system metadata associated with this object. - * - * @param systemData the systemData value to set. - * @return the PipelineTopologySetRequestBody object itself. - */ - public PipelineTopologySetRequestBody setSystemData(SystemData systemData) { - this.systemData = systemData; - return this; - } - - /** - * Get the properties property: Pipeline topology properties. - * - * @return the properties value. - */ - public PipelineTopologyProperties getProperties() { - return this.properties; - } - - /** - * Set the properties property: Pipeline topology properties. - * - * @param properties the properties value to set. - * @return the PipelineTopologySetRequestBody object itself. - */ - public PipelineTopologySetRequestBody setProperties(PipelineTopologyProperties properties) { - this.properties = properties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("systemData", this.systemData); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PipelineTopologySetRequestBody from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PipelineTopologySetRequestBody if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PipelineTopologySetRequestBody. - */ - public static PipelineTopologySetRequestBody fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String apiVersion = null; - boolean nameFound = false; - String name = null; - SystemData systemData = null; - PipelineTopologyProperties properties = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("systemData".equals(fieldName)) { - systemData = SystemData.fromJson(reader); - } else if ("properties".equals(fieldName)) { - properties = PipelineTopologyProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - PipelineTopologySetRequestBody deserializedPipelineTopologySetRequestBody - = new PipelineTopologySetRequestBody(name); - deserializedPipelineTopologySetRequestBody.setApiVersion(apiVersion); - deserializedPipelineTopologySetRequestBody.systemData = systemData; - deserializedPipelineTopologySetRequestBody.properties = properties; - return deserializedPipelineTopologySetRequestBody; - } - throw new IllegalStateException("Missing required property: name"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ProcessorNodeBase.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ProcessorNodeBase.java deleted file mode 100644 index 1ace3202ded5..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/ProcessorNodeBase.java +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Base class for topology processor nodes. - */ -@Immutable -public class ProcessorNodeBase implements JsonSerializable { - /* - * Type discriminator for the derived types. - */ - private String type = "ProcessorNodeBase"; - - /* - * Node name. Must be unique within the topology. - */ - private final String name; - - /* - * An array of upstream node references within the topology to be used as inputs for this node. - */ - private final List inputs; - - /** - * Creates an instance of ProcessorNodeBase class. - * - * @param name the name value to set. - * @param inputs the inputs value to set. - */ - public ProcessorNodeBase(String name, List inputs) { - this.name = name; - this.inputs = inputs; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - public String getType() { - return this.type; - } - - /** - * Get the name property: Node name. Must be unique within the topology. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Get the inputs property: An array of upstream node references within the topology to be used as inputs for this - * node. - * - * @return the inputs value. - */ - public List getInputs() { - return this.inputs; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeArrayField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ProcessorNodeBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ProcessorNodeBase if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ProcessorNodeBase. - */ - public static ProcessorNodeBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("@type".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("#Microsoft.VideoAnalyzer.MotionDetectionProcessor".equals(discriminatorValue)) { - return MotionDetectionProcessor.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.ObjectTrackingProcessor".equals(discriminatorValue)) { - return ObjectTrackingProcessor.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.LineCrossingProcessor".equals(discriminatorValue)) { - return LineCrossingProcessor.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.ExtensionProcessorBase".equals(discriminatorValue)) { - return ExtensionProcessorBase.fromJsonKnownDiscriminator(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.GrpcExtension".equals(discriminatorValue)) { - return GrpcExtension.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.HttpExtension".equals(discriminatorValue)) { - return HttpExtension.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.SignalGateProcessor".equals(discriminatorValue)) { - return SignalGateProcessor.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.CognitiveServicesVisionProcessor".equals(discriminatorValue)) { - return CognitiveServicesVisionProcessor.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ProcessorNodeBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean inputsFound = false; - List inputs = null; - String type = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("inputs".equals(fieldName)) { - inputs = reader.readArray(reader1 -> NodeInput.fromJson(reader1)); - inputsFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound && inputsFound) { - ProcessorNodeBase deserializedProcessorNodeBase = new ProcessorNodeBase(name, inputs); - deserializedProcessorNodeBase.type = type; - - return deserializedProcessorNodeBase; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!inputsFound) { - missingProperties.add("inputs"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RateControl.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RateControl.java deleted file mode 100644 index 50925ee2cda2..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RateControl.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Class representing the video's rate control. - */ -@Fluent -public final class RateControl implements JsonSerializable { - /* - * the maximum output bitrate in kbps. - */ - private Float bitRateLimit; - - /* - * Interval at which images are encoded and transmitted. - */ - private Float encodingInterval; - - /* - * Maximum output framerate in fps. - */ - private Float frameRateLimit; - - /* - * A value of true indicates that frame rate is a fixed value rather than an upper limit, and that the video encoder - * shall prioritize frame rate over all other adaptable configuration values such as bitrate. - */ - private Boolean guaranteedFrameRate; - - /** - * Creates an instance of RateControl class. - */ - public RateControl() { - } - - /** - * Get the bitRateLimit property: the maximum output bitrate in kbps. - * - * @return the bitRateLimit value. - */ - public Float getBitRateLimit() { - return this.bitRateLimit; - } - - /** - * Set the bitRateLimit property: the maximum output bitrate in kbps. - * - * @param bitRateLimit the bitRateLimit value to set. - * @return the RateControl object itself. - */ - public RateControl setBitRateLimit(Float bitRateLimit) { - this.bitRateLimit = bitRateLimit; - return this; - } - - /** - * Get the encodingInterval property: Interval at which images are encoded and transmitted. - * - * @return the encodingInterval value. - */ - public Float getEncodingInterval() { - return this.encodingInterval; - } - - /** - * Set the encodingInterval property: Interval at which images are encoded and transmitted. - * - * @param encodingInterval the encodingInterval value to set. - * @return the RateControl object itself. - */ - public RateControl setEncodingInterval(Float encodingInterval) { - this.encodingInterval = encodingInterval; - return this; - } - - /** - * Get the frameRateLimit property: Maximum output framerate in fps. - * - * @return the frameRateLimit value. - */ - public Float getFrameRateLimit() { - return this.frameRateLimit; - } - - /** - * Set the frameRateLimit property: Maximum output framerate in fps. - * - * @param frameRateLimit the frameRateLimit value to set. - * @return the RateControl object itself. - */ - public RateControl setFrameRateLimit(Float frameRateLimit) { - this.frameRateLimit = frameRateLimit; - return this; - } - - /** - * Get the guaranteedFrameRate property: A value of true indicates that frame rate is a fixed value rather than an - * upper limit, and that the video encoder shall prioritize frame rate over all other adaptable configuration values - * such as bitrate. - * - * @return the guaranteedFrameRate value. - */ - public Boolean isGuaranteedFrameRate() { - return this.guaranteedFrameRate; - } - - /** - * Set the guaranteedFrameRate property: A value of true indicates that frame rate is a fixed value rather than an - * upper limit, and that the video encoder shall prioritize frame rate over all other adaptable configuration values - * such as bitrate. - * - * @param guaranteedFrameRate the guaranteedFrameRate value to set. - * @return the RateControl object itself. - */ - public RateControl setGuaranteedFrameRate(Boolean guaranteedFrameRate) { - this.guaranteedFrameRate = guaranteedFrameRate; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("bitRateLimit", this.bitRateLimit); - jsonWriter.writeNumberField("encodingInterval", this.encodingInterval); - jsonWriter.writeNumberField("frameRateLimit", this.frameRateLimit); - jsonWriter.writeBooleanField("guaranteedFrameRate", this.guaranteedFrameRate); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RateControl from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RateControl if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RateControl. - */ - public static RateControl fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RateControl deserializedRateControl = new RateControl(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("bitRateLimit".equals(fieldName)) { - deserializedRateControl.bitRateLimit = reader.getNullable(JsonReader::getFloat); - } else if ("encodingInterval".equals(fieldName)) { - deserializedRateControl.encodingInterval = reader.getNullable(JsonReader::getFloat); - } else if ("frameRateLimit".equals(fieldName)) { - deserializedRateControl.frameRateLimit = reader.getNullable(JsonReader::getFloat); - } else if ("guaranteedFrameRate".equals(fieldName)) { - deserializedRateControl.guaranteedFrameRate = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedRateControl; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapter.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapter.java deleted file mode 100644 index 77d20d598394..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapter.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Video Analyzer edge module can act as a transparent gateway for video, enabling IoT devices to send video to the - * cloud from behind a firewall. A remote device adapter should be created for each such IoT device. Communication - * between the cloud and IoT device would then flow via the Video Analyzer edge module. - */ -@Fluent -public class RemoteDeviceAdapter implements JsonSerializable { - /* - * The unique identifier for the remote device adapter. - */ - private final String name; - - /* - * Read-only system metadata associated with this object. - */ - private SystemData systemData; - - /* - * Properties of the remote device adapter. - */ - private RemoteDeviceAdapterProperties properties; - - /** - * Creates an instance of RemoteDeviceAdapter class. - * - * @param name the name value to set. - */ - public RemoteDeviceAdapter(String name) { - this.name = name; - } - - /** - * Get the name property: The unique identifier for the remote device adapter. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Get the systemData property: Read-only system metadata associated with this object. - * - * @return the systemData value. - */ - public SystemData getSystemData() { - return this.systemData; - } - - /** - * Set the systemData property: Read-only system metadata associated with this object. - * - * @param systemData the systemData value to set. - * @return the RemoteDeviceAdapter object itself. - */ - public RemoteDeviceAdapter setSystemData(SystemData systemData) { - this.systemData = systemData; - return this; - } - - /** - * Get the properties property: Properties of the remote device adapter. - * - * @return the properties value. - */ - public RemoteDeviceAdapterProperties getProperties() { - return this.properties; - } - - /** - * Set the properties property: Properties of the remote device adapter. - * - * @param properties the properties value to set. - * @return the RemoteDeviceAdapter object itself. - */ - public RemoteDeviceAdapter setProperties(RemoteDeviceAdapterProperties properties) { - this.properties = properties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("systemData", this.systemData); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RemoteDeviceAdapter from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RemoteDeviceAdapter if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RemoteDeviceAdapter. - */ - public static RemoteDeviceAdapter fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - SystemData systemData = null; - RemoteDeviceAdapterProperties properties = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("systemData".equals(fieldName)) { - systemData = SystemData.fromJson(reader); - } else if ("properties".equals(fieldName)) { - properties = RemoteDeviceAdapterProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - RemoteDeviceAdapter deserializedRemoteDeviceAdapter = new RemoteDeviceAdapter(name); - deserializedRemoteDeviceAdapter.systemData = systemData; - deserializedRemoteDeviceAdapter.properties = properties; - - return deserializedRemoteDeviceAdapter; - } - throw new IllegalStateException("Missing required property: name"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterCollection.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterCollection.java deleted file mode 100644 index fcd03897b185..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterCollection.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A list of remote device adapters. - */ -@Fluent -public final class RemoteDeviceAdapterCollection implements JsonSerializable { - /* - * An array of remote device adapters. - */ - private List value; - - /* - * A continuation token to use in subsequent calls to enumerate through the remote device adapter collection. This - * is used when the collection contains too many results to return in one response. - */ - private String continuationToken; - - /** - * Creates an instance of RemoteDeviceAdapterCollection class. - */ - public RemoteDeviceAdapterCollection() { - } - - /** - * Get the value property: An array of remote device adapters. - * - * @return the value value. - */ - public List getValue() { - return this.value; - } - - /** - * Set the value property: An array of remote device adapters. - * - * @param value the value value to set. - * @return the RemoteDeviceAdapterCollection object itself. - */ - public RemoteDeviceAdapterCollection setValue(List value) { - this.value = value; - return this; - } - - /** - * Get the continuationToken property: A continuation token to use in subsequent calls to enumerate through the - * remote device adapter collection. This is used when the collection contains too many results to return in one - * response. - * - * @return the continuationToken value. - */ - public String getContinuationToken() { - return this.continuationToken; - } - - /** - * Set the continuationToken property: A continuation token to use in subsequent calls to enumerate through the - * remote device adapter collection. This is used when the collection contains too many results to return in one - * response. - * - * @param continuationToken the continuationToken value to set. - * @return the RemoteDeviceAdapterCollection object itself. - */ - public RemoteDeviceAdapterCollection setContinuationToken(String continuationToken) { - this.continuationToken = continuationToken; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("@continuationToken", this.continuationToken); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RemoteDeviceAdapterCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RemoteDeviceAdapterCollection if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RemoteDeviceAdapterCollection. - */ - public static RemoteDeviceAdapterCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RemoteDeviceAdapterCollection deserializedRemoteDeviceAdapterCollection - = new RemoteDeviceAdapterCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> RemoteDeviceAdapter.fromJson(reader1)); - deserializedRemoteDeviceAdapterCollection.value = value; - } else if ("@continuationToken".equals(fieldName)) { - deserializedRemoteDeviceAdapterCollection.continuationToken = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRemoteDeviceAdapterCollection; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterDeleteRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterDeleteRequest.java deleted file mode 100644 index ed9d7d44b8d8..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterDeleteRequest.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Deletes an existing remote device adapter. - */ -@Fluent -public final class RemoteDeviceAdapterDeleteRequest extends MethodRequestEmptyBodyBase { - - /* - * method name - */ - private String methodName; - - /** - * Creates an instance of RemoteDeviceAdapterDeleteRequest class. - * - * @param name the name value to set. - */ - public RemoteDeviceAdapterDeleteRequest(String name) { - super(name); - } - - /** - * Get the methodName property: method name. - * - * @return the methodName value. - */ - public String getMethodName() { - return this.methodName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RemoteDeviceAdapterDeleteRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RemoteDeviceAdapterDeleteRequest if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RemoteDeviceAdapterDeleteRequest. - */ - public static RemoteDeviceAdapterDeleteRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - String apiVersion = null; - String methodName = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("methodName".equals(fieldName)) { - methodName = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - RemoteDeviceAdapterDeleteRequest deserializedRemoteDeviceAdapterDeleteRequest - = new RemoteDeviceAdapterDeleteRequest(name); - deserializedRemoteDeviceAdapterDeleteRequest.setApiVersion(apiVersion); - deserializedRemoteDeviceAdapterDeleteRequest.methodName = methodName; - return deserializedRemoteDeviceAdapterDeleteRequest; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterGetRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterGetRequest.java deleted file mode 100644 index 159169e8cf3a..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterGetRequest.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Retrieves an existing remote device adapter. - */ -@Fluent -public final class RemoteDeviceAdapterGetRequest extends MethodRequestEmptyBodyBase { - - /* - * method name - */ - private String methodName; - - /** - * Creates an instance of RemoteDeviceAdapterGetRequest class. - * - * @param name the name value to set. - */ - public RemoteDeviceAdapterGetRequest(String name) { - super(name); - } - - /** - * Get the methodName property: method name. - * - * @return the methodName value. - */ - public String getMethodName() { - return this.methodName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RemoteDeviceAdapterGetRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RemoteDeviceAdapterGetRequest if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RemoteDeviceAdapterGetRequest. - */ - public static RemoteDeviceAdapterGetRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - String apiVersion = null; - String methodName = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("methodName".equals(fieldName)) { - methodName = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - RemoteDeviceAdapterGetRequest deserializedRemoteDeviceAdapterGetRequest - = new RemoteDeviceAdapterGetRequest(name); - deserializedRemoteDeviceAdapterGetRequest.setApiVersion(apiVersion); - deserializedRemoteDeviceAdapterGetRequest.methodName = methodName; - return deserializedRemoteDeviceAdapterGetRequest; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterListRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterListRequest.java deleted file mode 100644 index b583bfd67279..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterListRequest.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * List all existing remote device adapters. - */ -@Fluent -public final class RemoteDeviceAdapterListRequest extends MethodRequest { - - /* - * method name - */ - private String methodName; - - /** - * Creates an instance of RemoteDeviceAdapterListRequest class. - */ - public RemoteDeviceAdapterListRequest() { - } - - /** - * Get the methodName property: method name. - * - * @return the methodName value. - */ - public String getMethodName() { - return this.methodName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RemoteDeviceAdapterListRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RemoteDeviceAdapterListRequest if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RemoteDeviceAdapterListRequest. - */ - public static RemoteDeviceAdapterListRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RemoteDeviceAdapterListRequest deserializedRemoteDeviceAdapterListRequest - = new RemoteDeviceAdapterListRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("@apiVersion".equals(fieldName)) { - deserializedRemoteDeviceAdapterListRequest.setApiVersion(reader.getString()); - } else if ("methodName".equals(fieldName)) { - deserializedRemoteDeviceAdapterListRequest.methodName = reader.getString(); - } else { - reader.skipChildren(); - } - } - return deserializedRemoteDeviceAdapterListRequest; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterProperties.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterProperties.java deleted file mode 100644 index f882e2b859d5..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterProperties.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Remote device adapter properties. - */ -@Fluent -public final class RemoteDeviceAdapterProperties implements JsonSerializable { - /* - * An optional description for the remote device adapter. - */ - private String description; - - /* - * The IoT device to which this remote device will connect. - */ - private final RemoteDeviceAdapterTarget target; - - /* - * Information that enables communication between the IoT Hub and the IoT device - allowing this edge module to act - * as a transparent gateway between the two. - */ - private final IotHubDeviceConnection iotHubDeviceConnection; - - /** - * Creates an instance of RemoteDeviceAdapterProperties class. - * - * @param target the target value to set. - * @param iotHubDeviceConnection the iotHubDeviceConnection value to set. - */ - public RemoteDeviceAdapterProperties(RemoteDeviceAdapterTarget target, - IotHubDeviceConnection iotHubDeviceConnection) { - this.target = target; - this.iotHubDeviceConnection = iotHubDeviceConnection; - } - - /** - * Get the description property: An optional description for the remote device adapter. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: An optional description for the remote device adapter. - * - * @param description the description value to set. - * @return the RemoteDeviceAdapterProperties object itself. - */ - public RemoteDeviceAdapterProperties setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the target property: The IoT device to which this remote device will connect. - * - * @return the target value. - */ - public RemoteDeviceAdapterTarget getTarget() { - return this.target; - } - - /** - * Get the iotHubDeviceConnection property: Information that enables communication between the IoT Hub and the IoT - * device - allowing this edge module to act as a transparent gateway between the two. - * - * @return the iotHubDeviceConnection value. - */ - public IotHubDeviceConnection getIotHubDeviceConnection() { - return this.iotHubDeviceConnection; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("target", this.target); - jsonWriter.writeJsonField("iotHubDeviceConnection", this.iotHubDeviceConnection); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RemoteDeviceAdapterProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RemoteDeviceAdapterProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RemoteDeviceAdapterProperties. - */ - public static RemoteDeviceAdapterProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean targetFound = false; - RemoteDeviceAdapterTarget target = null; - boolean iotHubDeviceConnectionFound = false; - IotHubDeviceConnection iotHubDeviceConnection = null; - String description = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("target".equals(fieldName)) { - target = RemoteDeviceAdapterTarget.fromJson(reader); - targetFound = true; - } else if ("iotHubDeviceConnection".equals(fieldName)) { - iotHubDeviceConnection = IotHubDeviceConnection.fromJson(reader); - iotHubDeviceConnectionFound = true; - } else if ("description".equals(fieldName)) { - description = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (targetFound && iotHubDeviceConnectionFound) { - RemoteDeviceAdapterProperties deserializedRemoteDeviceAdapterProperties - = new RemoteDeviceAdapterProperties(target, iotHubDeviceConnection); - deserializedRemoteDeviceAdapterProperties.description = description; - - return deserializedRemoteDeviceAdapterProperties; - } - List missingProperties = new ArrayList<>(); - if (!targetFound) { - missingProperties.add("target"); - } - if (!iotHubDeviceConnectionFound) { - missingProperties.add("iotHubDeviceConnection"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterSetRequest.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterSetRequest.java deleted file mode 100644 index 8396741228e7..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterSetRequest.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.io.UncheckedIOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Creates a new remote device adapter or updates an existing one. - */ -@Fluent -public final class RemoteDeviceAdapterSetRequest extends MethodRequest { - - /* - * The Video Analyzer edge module can act as a transparent gateway for video, enabling IoT devices to send video to - * the cloud from behind a firewall. A remote device adapter should be created for each such IoT device. - * Communication between the cloud and IoT device would then flow via the Video Analyzer edge module. - */ - private final RemoteDeviceAdapter remoteDeviceAdapter; - - /* - * method name - */ - private String methodName; - - /** - * Creates an instance of RemoteDeviceAdapterSetRequest class. - * - * @param remoteDeviceAdapter the remoteDeviceAdapter value to set. - */ - public RemoteDeviceAdapterSetRequest(RemoteDeviceAdapter remoteDeviceAdapter) { - this.remoteDeviceAdapter = remoteDeviceAdapter; - } - - /** - * Get the remoteDeviceAdapter property: The Video Analyzer edge module can act as a transparent gateway for video, - * enabling IoT devices to send video to the cloud from behind a firewall. A remote device adapter should be created - * for each such IoT device. Communication between the cloud and IoT device would then flow via the Video Analyzer - * edge module. - * - * @return the remoteDeviceAdapter value. - */ - public RemoteDeviceAdapter getRemoteDeviceAdapter() { - return this.remoteDeviceAdapter; - } - - /** - * Get the methodName property: method name. - * - * @return the methodName value. - */ - public String getMethodName() { - return this.methodName; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - jsonWriter.writeJsonField("remoteDeviceAdapter", this.remoteDeviceAdapter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RemoteDeviceAdapterSetRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RemoteDeviceAdapterSetRequest if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RemoteDeviceAdapterSetRequest. - */ - public static RemoteDeviceAdapterSetRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String apiVersion = null; - boolean remoteDeviceAdapterFound = false; - RemoteDeviceAdapter remoteDeviceAdapter = null; - String methodName = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("remoteDeviceAdapter".equals(fieldName)) { - remoteDeviceAdapter = RemoteDeviceAdapter.fromJson(reader); - remoteDeviceAdapterFound = true; - } else if ("methodName".equals(fieldName)) { - methodName = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (remoteDeviceAdapterFound) { - RemoteDeviceAdapterSetRequest deserializedRemoteDeviceAdapterSetRequest - = new RemoteDeviceAdapterSetRequest(remoteDeviceAdapter); - deserializedRemoteDeviceAdapterSetRequest.setApiVersion(apiVersion); - deserializedRemoteDeviceAdapterSetRequest.methodName = methodName; - return deserializedRemoteDeviceAdapterSetRequest; - } - List missingProperties = new ArrayList<>(); - if (!remoteDeviceAdapterFound) { - missingProperties.add("remoteDeviceAdapter"); - } - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } - - /** - * Get the payload as JSON: the serialized form of the request body - * - * @throws UncheckedIOException UncheckedIOException - * @return the payload as JSON - */ - public String getPayloadAsJson() { - return new RemoteDeviceAdapterSetRequestBody(this.remoteDeviceAdapter.getName()) - .setSystemData(this.remoteDeviceAdapter.getSystemData()) - .setProperties(this.remoteDeviceAdapter.getProperties()) - .getPayloadAsJson(); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterSetRequestBody.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterSetRequestBody.java deleted file mode 100644 index 0ff1b2f78ed5..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterSetRequestBody.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Video Analyzer edge module can act as a transparent gateway for video, enabling IoT devices to send video to the - * cloud from behind a firewall. A remote device adapter should be created for each such IoT device. Communication - * between the cloud and IoT device would then flow via the Video Analyzer edge module. - */ -@Fluent -public final class RemoteDeviceAdapterSetRequestBody extends MethodRequest { - - /* - * The unique identifier for the remote device adapter. - */ - private final String name; - - /* - * Read-only system metadata associated with this object. - */ - private SystemData systemData; - - /* - * Properties of the remote device adapter. - */ - private RemoteDeviceAdapterProperties properties; - - /** - * Creates an instance of RemoteDeviceAdapterSetRequestBody class. - * - * @param name the name value to set. - */ - public RemoteDeviceAdapterSetRequestBody(String name) { - this.name = name; - } - - /** - * Get the name property: The unique identifier for the remote device adapter. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Get the systemData property: Read-only system metadata associated with this object. - * - * @return the systemData value. - */ - public SystemData getSystemData() { - return this.systemData; - } - - /** - * Set the systemData property: Read-only system metadata associated with this object. - * - * @param systemData the systemData value to set. - * @return the RemoteDeviceAdapterSetRequestBody object itself. - */ - public RemoteDeviceAdapterSetRequestBody setSystemData(SystemData systemData) { - this.systemData = systemData; - return this; - } - - /** - * Get the properties property: Properties of the remote device adapter. - * - * @return the properties value. - */ - public RemoteDeviceAdapterProperties getProperties() { - return this.properties; - } - - /** - * Set the properties property: Properties of the remote device adapter. - * - * @param properties the properties value to set. - * @return the RemoteDeviceAdapterSetRequestBody object itself. - */ - public RemoteDeviceAdapterSetRequestBody setProperties(RemoteDeviceAdapterProperties properties) { - this.properties = properties; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@apiVersion", getApiVersion()); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("systemData", this.systemData); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RemoteDeviceAdapterSetRequestBody from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RemoteDeviceAdapterSetRequestBody if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RemoteDeviceAdapterSetRequestBody. - */ - public static RemoteDeviceAdapterSetRequestBody fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String apiVersion = null; - boolean nameFound = false; - String name = null; - SystemData systemData = null; - RemoteDeviceAdapterProperties properties = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("@apiVersion".equals(fieldName)) { - apiVersion = reader.getString(); - } else if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("systemData".equals(fieldName)) { - systemData = SystemData.fromJson(reader); - } else if ("properties".equals(fieldName)) { - properties = RemoteDeviceAdapterProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - RemoteDeviceAdapterSetRequestBody deserializedRemoteDeviceAdapterSetRequestBody - = new RemoteDeviceAdapterSetRequestBody(name); - deserializedRemoteDeviceAdapterSetRequestBody.setApiVersion(apiVersion); - deserializedRemoteDeviceAdapterSetRequestBody.systemData = systemData; - deserializedRemoteDeviceAdapterSetRequestBody.properties = properties; - return deserializedRemoteDeviceAdapterSetRequestBody; - } - throw new IllegalStateException("Missing required property: name"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterTarget.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterTarget.java deleted file mode 100644 index 6d6a3d7f99d7..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RemoteDeviceAdapterTarget.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties of the remote device adapter target. - */ -@Immutable -public final class RemoteDeviceAdapterTarget implements JsonSerializable { - /* - * Hostname or IP address of the remote device. - */ - private final String host; - - /** - * Creates an instance of RemoteDeviceAdapterTarget class. - * - * @param host the host value to set. - */ - public RemoteDeviceAdapterTarget(String host) { - this.host = host; - } - - /** - * Get the host property: Hostname or IP address of the remote device. - * - * @return the host value. - */ - public String getHost() { - return this.host; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("host", this.host); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RemoteDeviceAdapterTarget from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RemoteDeviceAdapterTarget if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RemoteDeviceAdapterTarget. - */ - public static RemoteDeviceAdapterTarget fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean hostFound = false; - String host = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("host".equals(fieldName)) { - host = reader.getString(); - hostFound = true; - } else { - reader.skipChildren(); - } - } - if (hostFound) { - return new RemoteDeviceAdapterTarget(host); - } - throw new IllegalStateException("Missing required property: host"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RtspSource.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RtspSource.java deleted file mode 100644 index 6e6fec5e3168..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RtspSource.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * RTSP source allows for media from an RTSP camera or generic RTSP server to be ingested into a live pipeline. - */ -@Fluent -public final class RtspSource extends SourceNodeBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.RtspSource"; - - /* - * Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When using TCP, the RTP packets are - * interleaved on the TCP RTSP connection. When using HTTP, the RTSP messages are exchanged through long lived HTTP - * connections, and the RTP packages are interleaved in the HTTP connections alongside the RTSP messages. - */ - private RtspTransport transport; - - /* - * RTSP endpoint information for Video Analyzer to connect to. This contains the required information for Video - * Analyzer to connect to RTSP cameras and/or generic RTSP servers. - */ - private final EndpointBase endpoint; - - /** - * Creates an instance of RtspSource class. - * - * @param name the name value to set. - * @param endpoint the endpoint value to set. - */ - public RtspSource(String name, EndpointBase endpoint) { - super(name); - this.endpoint = endpoint; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the transport property: Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When using TCP, - * the RTP packets are interleaved on the TCP RTSP connection. When using HTTP, the RTSP messages are exchanged - * through long lived HTTP connections, and the RTP packages are interleaved in the HTTP connections alongside the - * RTSP messages. - * - * @return the transport value. - */ - public RtspTransport getTransport() { - return this.transport; - } - - /** - * Set the transport property: Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When using TCP, - * the RTP packets are interleaved on the TCP RTSP connection. When using HTTP, the RTSP messages are exchanged - * through long lived HTTP connections, and the RTP packages are interleaved in the HTTP connections alongside the - * RTSP messages. - * - * @param transport the transport value to set. - * @return the RtspSource object itself. - */ - public RtspSource setTransport(RtspTransport transport) { - this.transport = transport; - return this; - } - - /** - * Get the endpoint property: RTSP endpoint information for Video Analyzer to connect to. This contains the required - * information for Video Analyzer to connect to RTSP cameras and/or generic RTSP servers. - * - * @return the endpoint value. - */ - public EndpointBase getEndpoint() { - return this.endpoint; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeJsonField("endpoint", this.endpoint); - jsonWriter.writeStringField("@type", this.type); - jsonWriter.writeStringField("transport", this.transport == null ? null : this.transport.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RtspSource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RtspSource if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RtspSource. - */ - public static RtspSource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean endpointFound = false; - EndpointBase endpoint = null; - String type = "#Microsoft.VideoAnalyzer.RtspSource"; - RtspTransport transport = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("endpoint".equals(fieldName)) { - endpoint = EndpointBase.fromJson(reader); - endpointFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else if ("transport".equals(fieldName)) { - transport = RtspTransport.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - if (nameFound && endpointFound) { - RtspSource deserializedRtspSource = new RtspSource(name, endpoint); - deserializedRtspSource.type = type; - deserializedRtspSource.transport = transport; - - return deserializedRtspSource; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!endpointFound) { - missingProperties.add("endpoint"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RtspTransport.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RtspTransport.java deleted file mode 100644 index 0a0bf26a05cf..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/RtspTransport.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When using TCP, the RTP packets are interleaved - * on the TCP RTSP connection. When using HTTP, the RTSP messages are exchanged through long lived HTTP connections, and - * the RTP packages are interleaved in the HTTP connections alongside the RTSP messages. - */ -public final class RtspTransport extends ExpandableStringEnum { - /** - * HTTP transport. RTSP messages are exchanged over long running HTTP requests and RTP packets are interleaved - * within the HTTP channel. - */ - public static final RtspTransport HTTP = fromString("http"); - - /** - * TCP transport. RTSP is used directly over TCP and RTP packets are interleaved within the TCP channel. - */ - public static final RtspTransport TCP = fromString("tcp"); - - /** - * Creates a new instance of RtspTransport value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RtspTransport() { - } - - /** - * Creates or finds a RtspTransport from its string representation. - * - * @param name a name to look for. - * @return the corresponding RtspTransport. - */ - public static RtspTransport fromString(String name) { - return fromString(name, RtspTransport.class); - } - - /** - * Gets known RtspTransport values. - * - * @return known RtspTransport values. - */ - public static Collection values() { - return values(RtspTransport.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SamplingOptions.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SamplingOptions.java deleted file mode 100644 index 52de01ffd999..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SamplingOptions.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines how often media is submitted to the extension plugin. - */ -@Fluent -public final class SamplingOptions implements JsonSerializable { - /* - * When set to 'true', prevents frames without upstream inference data to be sent to the extension plugin. This is - * useful to limit the frames sent to the extension to pre-analyzed frames only. For example, when used downstream - * from a motion detector, this can enable for only frames in which motion has been detected to be further analyzed. - */ - private String skipSamplesWithoutAnnotation; - - /* - * Maximum rate of samples submitted to the extension. This prevents an extension plugin to be overloaded with data. - */ - private String maximumSamplesPerSecond; - - /** - * Creates an instance of SamplingOptions class. - */ - public SamplingOptions() { - } - - /** - * Get the skipSamplesWithoutAnnotation property: When set to 'true', prevents frames without upstream inference - * data to be sent to the extension plugin. This is useful to limit the frames sent to the extension to pre-analyzed - * frames only. For example, when used downstream from a motion detector, this can enable for only frames in which - * motion has been detected to be further analyzed. - * - * @return the skipSamplesWithoutAnnotation value. - */ - public String getSkipSamplesWithoutAnnotation() { - return this.skipSamplesWithoutAnnotation; - } - - /** - * Set the skipSamplesWithoutAnnotation property: When set to 'true', prevents frames without upstream inference - * data to be sent to the extension plugin. This is useful to limit the frames sent to the extension to pre-analyzed - * frames only. For example, when used downstream from a motion detector, this can enable for only frames in which - * motion has been detected to be further analyzed. - * - * @param skipSamplesWithoutAnnotation the skipSamplesWithoutAnnotation value to set. - * @return the SamplingOptions object itself. - */ - public SamplingOptions setSkipSamplesWithoutAnnotation(String skipSamplesWithoutAnnotation) { - this.skipSamplesWithoutAnnotation = skipSamplesWithoutAnnotation; - return this; - } - - /** - * Get the maximumSamplesPerSecond property: Maximum rate of samples submitted to the extension. This prevents an - * extension plugin to be overloaded with data. - * - * @return the maximumSamplesPerSecond value. - */ - public String getMaximumSamplesPerSecond() { - return this.maximumSamplesPerSecond; - } - - /** - * Set the maximumSamplesPerSecond property: Maximum rate of samples submitted to the extension. This prevents an - * extension plugin to be overloaded with data. - * - * @param maximumSamplesPerSecond the maximumSamplesPerSecond value to set. - * @return the SamplingOptions object itself. - */ - public SamplingOptions setMaximumSamplesPerSecond(String maximumSamplesPerSecond) { - this.maximumSamplesPerSecond = maximumSamplesPerSecond; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("skipSamplesWithoutAnnotation", this.skipSamplesWithoutAnnotation); - jsonWriter.writeStringField("maximumSamplesPerSecond", this.maximumSamplesPerSecond); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SamplingOptions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SamplingOptions if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SamplingOptions. - */ - public static SamplingOptions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SamplingOptions deserializedSamplingOptions = new SamplingOptions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("skipSamplesWithoutAnnotation".equals(fieldName)) { - deserializedSamplingOptions.skipSamplesWithoutAnnotation = reader.getString(); - } else if ("maximumSamplesPerSecond".equals(fieldName)) { - deserializedSamplingOptions.maximumSamplesPerSecond = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSamplingOptions; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SignalGateProcessor.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SignalGateProcessor.java deleted file mode 100644 index 1f532fe10bba..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SignalGateProcessor.java +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * A signal gate determines when to block (gate) incoming media, and when to allow it through. It gathers input events - * over the activationEvaluationWindow, and determines whether to open or close the gate. See - * https://aka.ms/ava-signalgate for more information. - */ -@Fluent -public final class SignalGateProcessor extends ProcessorNodeBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.SignalGateProcessor"; - - /* - * The period of time over which the gate gathers input events before evaluating them. - */ - private String activationEvaluationWindow; - - /* - * Signal offset once the gate is activated (can be negative). It determines the how much farther behind of after - * the signal will be let through based on the activation time. A negative offset indicates that data prior the - * activation time must be included on the signal that is let through, once the gate is activated. When used - * upstream of a file or video sink, this allows for scenarios such as recording buffered media prior an event, such - * as: record video 5 seconds prior motions is detected. - */ - private String activationSignalOffset; - - /* - * The minimum period for which the gate remains open in the absence of subsequent triggers (events). When used - * upstream of a file or video sink, it determines the minimum length of the recorded video clip. - */ - private String minimumActivationTime; - - /* - * The maximum period for which the gate remains open in the presence of subsequent triggers (events). When used - * upstream of a file or video sink, it determines the maximum length of the recorded video clip. - */ - private String maximumActivationTime; - - /** - * Creates an instance of SignalGateProcessor class. - * - * @param name the name value to set. - * @param inputs the inputs value to set. - */ - public SignalGateProcessor(String name, List inputs) { - super(name, inputs); - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the activationEvaluationWindow property: The period of time over which the gate gathers input events before - * evaluating them. - * - * @return the activationEvaluationWindow value. - */ - public String getActivationEvaluationWindow() { - return this.activationEvaluationWindow; - } - - /** - * Set the activationEvaluationWindow property: The period of time over which the gate gathers input events before - * evaluating them. - * - * @param activationEvaluationWindow the activationEvaluationWindow value to set. - * @return the SignalGateProcessor object itself. - */ - public SignalGateProcessor setActivationEvaluationWindow(String activationEvaluationWindow) { - this.activationEvaluationWindow = activationEvaluationWindow; - return this; - } - - /** - * Get the activationSignalOffset property: Signal offset once the gate is activated (can be negative). It - * determines the how much farther behind of after the signal will be let through based on the activation time. A - * negative offset indicates that data prior the activation time must be included on the signal that is let through, - * once the gate is activated. When used upstream of a file or video sink, this allows for scenarios such as - * recording buffered media prior an event, such as: record video 5 seconds prior motions is detected. - * - * @return the activationSignalOffset value. - */ - public String getActivationSignalOffset() { - return this.activationSignalOffset; - } - - /** - * Set the activationSignalOffset property: Signal offset once the gate is activated (can be negative). It - * determines the how much farther behind of after the signal will be let through based on the activation time. A - * negative offset indicates that data prior the activation time must be included on the signal that is let through, - * once the gate is activated. When used upstream of a file or video sink, this allows for scenarios such as - * recording buffered media prior an event, such as: record video 5 seconds prior motions is detected. - * - * @param activationSignalOffset the activationSignalOffset value to set. - * @return the SignalGateProcessor object itself. - */ - public SignalGateProcessor setActivationSignalOffset(String activationSignalOffset) { - this.activationSignalOffset = activationSignalOffset; - return this; - } - - /** - * Get the minimumActivationTime property: The minimum period for which the gate remains open in the absence of - * subsequent triggers (events). When used upstream of a file or video sink, it determines the minimum length of the - * recorded video clip. - * - * @return the minimumActivationTime value. - */ - public String getMinimumActivationTime() { - return this.minimumActivationTime; - } - - /** - * Set the minimumActivationTime property: The minimum period for which the gate remains open in the absence of - * subsequent triggers (events). When used upstream of a file or video sink, it determines the minimum length of the - * recorded video clip. - * - * @param minimumActivationTime the minimumActivationTime value to set. - * @return the SignalGateProcessor object itself. - */ - public SignalGateProcessor setMinimumActivationTime(String minimumActivationTime) { - this.minimumActivationTime = minimumActivationTime; - return this; - } - - /** - * Get the maximumActivationTime property: The maximum period for which the gate remains open in the presence of - * subsequent triggers (events). When used upstream of a file or video sink, it determines the maximum length of the - * recorded video clip. - * - * @return the maximumActivationTime value. - */ - public String getMaximumActivationTime() { - return this.maximumActivationTime; - } - - /** - * Set the maximumActivationTime property: The maximum period for which the gate remains open in the presence of - * subsequent triggers (events). When used upstream of a file or video sink, it determines the maximum length of the - * recorded video clip. - * - * @param maximumActivationTime the maximumActivationTime value to set. - * @return the SignalGateProcessor object itself. - */ - public SignalGateProcessor setMaximumActivationTime(String maximumActivationTime) { - this.maximumActivationTime = maximumActivationTime; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeArrayField("inputs", getInputs(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("@type", this.type); - jsonWriter.writeStringField("activationEvaluationWindow", this.activationEvaluationWindow); - jsonWriter.writeStringField("activationSignalOffset", this.activationSignalOffset); - jsonWriter.writeStringField("minimumActivationTime", this.minimumActivationTime); - jsonWriter.writeStringField("maximumActivationTime", this.maximumActivationTime); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SignalGateProcessor from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SignalGateProcessor if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SignalGateProcessor. - */ - public static SignalGateProcessor fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean inputsFound = false; - List inputs = null; - String type = "#Microsoft.VideoAnalyzer.SignalGateProcessor"; - String activationEvaluationWindow = null; - String activationSignalOffset = null; - String minimumActivationTime = null; - String maximumActivationTime = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("inputs".equals(fieldName)) { - inputs = reader.readArray(reader1 -> NodeInput.fromJson(reader1)); - inputsFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else if ("activationEvaluationWindow".equals(fieldName)) { - activationEvaluationWindow = reader.getString(); - } else if ("activationSignalOffset".equals(fieldName)) { - activationSignalOffset = reader.getString(); - } else if ("minimumActivationTime".equals(fieldName)) { - minimumActivationTime = reader.getString(); - } else if ("maximumActivationTime".equals(fieldName)) { - maximumActivationTime = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound && inputsFound) { - SignalGateProcessor deserializedSignalGateProcessor = new SignalGateProcessor(name, inputs); - deserializedSignalGateProcessor.type = type; - deserializedSignalGateProcessor.activationEvaluationWindow = activationEvaluationWindow; - deserializedSignalGateProcessor.activationSignalOffset = activationSignalOffset; - deserializedSignalGateProcessor.minimumActivationTime = minimumActivationTime; - deserializedSignalGateProcessor.maximumActivationTime = maximumActivationTime; - - return deserializedSignalGateProcessor; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!inputsFound) { - missingProperties.add("inputs"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SinkNodeBase.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SinkNodeBase.java deleted file mode 100644 index 06ac37297432..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SinkNodeBase.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Base class for topology sink nodes. - */ -@Immutable -public class SinkNodeBase implements JsonSerializable { - /* - * Type discriminator for the derived types. - */ - private String type = "SinkNodeBase"; - - /* - * Node name. Must be unique within the topology. - */ - private final String name; - - /* - * An array of upstream node references within the topology to be used as inputs for this node. - */ - private final List inputs; - - /** - * Creates an instance of SinkNodeBase class. - * - * @param name the name value to set. - * @param inputs the inputs value to set. - */ - public SinkNodeBase(String name, List inputs) { - this.name = name; - this.inputs = inputs; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - public String getType() { - return this.type; - } - - /** - * Get the name property: Node name. Must be unique within the topology. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * Get the inputs property: An array of upstream node references within the topology to be used as inputs for this - * node. - * - * @return the inputs value. - */ - public List getInputs() { - return this.inputs; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeArrayField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SinkNodeBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SinkNodeBase if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SinkNodeBase. - */ - public static SinkNodeBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("@type".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("#Microsoft.VideoAnalyzer.IotHubMessageSink".equals(discriminatorValue)) { - return IotHubMessageSink.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.FileSink".equals(discriminatorValue)) { - return FileSink.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.VideoSink".equals(discriminatorValue)) { - return VideoSink.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.AssetSink".equals(discriminatorValue)) { - return AssetSink.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static SinkNodeBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean inputsFound = false; - List inputs = null; - String type = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("inputs".equals(fieldName)) { - inputs = reader.readArray(reader1 -> NodeInput.fromJson(reader1)); - inputsFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound && inputsFound) { - SinkNodeBase deserializedSinkNodeBase = new SinkNodeBase(name, inputs); - deserializedSinkNodeBase.type = type; - - return deserializedSinkNodeBase; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!inputsFound) { - missingProperties.add("inputs"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SourceNodeBase.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SourceNodeBase.java deleted file mode 100644 index 2e8f4d218fb3..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SourceNodeBase.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base class for topology source nodes. - */ -@Immutable -public class SourceNodeBase implements JsonSerializable { - /* - * Type discriminator for the derived types. - */ - private String type = "SourceNodeBase"; - - /* - * Node name. Must be unique within the topology. - */ - private final String name; - - /** - * Creates an instance of SourceNodeBase class. - * - * @param name the name value to set. - */ - public SourceNodeBase(String name) { - this.name = name; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - public String getType() { - return this.type; - } - - /** - * Get the name property: Node name. Must be unique within the topology. - * - * @return the name value. - */ - public String getName() { - return this.name; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SourceNodeBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SourceNodeBase if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SourceNodeBase. - */ - public static SourceNodeBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("@type".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("#Microsoft.VideoAnalyzer.RtspSource".equals(discriminatorValue)) { - return RtspSource.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.IotHubMessageSource".equals(discriminatorValue)) { - return IotHubMessageSource.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static SourceNodeBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - String type = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (nameFound) { - SourceNodeBase deserializedSourceNodeBase = new SourceNodeBase(name); - deserializedSourceNodeBase.type = type; - - return deserializedSourceNodeBase; - } - throw new IllegalStateException("Missing required property: name"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisCustomOperation.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisCustomOperation.java deleted file mode 100644 index 8ebb0aeb084a..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisCustomOperation.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines a Spatial Analysis custom operation. This requires the Azure Cognitive Services Spatial analysis module to be - * deployed alongside the Video Analyzer module, please see https://aka.ms/ava-spatial-analysis for more information. - */ -@Immutable -public final class SpatialAnalysisCustomOperation extends SpatialAnalysisOperationBase { - /* - * The Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.SpatialAnalysisCustomOperation"; - - /* - * Custom configuration to pass to the Azure Cognitive Services Spatial Analysis module. - */ - private final String extensionConfiguration; - - /** - * Creates an instance of SpatialAnalysisCustomOperation class. - * - * @param extensionConfiguration the extensionConfiguration value to set. - */ - public SpatialAnalysisCustomOperation(String extensionConfiguration) { - this.extensionConfiguration = extensionConfiguration; - } - - /** - * Get the type property: The Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the extensionConfiguration property: Custom configuration to pass to the Azure Cognitive Services Spatial - * Analysis module. - * - * @return the extensionConfiguration value. - */ - public String getExtensionConfiguration() { - return this.extensionConfiguration; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("extensionConfiguration", this.extensionConfiguration); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpatialAnalysisCustomOperation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpatialAnalysisCustomOperation if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SpatialAnalysisCustomOperation. - */ - public static SpatialAnalysisCustomOperation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean extensionConfigurationFound = false; - String extensionConfiguration = null; - String type = "#Microsoft.VideoAnalyzer.SpatialAnalysisCustomOperation"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("extensionConfiguration".equals(fieldName)) { - extensionConfiguration = reader.getString(); - extensionConfigurationFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (extensionConfigurationFound) { - SpatialAnalysisCustomOperation deserializedSpatialAnalysisCustomOperation - = new SpatialAnalysisCustomOperation(extensionConfiguration); - deserializedSpatialAnalysisCustomOperation.type = type; - - return deserializedSpatialAnalysisCustomOperation; - } - throw new IllegalStateException("Missing required property: extensionConfiguration"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisOperationBase.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisOperationBase.java deleted file mode 100644 index b3cdd65ea49d..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisOperationBase.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base class for Azure Cognitive Services Spatial Analysis operations. - */ -@Immutable -public class SpatialAnalysisOperationBase implements JsonSerializable { - /* - * The Type discriminator for the derived types. - */ - private String type = "SpatialAnalysisOperationBase"; - - /** - * Creates an instance of SpatialAnalysisOperationBase class. - */ - public SpatialAnalysisOperationBase() { - } - - /** - * Get the type property: The Type discriminator for the derived types. - * - * @return the type value. - */ - public String getType() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpatialAnalysisOperationBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpatialAnalysisOperationBase if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SpatialAnalysisOperationBase. - */ - public static SpatialAnalysisOperationBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("@type".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("#Microsoft.VideoAnalyzer.SpatialAnalysisCustomOperation".equals(discriminatorValue)) { - return SpatialAnalysisCustomOperation.fromJson(readerToUse.reset()); - } else if ("SpatialAnalysisTypedOperationBase".equals(discriminatorValue)) { - return SpatialAnalysisTypedOperationBase.fromJsonKnownDiscriminator(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.SpatialAnalysisPersonCountOperation".equals(discriminatorValue)) { - return SpatialAnalysisPersonCountOperation.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.SpatialAnalysisPersonZoneCrossingOperation" - .equals(discriminatorValue)) { - return SpatialAnalysisPersonZoneCrossingOperation.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.SpatialAnalysisPersonDistanceOperation" - .equals(discriminatorValue)) { - return SpatialAnalysisPersonDistanceOperation.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.SpatialAnalysisPersonLineCrossingOperation" - .equals(discriminatorValue)) { - return SpatialAnalysisPersonLineCrossingOperation.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static SpatialAnalysisOperationBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SpatialAnalysisOperationBase deserializedSpatialAnalysisOperationBase = new SpatialAnalysisOperationBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("@type".equals(fieldName)) { - deserializedSpatialAnalysisOperationBase.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSpatialAnalysisOperationBase; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisOperationEventBase.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisOperationEventBase.java deleted file mode 100644 index 38614678ba2f..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisOperationEventBase.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines the Azure Cognitive Services Spatial Analysis operation eventing configuration. - */ -@Fluent -public class SpatialAnalysisOperationEventBase implements JsonSerializable { - /* - * The event threshold. - */ - private String threshold; - - /* - * The operation focus type. - */ - private SpatialAnalysisOperationFocus focus; - - /** - * Creates an instance of SpatialAnalysisOperationEventBase class. - */ - public SpatialAnalysisOperationEventBase() { - } - - /** - * Get the threshold property: The event threshold. - * - * @return the threshold value. - */ - public String getThreshold() { - return this.threshold; - } - - /** - * Set the threshold property: The event threshold. - * - * @param threshold the threshold value to set. - * @return the SpatialAnalysisOperationEventBase object itself. - */ - public SpatialAnalysisOperationEventBase setThreshold(String threshold) { - this.threshold = threshold; - return this; - } - - /** - * Get the focus property: The operation focus type. - * - * @return the focus value. - */ - public SpatialAnalysisOperationFocus getFocus() { - return this.focus; - } - - /** - * Set the focus property: The operation focus type. - * - * @param focus the focus value to set. - * @return the SpatialAnalysisOperationEventBase object itself. - */ - public SpatialAnalysisOperationEventBase setFocus(SpatialAnalysisOperationFocus focus) { - this.focus = focus; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("threshold", this.threshold); - jsonWriter.writeStringField("focus", this.focus == null ? null : this.focus.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpatialAnalysisOperationEventBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpatialAnalysisOperationEventBase if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SpatialAnalysisOperationEventBase. - */ - public static SpatialAnalysisOperationEventBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SpatialAnalysisOperationEventBase deserializedSpatialAnalysisOperationEventBase - = new SpatialAnalysisOperationEventBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("threshold".equals(fieldName)) { - deserializedSpatialAnalysisOperationEventBase.threshold = reader.getString(); - } else if ("focus".equals(fieldName)) { - deserializedSpatialAnalysisOperationEventBase.focus - = SpatialAnalysisOperationFocus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSpatialAnalysisOperationEventBase; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisOperationFocus.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisOperationFocus.java deleted file mode 100644 index 5e71886ca27e..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisOperationFocus.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The operation focus type. - */ -public final class SpatialAnalysisOperationFocus extends ExpandableStringEnum { - /** - * The center of the object. - */ - public static final SpatialAnalysisOperationFocus CENTER = fromString("center"); - - /** - * The bottom center of the object. - */ - public static final SpatialAnalysisOperationFocus BOTTOM_CENTER = fromString("bottomCenter"); - - /** - * The footprint. - */ - public static final SpatialAnalysisOperationFocus FOOTPRINT = fromString("footprint"); - - /** - * Creates a new instance of SpatialAnalysisOperationFocus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SpatialAnalysisOperationFocus() { - } - - /** - * Creates or finds a SpatialAnalysisOperationFocus from its string representation. - * - * @param name a name to look for. - * @return the corresponding SpatialAnalysisOperationFocus. - */ - public static SpatialAnalysisOperationFocus fromString(String name) { - return fromString(name, SpatialAnalysisOperationFocus.class); - } - - /** - * Gets known SpatialAnalysisOperationFocus values. - * - * @return known SpatialAnalysisOperationFocus values. - */ - public static Collection values() { - return values(SpatialAnalysisOperationFocus.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonCountEvent.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonCountEvent.java deleted file mode 100644 index d9aac439d058..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonCountEvent.java +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines a Spatial Analysis person count operation eventing configuration. - */ -@Fluent -public final class SpatialAnalysisPersonCountEvent extends SpatialAnalysisOperationEventBase { - /* - * The event trigger type. - */ - private SpatialAnalysisPersonCountEventTrigger trigger; - - /* - * The event or interval output frequency. - */ - private String outputFrequency; - - /** - * Creates an instance of SpatialAnalysisPersonCountEvent class. - */ - public SpatialAnalysisPersonCountEvent() { - } - - /** - * Get the trigger property: The event trigger type. - * - * @return the trigger value. - */ - public SpatialAnalysisPersonCountEventTrigger getTrigger() { - return this.trigger; - } - - /** - * Set the trigger property: The event trigger type. - * - * @param trigger the trigger value to set. - * @return the SpatialAnalysisPersonCountEvent object itself. - */ - public SpatialAnalysisPersonCountEvent setTrigger(SpatialAnalysisPersonCountEventTrigger trigger) { - this.trigger = trigger; - return this; - } - - /** - * Get the outputFrequency property: The event or interval output frequency. - * - * @return the outputFrequency value. - */ - public String getOutputFrequency() { - return this.outputFrequency; - } - - /** - * Set the outputFrequency property: The event or interval output frequency. - * - * @param outputFrequency the outputFrequency value to set. - * @return the SpatialAnalysisPersonCountEvent object itself. - */ - public SpatialAnalysisPersonCountEvent setOutputFrequency(String outputFrequency) { - this.outputFrequency = outputFrequency; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonCountEvent setThreshold(String threshold) { - super.setThreshold(threshold); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonCountEvent setFocus(SpatialAnalysisOperationFocus focus) { - super.setFocus(focus); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("threshold", getThreshold()); - jsonWriter.writeStringField("focus", getFocus() == null ? null : getFocus().toString()); - jsonWriter.writeStringField("trigger", this.trigger == null ? null : this.trigger.toString()); - jsonWriter.writeStringField("outputFrequency", this.outputFrequency); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpatialAnalysisPersonCountEvent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpatialAnalysisPersonCountEvent if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SpatialAnalysisPersonCountEvent. - */ - public static SpatialAnalysisPersonCountEvent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SpatialAnalysisPersonCountEvent deserializedSpatialAnalysisPersonCountEvent - = new SpatialAnalysisPersonCountEvent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("threshold".equals(fieldName)) { - deserializedSpatialAnalysisPersonCountEvent.setThreshold(reader.getString()); - } else if ("focus".equals(fieldName)) { - deserializedSpatialAnalysisPersonCountEvent - .setFocus(SpatialAnalysisOperationFocus.fromString(reader.getString())); - } else if ("trigger".equals(fieldName)) { - deserializedSpatialAnalysisPersonCountEvent.trigger - = SpatialAnalysisPersonCountEventTrigger.fromString(reader.getString()); - } else if ("outputFrequency".equals(fieldName)) { - deserializedSpatialAnalysisPersonCountEvent.outputFrequency = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSpatialAnalysisPersonCountEvent; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonCountEventTrigger.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonCountEventTrigger.java deleted file mode 100644 index f0bffd41a6a5..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonCountEventTrigger.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The event trigger type. - */ -public final class SpatialAnalysisPersonCountEventTrigger - extends ExpandableStringEnum { - /** - * Event trigger. - */ - public static final SpatialAnalysisPersonCountEventTrigger EVENT = fromString("event"); - - /** - * Interval trigger. - */ - public static final SpatialAnalysisPersonCountEventTrigger INTERVAL = fromString("interval"); - - /** - * Creates a new instance of SpatialAnalysisPersonCountEventTrigger value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SpatialAnalysisPersonCountEventTrigger() { - } - - /** - * Creates or finds a SpatialAnalysisPersonCountEventTrigger from its string representation. - * - * @param name a name to look for. - * @return the corresponding SpatialAnalysisPersonCountEventTrigger. - */ - public static SpatialAnalysisPersonCountEventTrigger fromString(String name) { - return fromString(name, SpatialAnalysisPersonCountEventTrigger.class); - } - - /** - * Gets known SpatialAnalysisPersonCountEventTrigger values. - * - * @return known SpatialAnalysisPersonCountEventTrigger values. - */ - public static Collection values() { - return values(SpatialAnalysisPersonCountEventTrigger.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonCountOperation.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonCountOperation.java deleted file mode 100644 index a7b015d5b966..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonCountOperation.java +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Defines a Spatial Analysis person count operation. This requires the Azure Cognitive Services Spatial analysis module - * to be deployed alongside the Video Analyzer module, please see https://aka.ms/ava-spatial-analysis for more - * information. - */ -@Fluent -public final class SpatialAnalysisPersonCountOperation extends SpatialAnalysisTypedOperationBase { - /* - * The Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonCountOperation"; - - /* - * The list of zones and optional events. - */ - private final List zones; - - /** - * Creates an instance of SpatialAnalysisPersonCountOperation class. - * - * @param zones the zones value to set. - */ - public SpatialAnalysisPersonCountOperation(List zones) { - this.zones = zones; - } - - /** - * Get the type property: The Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the zones property: The list of zones and optional events. - * - * @return the zones value. - */ - public List getZones() { - return this.zones; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonCountOperation setDebug(String debug) { - super.setDebug(debug); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonCountOperation setCalibrationConfiguration(String calibrationConfiguration) { - super.setCalibrationConfiguration(calibrationConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonCountOperation setCameraConfiguration(String cameraConfiguration) { - super.setCameraConfiguration(cameraConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonCountOperation - setCameraCalibratorNodeConfiguration(String cameraCalibratorNodeConfiguration) { - super.setCameraCalibratorNodeConfiguration(cameraCalibratorNodeConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonCountOperation setDetectorNodeConfiguration(String detectorNodeConfiguration) { - super.setDetectorNodeConfiguration(detectorNodeConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonCountOperation setTrackerNodeConfiguration(String trackerNodeConfiguration) { - super.setTrackerNodeConfiguration(trackerNodeConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonCountOperation setEnableFaceMaskClassifier(String enableFaceMaskClassifier) { - super.setEnableFaceMaskClassifier(enableFaceMaskClassifier); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("debug", getDebug()); - jsonWriter.writeStringField("calibrationConfiguration", getCalibrationConfiguration()); - jsonWriter.writeStringField("cameraConfiguration", getCameraConfiguration()); - jsonWriter.writeStringField("cameraCalibratorNodeConfiguration", getCameraCalibratorNodeConfiguration()); - jsonWriter.writeStringField("detectorNodeConfiguration", getDetectorNodeConfiguration()); - jsonWriter.writeStringField("trackerNodeConfiguration", getTrackerNodeConfiguration()); - jsonWriter.writeStringField("enableFaceMaskClassifier", getEnableFaceMaskClassifier()); - jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpatialAnalysisPersonCountOperation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpatialAnalysisPersonCountOperation if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SpatialAnalysisPersonCountOperation. - */ - public static SpatialAnalysisPersonCountOperation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String debug = null; - String calibrationConfiguration = null; - String cameraConfiguration = null; - String cameraCalibratorNodeConfiguration = null; - String detectorNodeConfiguration = null; - String trackerNodeConfiguration = null; - String enableFaceMaskClassifier = null; - boolean zonesFound = false; - List zones = null; - String type = "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonCountOperation"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("debug".equals(fieldName)) { - debug = reader.getString(); - } else if ("calibrationConfiguration".equals(fieldName)) { - calibrationConfiguration = reader.getString(); - } else if ("cameraConfiguration".equals(fieldName)) { - cameraConfiguration = reader.getString(); - } else if ("cameraCalibratorNodeConfiguration".equals(fieldName)) { - cameraCalibratorNodeConfiguration = reader.getString(); - } else if ("detectorNodeConfiguration".equals(fieldName)) { - detectorNodeConfiguration = reader.getString(); - } else if ("trackerNodeConfiguration".equals(fieldName)) { - trackerNodeConfiguration = reader.getString(); - } else if ("enableFaceMaskClassifier".equals(fieldName)) { - enableFaceMaskClassifier = reader.getString(); - } else if ("zones".equals(fieldName)) { - zones = reader.readArray(reader1 -> SpatialAnalysisPersonCountZoneEvents.fromJson(reader1)); - zonesFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (zonesFound) { - SpatialAnalysisPersonCountOperation deserializedSpatialAnalysisPersonCountOperation - = new SpatialAnalysisPersonCountOperation(zones); - deserializedSpatialAnalysisPersonCountOperation.setDebug(debug); - deserializedSpatialAnalysisPersonCountOperation.setCalibrationConfiguration(calibrationConfiguration); - deserializedSpatialAnalysisPersonCountOperation.setCameraConfiguration(cameraConfiguration); - deserializedSpatialAnalysisPersonCountOperation - .setCameraCalibratorNodeConfiguration(cameraCalibratorNodeConfiguration); - deserializedSpatialAnalysisPersonCountOperation.setDetectorNodeConfiguration(detectorNodeConfiguration); - deserializedSpatialAnalysisPersonCountOperation.setTrackerNodeConfiguration(trackerNodeConfiguration); - deserializedSpatialAnalysisPersonCountOperation.setEnableFaceMaskClassifier(enableFaceMaskClassifier); - deserializedSpatialAnalysisPersonCountOperation.type = type; - - return deserializedSpatialAnalysisPersonCountOperation; - } - throw new IllegalStateException("Missing required property: zones"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonCountZoneEvents.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonCountZoneEvents.java deleted file mode 100644 index c685f2f74f6a..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonCountZoneEvents.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The SpatialAnalysisPersonCountZoneEvents model. - */ -@Fluent -public final class SpatialAnalysisPersonCountZoneEvents - implements JsonSerializable { - /* - * The named zone. - */ - private final NamedPolygonBase zone; - - /* - * The event configuration. - */ - private List events; - - /** - * Creates an instance of SpatialAnalysisPersonCountZoneEvents class. - * - * @param zone the zone value to set. - */ - public SpatialAnalysisPersonCountZoneEvents(NamedPolygonBase zone) { - this.zone = zone; - } - - /** - * Get the zone property: The named zone. - * - * @return the zone value. - */ - public NamedPolygonBase getZone() { - return this.zone; - } - - /** - * Get the events property: The event configuration. - * - * @return the events value. - */ - public List getEvents() { - return this.events; - } - - /** - * Set the events property: The event configuration. - * - * @param events the events value to set. - * @return the SpatialAnalysisPersonCountZoneEvents object itself. - */ - public SpatialAnalysisPersonCountZoneEvents setEvents(List events) { - this.events = events; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("zone", this.zone); - jsonWriter.writeArrayField("events", this.events, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpatialAnalysisPersonCountZoneEvents from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpatialAnalysisPersonCountZoneEvents if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SpatialAnalysisPersonCountZoneEvents. - */ - public static SpatialAnalysisPersonCountZoneEvents fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean zoneFound = false; - NamedPolygonBase zone = null; - List events = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("zone".equals(fieldName)) { - zone = NamedPolygonBase.fromJson(reader); - zoneFound = true; - } else if ("events".equals(fieldName)) { - events = reader.readArray(reader1 -> SpatialAnalysisPersonCountEvent.fromJson(reader1)); - } else { - reader.skipChildren(); - } - } - if (zoneFound) { - SpatialAnalysisPersonCountZoneEvents deserializedSpatialAnalysisPersonCountZoneEvents - = new SpatialAnalysisPersonCountZoneEvents(zone); - deserializedSpatialAnalysisPersonCountZoneEvents.events = events; - - return deserializedSpatialAnalysisPersonCountZoneEvents; - } - throw new IllegalStateException("Missing required property: zone"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonDistanceEvent.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonDistanceEvent.java deleted file mode 100644 index d4d582094b20..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonDistanceEvent.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines a Spatial Analysis person distance operation eventing configuration. - */ -@Fluent -public final class SpatialAnalysisPersonDistanceEvent extends SpatialAnalysisOperationEventBase { - /* - * The event trigger type. - */ - private SpatialAnalysisPersonDistanceEventTrigger trigger; - - /* - * The event or interval output frequency. - */ - private String outputFrequency; - - /* - * The minimum distance threshold - */ - private String minimumDistanceThreshold; - - /* - * The maximum distance threshold - */ - private String maximumDistanceThreshold; - - /** - * Creates an instance of SpatialAnalysisPersonDistanceEvent class. - */ - public SpatialAnalysisPersonDistanceEvent() { - } - - /** - * Get the trigger property: The event trigger type. - * - * @return the trigger value. - */ - public SpatialAnalysisPersonDistanceEventTrigger getTrigger() { - return this.trigger; - } - - /** - * Set the trigger property: The event trigger type. - * - * @param trigger the trigger value to set. - * @return the SpatialAnalysisPersonDistanceEvent object itself. - */ - public SpatialAnalysisPersonDistanceEvent setTrigger(SpatialAnalysisPersonDistanceEventTrigger trigger) { - this.trigger = trigger; - return this; - } - - /** - * Get the outputFrequency property: The event or interval output frequency. - * - * @return the outputFrequency value. - */ - public String getOutputFrequency() { - return this.outputFrequency; - } - - /** - * Set the outputFrequency property: The event or interval output frequency. - * - * @param outputFrequency the outputFrequency value to set. - * @return the SpatialAnalysisPersonDistanceEvent object itself. - */ - public SpatialAnalysisPersonDistanceEvent setOutputFrequency(String outputFrequency) { - this.outputFrequency = outputFrequency; - return this; - } - - /** - * Get the minimumDistanceThreshold property: The minimum distance threshold. - * - * @return the minimumDistanceThreshold value. - */ - public String getMinimumDistanceThreshold() { - return this.minimumDistanceThreshold; - } - - /** - * Set the minimumDistanceThreshold property: The minimum distance threshold. - * - * @param minimumDistanceThreshold the minimumDistanceThreshold value to set. - * @return the SpatialAnalysisPersonDistanceEvent object itself. - */ - public SpatialAnalysisPersonDistanceEvent setMinimumDistanceThreshold(String minimumDistanceThreshold) { - this.minimumDistanceThreshold = minimumDistanceThreshold; - return this; - } - - /** - * Get the maximumDistanceThreshold property: The maximum distance threshold. - * - * @return the maximumDistanceThreshold value. - */ - public String getMaximumDistanceThreshold() { - return this.maximumDistanceThreshold; - } - - /** - * Set the maximumDistanceThreshold property: The maximum distance threshold. - * - * @param maximumDistanceThreshold the maximumDistanceThreshold value to set. - * @return the SpatialAnalysisPersonDistanceEvent object itself. - */ - public SpatialAnalysisPersonDistanceEvent setMaximumDistanceThreshold(String maximumDistanceThreshold) { - this.maximumDistanceThreshold = maximumDistanceThreshold; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonDistanceEvent setThreshold(String threshold) { - super.setThreshold(threshold); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonDistanceEvent setFocus(SpatialAnalysisOperationFocus focus) { - super.setFocus(focus); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("threshold", getThreshold()); - jsonWriter.writeStringField("focus", getFocus() == null ? null : getFocus().toString()); - jsonWriter.writeStringField("trigger", this.trigger == null ? null : this.trigger.toString()); - jsonWriter.writeStringField("outputFrequency", this.outputFrequency); - jsonWriter.writeStringField("minimumDistanceThreshold", this.minimumDistanceThreshold); - jsonWriter.writeStringField("maximumDistanceThreshold", this.maximumDistanceThreshold); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpatialAnalysisPersonDistanceEvent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpatialAnalysisPersonDistanceEvent if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SpatialAnalysisPersonDistanceEvent. - */ - public static SpatialAnalysisPersonDistanceEvent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SpatialAnalysisPersonDistanceEvent deserializedSpatialAnalysisPersonDistanceEvent - = new SpatialAnalysisPersonDistanceEvent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("threshold".equals(fieldName)) { - deserializedSpatialAnalysisPersonDistanceEvent.setThreshold(reader.getString()); - } else if ("focus".equals(fieldName)) { - deserializedSpatialAnalysisPersonDistanceEvent - .setFocus(SpatialAnalysisOperationFocus.fromString(reader.getString())); - } else if ("trigger".equals(fieldName)) { - deserializedSpatialAnalysisPersonDistanceEvent.trigger - = SpatialAnalysisPersonDistanceEventTrigger.fromString(reader.getString()); - } else if ("outputFrequency".equals(fieldName)) { - deserializedSpatialAnalysisPersonDistanceEvent.outputFrequency = reader.getString(); - } else if ("minimumDistanceThreshold".equals(fieldName)) { - deserializedSpatialAnalysisPersonDistanceEvent.minimumDistanceThreshold = reader.getString(); - } else if ("maximumDistanceThreshold".equals(fieldName)) { - deserializedSpatialAnalysisPersonDistanceEvent.maximumDistanceThreshold = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSpatialAnalysisPersonDistanceEvent; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonDistanceEventTrigger.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonDistanceEventTrigger.java deleted file mode 100644 index d47db9d7c433..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonDistanceEventTrigger.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The event trigger type. - */ -public final class SpatialAnalysisPersonDistanceEventTrigger - extends ExpandableStringEnum { - /** - * Event trigger. - */ - public static final SpatialAnalysisPersonDistanceEventTrigger EVENT = fromString("event"); - - /** - * Interval trigger. - */ - public static final SpatialAnalysisPersonDistanceEventTrigger INTERVAL = fromString("interval"); - - /** - * Creates a new instance of SpatialAnalysisPersonDistanceEventTrigger value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SpatialAnalysisPersonDistanceEventTrigger() { - } - - /** - * Creates or finds a SpatialAnalysisPersonDistanceEventTrigger from its string representation. - * - * @param name a name to look for. - * @return the corresponding SpatialAnalysisPersonDistanceEventTrigger. - */ - public static SpatialAnalysisPersonDistanceEventTrigger fromString(String name) { - return fromString(name, SpatialAnalysisPersonDistanceEventTrigger.class); - } - - /** - * Gets known SpatialAnalysisPersonDistanceEventTrigger values. - * - * @return known SpatialAnalysisPersonDistanceEventTrigger values. - */ - public static Collection values() { - return values(SpatialAnalysisPersonDistanceEventTrigger.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonDistanceOperation.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonDistanceOperation.java deleted file mode 100644 index 2568cefba335..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonDistanceOperation.java +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Defines a Spatial Analysis person distance operation. This requires the Azure Cognitive Services Spatial analysis - * module to be deployed alongside the Video Analyzer module, please see https://aka.ms/ava-spatial-analysis for more - * information. - */ -@Fluent -public final class SpatialAnalysisPersonDistanceOperation extends SpatialAnalysisTypedOperationBase { - /* - * The Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonDistanceOperation"; - - /* - * The list of zones with optional events. - */ - private final List zones; - - /** - * Creates an instance of SpatialAnalysisPersonDistanceOperation class. - * - * @param zones the zones value to set. - */ - public SpatialAnalysisPersonDistanceOperation(List zones) { - this.zones = zones; - } - - /** - * Get the type property: The Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the zones property: The list of zones with optional events. - * - * @return the zones value. - */ - public List getZones() { - return this.zones; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonDistanceOperation setDebug(String debug) { - super.setDebug(debug); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonDistanceOperation setCalibrationConfiguration(String calibrationConfiguration) { - super.setCalibrationConfiguration(calibrationConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonDistanceOperation setCameraConfiguration(String cameraConfiguration) { - super.setCameraConfiguration(cameraConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonDistanceOperation - setCameraCalibratorNodeConfiguration(String cameraCalibratorNodeConfiguration) { - super.setCameraCalibratorNodeConfiguration(cameraCalibratorNodeConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonDistanceOperation setDetectorNodeConfiguration(String detectorNodeConfiguration) { - super.setDetectorNodeConfiguration(detectorNodeConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonDistanceOperation setTrackerNodeConfiguration(String trackerNodeConfiguration) { - super.setTrackerNodeConfiguration(trackerNodeConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonDistanceOperation setEnableFaceMaskClassifier(String enableFaceMaskClassifier) { - super.setEnableFaceMaskClassifier(enableFaceMaskClassifier); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("debug", getDebug()); - jsonWriter.writeStringField("calibrationConfiguration", getCalibrationConfiguration()); - jsonWriter.writeStringField("cameraConfiguration", getCameraConfiguration()); - jsonWriter.writeStringField("cameraCalibratorNodeConfiguration", getCameraCalibratorNodeConfiguration()); - jsonWriter.writeStringField("detectorNodeConfiguration", getDetectorNodeConfiguration()); - jsonWriter.writeStringField("trackerNodeConfiguration", getTrackerNodeConfiguration()); - jsonWriter.writeStringField("enableFaceMaskClassifier", getEnableFaceMaskClassifier()); - jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpatialAnalysisPersonDistanceOperation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpatialAnalysisPersonDistanceOperation if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SpatialAnalysisPersonDistanceOperation. - */ - public static SpatialAnalysisPersonDistanceOperation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String debug = null; - String calibrationConfiguration = null; - String cameraConfiguration = null; - String cameraCalibratorNodeConfiguration = null; - String detectorNodeConfiguration = null; - String trackerNodeConfiguration = null; - String enableFaceMaskClassifier = null; - boolean zonesFound = false; - List zones = null; - String type = "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonDistanceOperation"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("debug".equals(fieldName)) { - debug = reader.getString(); - } else if ("calibrationConfiguration".equals(fieldName)) { - calibrationConfiguration = reader.getString(); - } else if ("cameraConfiguration".equals(fieldName)) { - cameraConfiguration = reader.getString(); - } else if ("cameraCalibratorNodeConfiguration".equals(fieldName)) { - cameraCalibratorNodeConfiguration = reader.getString(); - } else if ("detectorNodeConfiguration".equals(fieldName)) { - detectorNodeConfiguration = reader.getString(); - } else if ("trackerNodeConfiguration".equals(fieldName)) { - trackerNodeConfiguration = reader.getString(); - } else if ("enableFaceMaskClassifier".equals(fieldName)) { - enableFaceMaskClassifier = reader.getString(); - } else if ("zones".equals(fieldName)) { - zones = reader.readArray(reader1 -> SpatialAnalysisPersonDistanceZoneEvents.fromJson(reader1)); - zonesFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (zonesFound) { - SpatialAnalysisPersonDistanceOperation deserializedSpatialAnalysisPersonDistanceOperation - = new SpatialAnalysisPersonDistanceOperation(zones); - deserializedSpatialAnalysisPersonDistanceOperation.setDebug(debug); - deserializedSpatialAnalysisPersonDistanceOperation - .setCalibrationConfiguration(calibrationConfiguration); - deserializedSpatialAnalysisPersonDistanceOperation.setCameraConfiguration(cameraConfiguration); - deserializedSpatialAnalysisPersonDistanceOperation - .setCameraCalibratorNodeConfiguration(cameraCalibratorNodeConfiguration); - deserializedSpatialAnalysisPersonDistanceOperation - .setDetectorNodeConfiguration(detectorNodeConfiguration); - deserializedSpatialAnalysisPersonDistanceOperation - .setTrackerNodeConfiguration(trackerNodeConfiguration); - deserializedSpatialAnalysisPersonDistanceOperation - .setEnableFaceMaskClassifier(enableFaceMaskClassifier); - deserializedSpatialAnalysisPersonDistanceOperation.type = type; - - return deserializedSpatialAnalysisPersonDistanceOperation; - } - throw new IllegalStateException("Missing required property: zones"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonDistanceZoneEvents.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonDistanceZoneEvents.java deleted file mode 100644 index 88cbf2d16f01..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonDistanceZoneEvents.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The SpatialAnalysisPersonDistanceZoneEvents model. - */ -@Fluent -public final class SpatialAnalysisPersonDistanceZoneEvents - implements JsonSerializable { - /* - * The named zone. - */ - private final NamedPolygonBase zone; - - /* - * The event configuration. - */ - private List events; - - /** - * Creates an instance of SpatialAnalysisPersonDistanceZoneEvents class. - * - * @param zone the zone value to set. - */ - public SpatialAnalysisPersonDistanceZoneEvents(NamedPolygonBase zone) { - this.zone = zone; - } - - /** - * Get the zone property: The named zone. - * - * @return the zone value. - */ - public NamedPolygonBase getZone() { - return this.zone; - } - - /** - * Get the events property: The event configuration. - * - * @return the events value. - */ - public List getEvents() { - return this.events; - } - - /** - * Set the events property: The event configuration. - * - * @param events the events value to set. - * @return the SpatialAnalysisPersonDistanceZoneEvents object itself. - */ - public SpatialAnalysisPersonDistanceZoneEvents setEvents(List events) { - this.events = events; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("zone", this.zone); - jsonWriter.writeArrayField("events", this.events, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpatialAnalysisPersonDistanceZoneEvents from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpatialAnalysisPersonDistanceZoneEvents if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SpatialAnalysisPersonDistanceZoneEvents. - */ - public static SpatialAnalysisPersonDistanceZoneEvents fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean zoneFound = false; - NamedPolygonBase zone = null; - List events = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("zone".equals(fieldName)) { - zone = NamedPolygonBase.fromJson(reader); - zoneFound = true; - } else if ("events".equals(fieldName)) { - events = reader.readArray(reader1 -> SpatialAnalysisPersonDistanceEvent.fromJson(reader1)); - } else { - reader.skipChildren(); - } - } - if (zoneFound) { - SpatialAnalysisPersonDistanceZoneEvents deserializedSpatialAnalysisPersonDistanceZoneEvents - = new SpatialAnalysisPersonDistanceZoneEvents(zone); - deserializedSpatialAnalysisPersonDistanceZoneEvents.events = events; - - return deserializedSpatialAnalysisPersonDistanceZoneEvents; - } - throw new IllegalStateException("Missing required property: zone"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonLineCrossingEvent.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonLineCrossingEvent.java deleted file mode 100644 index f3f57ebc51fd..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonLineCrossingEvent.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines a Spatial Analysis person line crossing operation eventing configuration. - */ -@Fluent -public final class SpatialAnalysisPersonLineCrossingEvent extends SpatialAnalysisOperationEventBase { - /** - * Creates an instance of SpatialAnalysisPersonLineCrossingEvent class. - */ - public SpatialAnalysisPersonLineCrossingEvent() { - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonLineCrossingEvent setThreshold(String threshold) { - super.setThreshold(threshold); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonLineCrossingEvent setFocus(SpatialAnalysisOperationFocus focus) { - super.setFocus(focus); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("threshold", getThreshold()); - jsonWriter.writeStringField("focus", getFocus() == null ? null : getFocus().toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpatialAnalysisPersonLineCrossingEvent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpatialAnalysisPersonLineCrossingEvent if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SpatialAnalysisPersonLineCrossingEvent. - */ - public static SpatialAnalysisPersonLineCrossingEvent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SpatialAnalysisPersonLineCrossingEvent deserializedSpatialAnalysisPersonLineCrossingEvent - = new SpatialAnalysisPersonLineCrossingEvent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("threshold".equals(fieldName)) { - deserializedSpatialAnalysisPersonLineCrossingEvent.setThreshold(reader.getString()); - } else if ("focus".equals(fieldName)) { - deserializedSpatialAnalysisPersonLineCrossingEvent - .setFocus(SpatialAnalysisOperationFocus.fromString(reader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedSpatialAnalysisPersonLineCrossingEvent; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonLineCrossingLineEvents.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonLineCrossingLineEvents.java deleted file mode 100644 index 6295cbb0613a..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonLineCrossingLineEvents.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The SpatialAnalysisPersonLineCrossingLineEvents model. - */ -@Fluent -public final class SpatialAnalysisPersonLineCrossingLineEvents - implements JsonSerializable { - /* - * The named line. - */ - private final NamedLineBase line; - - /* - * The event configuration. - */ - private List events; - - /** - * Creates an instance of SpatialAnalysisPersonLineCrossingLineEvents class. - * - * @param line the line value to set. - */ - public SpatialAnalysisPersonLineCrossingLineEvents(NamedLineBase line) { - this.line = line; - } - - /** - * Get the line property: The named line. - * - * @return the line value. - */ - public NamedLineBase getLine() { - return this.line; - } - - /** - * Get the events property: The event configuration. - * - * @return the events value. - */ - public List getEvents() { - return this.events; - } - - /** - * Set the events property: The event configuration. - * - * @param events the events value to set. - * @return the SpatialAnalysisPersonLineCrossingLineEvents object itself. - */ - public SpatialAnalysisPersonLineCrossingLineEvents setEvents(List events) { - this.events = events; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("line", this.line); - jsonWriter.writeArrayField("events", this.events, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpatialAnalysisPersonLineCrossingLineEvents from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpatialAnalysisPersonLineCrossingLineEvents if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SpatialAnalysisPersonLineCrossingLineEvents. - */ - public static SpatialAnalysisPersonLineCrossingLineEvents fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean lineFound = false; - NamedLineBase line = null; - List events = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("line".equals(fieldName)) { - line = NamedLineBase.fromJson(reader); - lineFound = true; - } else if ("events".equals(fieldName)) { - events = reader.readArray(reader1 -> SpatialAnalysisPersonLineCrossingEvent.fromJson(reader1)); - } else { - reader.skipChildren(); - } - } - if (lineFound) { - SpatialAnalysisPersonLineCrossingLineEvents deserializedSpatialAnalysisPersonLineCrossingLineEvents - = new SpatialAnalysisPersonLineCrossingLineEvents(line); - deserializedSpatialAnalysisPersonLineCrossingLineEvents.events = events; - - return deserializedSpatialAnalysisPersonLineCrossingLineEvents; - } - throw new IllegalStateException("Missing required property: line"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonLineCrossingOperation.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonLineCrossingOperation.java deleted file mode 100644 index 0c6912115ef5..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonLineCrossingOperation.java +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Defines a Spatial Analysis person line crossing operation. This requires the Azure Cognitive Services Spatial - * analysis module to be deployed alongside the Video Analyzer module, please see https://aka.ms/ava-spatial-analysis - * for more information. - */ -@Fluent -public final class SpatialAnalysisPersonLineCrossingOperation extends SpatialAnalysisTypedOperationBase { - /* - * The Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonLineCrossingOperation"; - - /* - * The list of lines with optional events. - */ - private final List lines; - - /** - * Creates an instance of SpatialAnalysisPersonLineCrossingOperation class. - * - * @param lines the lines value to set. - */ - public SpatialAnalysisPersonLineCrossingOperation(List lines) { - this.lines = lines; - } - - /** - * Get the type property: The Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the lines property: The list of lines with optional events. - * - * @return the lines value. - */ - public List getLines() { - return this.lines; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonLineCrossingOperation setDebug(String debug) { - super.setDebug(debug); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonLineCrossingOperation setCalibrationConfiguration(String calibrationConfiguration) { - super.setCalibrationConfiguration(calibrationConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonLineCrossingOperation setCameraConfiguration(String cameraConfiguration) { - super.setCameraConfiguration(cameraConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonLineCrossingOperation - setCameraCalibratorNodeConfiguration(String cameraCalibratorNodeConfiguration) { - super.setCameraCalibratorNodeConfiguration(cameraCalibratorNodeConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonLineCrossingOperation setDetectorNodeConfiguration(String detectorNodeConfiguration) { - super.setDetectorNodeConfiguration(detectorNodeConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonLineCrossingOperation setTrackerNodeConfiguration(String trackerNodeConfiguration) { - super.setTrackerNodeConfiguration(trackerNodeConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonLineCrossingOperation setEnableFaceMaskClassifier(String enableFaceMaskClassifier) { - super.setEnableFaceMaskClassifier(enableFaceMaskClassifier); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("debug", getDebug()); - jsonWriter.writeStringField("calibrationConfiguration", getCalibrationConfiguration()); - jsonWriter.writeStringField("cameraConfiguration", getCameraConfiguration()); - jsonWriter.writeStringField("cameraCalibratorNodeConfiguration", getCameraCalibratorNodeConfiguration()); - jsonWriter.writeStringField("detectorNodeConfiguration", getDetectorNodeConfiguration()); - jsonWriter.writeStringField("trackerNodeConfiguration", getTrackerNodeConfiguration()); - jsonWriter.writeStringField("enableFaceMaskClassifier", getEnableFaceMaskClassifier()); - jsonWriter.writeArrayField("lines", this.lines, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpatialAnalysisPersonLineCrossingOperation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpatialAnalysisPersonLineCrossingOperation if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SpatialAnalysisPersonLineCrossingOperation. - */ - public static SpatialAnalysisPersonLineCrossingOperation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String debug = null; - String calibrationConfiguration = null; - String cameraConfiguration = null; - String cameraCalibratorNodeConfiguration = null; - String detectorNodeConfiguration = null; - String trackerNodeConfiguration = null; - String enableFaceMaskClassifier = null; - boolean linesFound = false; - List lines = null; - String type = "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonLineCrossingOperation"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("debug".equals(fieldName)) { - debug = reader.getString(); - } else if ("calibrationConfiguration".equals(fieldName)) { - calibrationConfiguration = reader.getString(); - } else if ("cameraConfiguration".equals(fieldName)) { - cameraConfiguration = reader.getString(); - } else if ("cameraCalibratorNodeConfiguration".equals(fieldName)) { - cameraCalibratorNodeConfiguration = reader.getString(); - } else if ("detectorNodeConfiguration".equals(fieldName)) { - detectorNodeConfiguration = reader.getString(); - } else if ("trackerNodeConfiguration".equals(fieldName)) { - trackerNodeConfiguration = reader.getString(); - } else if ("enableFaceMaskClassifier".equals(fieldName)) { - enableFaceMaskClassifier = reader.getString(); - } else if ("lines".equals(fieldName)) { - lines = reader.readArray(reader1 -> SpatialAnalysisPersonLineCrossingLineEvents.fromJson(reader1)); - linesFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (linesFound) { - SpatialAnalysisPersonLineCrossingOperation deserializedSpatialAnalysisPersonLineCrossingOperation - = new SpatialAnalysisPersonLineCrossingOperation(lines); - deserializedSpatialAnalysisPersonLineCrossingOperation.setDebug(debug); - deserializedSpatialAnalysisPersonLineCrossingOperation - .setCalibrationConfiguration(calibrationConfiguration); - deserializedSpatialAnalysisPersonLineCrossingOperation.setCameraConfiguration(cameraConfiguration); - deserializedSpatialAnalysisPersonLineCrossingOperation - .setCameraCalibratorNodeConfiguration(cameraCalibratorNodeConfiguration); - deserializedSpatialAnalysisPersonLineCrossingOperation - .setDetectorNodeConfiguration(detectorNodeConfiguration); - deserializedSpatialAnalysisPersonLineCrossingOperation - .setTrackerNodeConfiguration(trackerNodeConfiguration); - deserializedSpatialAnalysisPersonLineCrossingOperation - .setEnableFaceMaskClassifier(enableFaceMaskClassifier); - deserializedSpatialAnalysisPersonLineCrossingOperation.type = type; - - return deserializedSpatialAnalysisPersonLineCrossingOperation; - } - throw new IllegalStateException("Missing required property: lines"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonZoneCrossingEvent.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonZoneCrossingEvent.java deleted file mode 100644 index 94bfa9d66e9e..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonZoneCrossingEvent.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines a Spatial Analysis person crossing zone operation eventing configuration. - */ -@Fluent -public final class SpatialAnalysisPersonZoneCrossingEvent extends SpatialAnalysisOperationEventBase { - /* - * The event type. - */ - private SpatialAnalysisPersonZoneCrossingEventType eventType; - - /** - * Creates an instance of SpatialAnalysisPersonZoneCrossingEvent class. - */ - public SpatialAnalysisPersonZoneCrossingEvent() { - } - - /** - * Get the eventType property: The event type. - * - * @return the eventType value. - */ - public SpatialAnalysisPersonZoneCrossingEventType getEventType() { - return this.eventType; - } - - /** - * Set the eventType property: The event type. - * - * @param eventType the eventType value to set. - * @return the SpatialAnalysisPersonZoneCrossingEvent object itself. - */ - public SpatialAnalysisPersonZoneCrossingEvent setEventType(SpatialAnalysisPersonZoneCrossingEventType eventType) { - this.eventType = eventType; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonZoneCrossingEvent setThreshold(String threshold) { - super.setThreshold(threshold); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonZoneCrossingEvent setFocus(SpatialAnalysisOperationFocus focus) { - super.setFocus(focus); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("threshold", getThreshold()); - jsonWriter.writeStringField("focus", getFocus() == null ? null : getFocus().toString()); - jsonWriter.writeStringField("eventType", this.eventType == null ? null : this.eventType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpatialAnalysisPersonZoneCrossingEvent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpatialAnalysisPersonZoneCrossingEvent if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SpatialAnalysisPersonZoneCrossingEvent. - */ - public static SpatialAnalysisPersonZoneCrossingEvent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SpatialAnalysisPersonZoneCrossingEvent deserializedSpatialAnalysisPersonZoneCrossingEvent - = new SpatialAnalysisPersonZoneCrossingEvent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("threshold".equals(fieldName)) { - deserializedSpatialAnalysisPersonZoneCrossingEvent.setThreshold(reader.getString()); - } else if ("focus".equals(fieldName)) { - deserializedSpatialAnalysisPersonZoneCrossingEvent - .setFocus(SpatialAnalysisOperationFocus.fromString(reader.getString())); - } else if ("eventType".equals(fieldName)) { - deserializedSpatialAnalysisPersonZoneCrossingEvent.eventType - = SpatialAnalysisPersonZoneCrossingEventType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSpatialAnalysisPersonZoneCrossingEvent; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonZoneCrossingEventType.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonZoneCrossingEventType.java deleted file mode 100644 index d1ab54efc001..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonZoneCrossingEventType.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The event type. - */ -public final class SpatialAnalysisPersonZoneCrossingEventType - extends ExpandableStringEnum { - /** - * Zone crossing event type. - */ - public static final SpatialAnalysisPersonZoneCrossingEventType ZONE_CROSSING = fromString("zoneCrossing"); - - /** - * Zone dwell time event type. - */ - public static final SpatialAnalysisPersonZoneCrossingEventType ZONE_DWELL_TIME = fromString("zoneDwellTime"); - - /** - * Creates a new instance of SpatialAnalysisPersonZoneCrossingEventType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SpatialAnalysisPersonZoneCrossingEventType() { - } - - /** - * Creates or finds a SpatialAnalysisPersonZoneCrossingEventType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SpatialAnalysisPersonZoneCrossingEventType. - */ - public static SpatialAnalysisPersonZoneCrossingEventType fromString(String name) { - return fromString(name, SpatialAnalysisPersonZoneCrossingEventType.class); - } - - /** - * Gets known SpatialAnalysisPersonZoneCrossingEventType values. - * - * @return known SpatialAnalysisPersonZoneCrossingEventType values. - */ - public static Collection values() { - return values(SpatialAnalysisPersonZoneCrossingEventType.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonZoneCrossingOperation.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonZoneCrossingOperation.java deleted file mode 100644 index eaf12cca7fe1..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonZoneCrossingOperation.java +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Defines a Spatial Analysis person zone crossing operation. This requires the Azure Cognitive Services Spatial - * analysis module to be deployed alongside the Video Analyzer module, please see https://aka.ms/ava-spatial-analysis - * for more information. - */ -@Fluent -public final class SpatialAnalysisPersonZoneCrossingOperation extends SpatialAnalysisTypedOperationBase { - /* - * The Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonZoneCrossingOperation"; - - /* - * The list of zones with optional events. - */ - private final List zones; - - /** - * Creates an instance of SpatialAnalysisPersonZoneCrossingOperation class. - * - * @param zones the zones value to set. - */ - public SpatialAnalysisPersonZoneCrossingOperation(List zones) { - this.zones = zones; - } - - /** - * Get the type property: The Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the zones property: The list of zones with optional events. - * - * @return the zones value. - */ - public List getZones() { - return this.zones; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonZoneCrossingOperation setDebug(String debug) { - super.setDebug(debug); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonZoneCrossingOperation setCalibrationConfiguration(String calibrationConfiguration) { - super.setCalibrationConfiguration(calibrationConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonZoneCrossingOperation setCameraConfiguration(String cameraConfiguration) { - super.setCameraConfiguration(cameraConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonZoneCrossingOperation - setCameraCalibratorNodeConfiguration(String cameraCalibratorNodeConfiguration) { - super.setCameraCalibratorNodeConfiguration(cameraCalibratorNodeConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonZoneCrossingOperation setDetectorNodeConfiguration(String detectorNodeConfiguration) { - super.setDetectorNodeConfiguration(detectorNodeConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonZoneCrossingOperation setTrackerNodeConfiguration(String trackerNodeConfiguration) { - super.setTrackerNodeConfiguration(trackerNodeConfiguration); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpatialAnalysisPersonZoneCrossingOperation setEnableFaceMaskClassifier(String enableFaceMaskClassifier) { - super.setEnableFaceMaskClassifier(enableFaceMaskClassifier); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("debug", getDebug()); - jsonWriter.writeStringField("calibrationConfiguration", getCalibrationConfiguration()); - jsonWriter.writeStringField("cameraConfiguration", getCameraConfiguration()); - jsonWriter.writeStringField("cameraCalibratorNodeConfiguration", getCameraCalibratorNodeConfiguration()); - jsonWriter.writeStringField("detectorNodeConfiguration", getDetectorNodeConfiguration()); - jsonWriter.writeStringField("trackerNodeConfiguration", getTrackerNodeConfiguration()); - jsonWriter.writeStringField("enableFaceMaskClassifier", getEnableFaceMaskClassifier()); - jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpatialAnalysisPersonZoneCrossingOperation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpatialAnalysisPersonZoneCrossingOperation if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SpatialAnalysisPersonZoneCrossingOperation. - */ - public static SpatialAnalysisPersonZoneCrossingOperation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String debug = null; - String calibrationConfiguration = null; - String cameraConfiguration = null; - String cameraCalibratorNodeConfiguration = null; - String detectorNodeConfiguration = null; - String trackerNodeConfiguration = null; - String enableFaceMaskClassifier = null; - boolean zonesFound = false; - List zones = null; - String type = "#Microsoft.VideoAnalyzer.SpatialAnalysisPersonZoneCrossingOperation"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("debug".equals(fieldName)) { - debug = reader.getString(); - } else if ("calibrationConfiguration".equals(fieldName)) { - calibrationConfiguration = reader.getString(); - } else if ("cameraConfiguration".equals(fieldName)) { - cameraConfiguration = reader.getString(); - } else if ("cameraCalibratorNodeConfiguration".equals(fieldName)) { - cameraCalibratorNodeConfiguration = reader.getString(); - } else if ("detectorNodeConfiguration".equals(fieldName)) { - detectorNodeConfiguration = reader.getString(); - } else if ("trackerNodeConfiguration".equals(fieldName)) { - trackerNodeConfiguration = reader.getString(); - } else if ("enableFaceMaskClassifier".equals(fieldName)) { - enableFaceMaskClassifier = reader.getString(); - } else if ("zones".equals(fieldName)) { - zones = reader.readArray(reader1 -> SpatialAnalysisPersonZoneCrossingZoneEvents.fromJson(reader1)); - zonesFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (zonesFound) { - SpatialAnalysisPersonZoneCrossingOperation deserializedSpatialAnalysisPersonZoneCrossingOperation - = new SpatialAnalysisPersonZoneCrossingOperation(zones); - deserializedSpatialAnalysisPersonZoneCrossingOperation.setDebug(debug); - deserializedSpatialAnalysisPersonZoneCrossingOperation - .setCalibrationConfiguration(calibrationConfiguration); - deserializedSpatialAnalysisPersonZoneCrossingOperation.setCameraConfiguration(cameraConfiguration); - deserializedSpatialAnalysisPersonZoneCrossingOperation - .setCameraCalibratorNodeConfiguration(cameraCalibratorNodeConfiguration); - deserializedSpatialAnalysisPersonZoneCrossingOperation - .setDetectorNodeConfiguration(detectorNodeConfiguration); - deserializedSpatialAnalysisPersonZoneCrossingOperation - .setTrackerNodeConfiguration(trackerNodeConfiguration); - deserializedSpatialAnalysisPersonZoneCrossingOperation - .setEnableFaceMaskClassifier(enableFaceMaskClassifier); - deserializedSpatialAnalysisPersonZoneCrossingOperation.type = type; - - return deserializedSpatialAnalysisPersonZoneCrossingOperation; - } - throw new IllegalStateException("Missing required property: zones"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonZoneCrossingZoneEvents.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonZoneCrossingZoneEvents.java deleted file mode 100644 index b9eb47105074..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisPersonZoneCrossingZoneEvents.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The SpatialAnalysisPersonZoneCrossingZoneEvents model. - */ -@Fluent -public final class SpatialAnalysisPersonZoneCrossingZoneEvents - implements JsonSerializable { - /* - * The named zone. - */ - private final NamedPolygonBase zone; - - /* - * The event configuration. - */ - private List events; - - /** - * Creates an instance of SpatialAnalysisPersonZoneCrossingZoneEvents class. - * - * @param zone the zone value to set. - */ - public SpatialAnalysisPersonZoneCrossingZoneEvents(NamedPolygonBase zone) { - this.zone = zone; - } - - /** - * Get the zone property: The named zone. - * - * @return the zone value. - */ - public NamedPolygonBase getZone() { - return this.zone; - } - - /** - * Get the events property: The event configuration. - * - * @return the events value. - */ - public List getEvents() { - return this.events; - } - - /** - * Set the events property: The event configuration. - * - * @param events the events value to set. - * @return the SpatialAnalysisPersonZoneCrossingZoneEvents object itself. - */ - public SpatialAnalysisPersonZoneCrossingZoneEvents setEvents(List events) { - this.events = events; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("zone", this.zone); - jsonWriter.writeArrayField("events", this.events, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpatialAnalysisPersonZoneCrossingZoneEvents from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpatialAnalysisPersonZoneCrossingZoneEvents if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SpatialAnalysisPersonZoneCrossingZoneEvents. - */ - public static SpatialAnalysisPersonZoneCrossingZoneEvents fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean zoneFound = false; - NamedPolygonBase zone = null; - List events = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("zone".equals(fieldName)) { - zone = NamedPolygonBase.fromJson(reader); - zoneFound = true; - } else if ("events".equals(fieldName)) { - events = reader.readArray(reader1 -> SpatialAnalysisPersonZoneCrossingEvent.fromJson(reader1)); - } else { - reader.skipChildren(); - } - } - if (zoneFound) { - SpatialAnalysisPersonZoneCrossingZoneEvents deserializedSpatialAnalysisPersonZoneCrossingZoneEvents - = new SpatialAnalysisPersonZoneCrossingZoneEvents(zone); - deserializedSpatialAnalysisPersonZoneCrossingZoneEvents.events = events; - - return deserializedSpatialAnalysisPersonZoneCrossingZoneEvents; - } - throw new IllegalStateException("Missing required property: zone"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisTypedOperationBase.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisTypedOperationBase.java deleted file mode 100644 index e0a47decc9b6..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SpatialAnalysisTypedOperationBase.java +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base class for Azure Cognitive Services Spatial Analysis typed operations. - */ -@Fluent -public class SpatialAnalysisTypedOperationBase extends SpatialAnalysisOperationBase { - /* - * The Type discriminator for the derived types. - */ - private String type = "SpatialAnalysisTypedOperationBase"; - - /* - * If set to 'true', enables debugging mode for this operation. - */ - private String debug; - - /* - * Advanced calibration configuration. - */ - private String calibrationConfiguration; - - /* - * Advanced camera configuration. - */ - private String cameraConfiguration; - - /* - * Advanced camera calibrator configuration. - */ - private String cameraCalibratorNodeConfiguration; - - /* - * Advanced detector node configuration. - */ - private String detectorNodeConfiguration; - - /* - * Advanced tracker node configuration. - */ - private String trackerNodeConfiguration; - - /* - * If set to 'true', enables face mask detection for this operation. - */ - private String enableFaceMaskClassifier; - - /** - * Creates an instance of SpatialAnalysisTypedOperationBase class. - */ - public SpatialAnalysisTypedOperationBase() { - } - - /** - * Get the type property: The Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the debug property: If set to 'true', enables debugging mode for this operation. - * - * @return the debug value. - */ - public String getDebug() { - return this.debug; - } - - /** - * Set the debug property: If set to 'true', enables debugging mode for this operation. - * - * @param debug the debug value to set. - * @return the SpatialAnalysisTypedOperationBase object itself. - */ - public SpatialAnalysisTypedOperationBase setDebug(String debug) { - this.debug = debug; - return this; - } - - /** - * Get the calibrationConfiguration property: Advanced calibration configuration. - * - * @return the calibrationConfiguration value. - */ - public String getCalibrationConfiguration() { - return this.calibrationConfiguration; - } - - /** - * Set the calibrationConfiguration property: Advanced calibration configuration. - * - * @param calibrationConfiguration the calibrationConfiguration value to set. - * @return the SpatialAnalysisTypedOperationBase object itself. - */ - public SpatialAnalysisTypedOperationBase setCalibrationConfiguration(String calibrationConfiguration) { - this.calibrationConfiguration = calibrationConfiguration; - return this; - } - - /** - * Get the cameraConfiguration property: Advanced camera configuration. - * - * @return the cameraConfiguration value. - */ - public String getCameraConfiguration() { - return this.cameraConfiguration; - } - - /** - * Set the cameraConfiguration property: Advanced camera configuration. - * - * @param cameraConfiguration the cameraConfiguration value to set. - * @return the SpatialAnalysisTypedOperationBase object itself. - */ - public SpatialAnalysisTypedOperationBase setCameraConfiguration(String cameraConfiguration) { - this.cameraConfiguration = cameraConfiguration; - return this; - } - - /** - * Get the cameraCalibratorNodeConfiguration property: Advanced camera calibrator configuration. - * - * @return the cameraCalibratorNodeConfiguration value. - */ - public String getCameraCalibratorNodeConfiguration() { - return this.cameraCalibratorNodeConfiguration; - } - - /** - * Set the cameraCalibratorNodeConfiguration property: Advanced camera calibrator configuration. - * - * @param cameraCalibratorNodeConfiguration the cameraCalibratorNodeConfiguration value to set. - * @return the SpatialAnalysisTypedOperationBase object itself. - */ - public SpatialAnalysisTypedOperationBase - setCameraCalibratorNodeConfiguration(String cameraCalibratorNodeConfiguration) { - this.cameraCalibratorNodeConfiguration = cameraCalibratorNodeConfiguration; - return this; - } - - /** - * Get the detectorNodeConfiguration property: Advanced detector node configuration. - * - * @return the detectorNodeConfiguration value. - */ - public String getDetectorNodeConfiguration() { - return this.detectorNodeConfiguration; - } - - /** - * Set the detectorNodeConfiguration property: Advanced detector node configuration. - * - * @param detectorNodeConfiguration the detectorNodeConfiguration value to set. - * @return the SpatialAnalysisTypedOperationBase object itself. - */ - public SpatialAnalysisTypedOperationBase setDetectorNodeConfiguration(String detectorNodeConfiguration) { - this.detectorNodeConfiguration = detectorNodeConfiguration; - return this; - } - - /** - * Get the trackerNodeConfiguration property: Advanced tracker node configuration. - * - * @return the trackerNodeConfiguration value. - */ - public String getTrackerNodeConfiguration() { - return this.trackerNodeConfiguration; - } - - /** - * Set the trackerNodeConfiguration property: Advanced tracker node configuration. - * - * @param trackerNodeConfiguration the trackerNodeConfiguration value to set. - * @return the SpatialAnalysisTypedOperationBase object itself. - */ - public SpatialAnalysisTypedOperationBase setTrackerNodeConfiguration(String trackerNodeConfiguration) { - this.trackerNodeConfiguration = trackerNodeConfiguration; - return this; - } - - /** - * Get the enableFaceMaskClassifier property: If set to 'true', enables face mask detection for this operation. - * - * @return the enableFaceMaskClassifier value. - */ - public String getEnableFaceMaskClassifier() { - return this.enableFaceMaskClassifier; - } - - /** - * Set the enableFaceMaskClassifier property: If set to 'true', enables face mask detection for this operation. - * - * @param enableFaceMaskClassifier the enableFaceMaskClassifier value to set. - * @return the SpatialAnalysisTypedOperationBase object itself. - */ - public SpatialAnalysisTypedOperationBase setEnableFaceMaskClassifier(String enableFaceMaskClassifier) { - this.enableFaceMaskClassifier = enableFaceMaskClassifier; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("@type", this.type); - jsonWriter.writeStringField("debug", this.debug); - jsonWriter.writeStringField("calibrationConfiguration", this.calibrationConfiguration); - jsonWriter.writeStringField("cameraConfiguration", this.cameraConfiguration); - jsonWriter.writeStringField("cameraCalibratorNodeConfiguration", this.cameraCalibratorNodeConfiguration); - jsonWriter.writeStringField("detectorNodeConfiguration", this.detectorNodeConfiguration); - jsonWriter.writeStringField("trackerNodeConfiguration", this.trackerNodeConfiguration); - jsonWriter.writeStringField("enableFaceMaskClassifier", this.enableFaceMaskClassifier); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpatialAnalysisTypedOperationBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpatialAnalysisTypedOperationBase if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SpatialAnalysisTypedOperationBase. - */ - public static SpatialAnalysisTypedOperationBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("@type".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("#Microsoft.VideoAnalyzer.SpatialAnalysisPersonCountOperation".equals(discriminatorValue)) { - return SpatialAnalysisPersonCountOperation.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.SpatialAnalysisPersonZoneCrossingOperation" - .equals(discriminatorValue)) { - return SpatialAnalysisPersonZoneCrossingOperation.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.SpatialAnalysisPersonDistanceOperation" - .equals(discriminatorValue)) { - return SpatialAnalysisPersonDistanceOperation.fromJson(readerToUse.reset()); - } else if ("#Microsoft.VideoAnalyzer.SpatialAnalysisPersonLineCrossingOperation" - .equals(discriminatorValue)) { - return SpatialAnalysisPersonLineCrossingOperation.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static SpatialAnalysisTypedOperationBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SpatialAnalysisTypedOperationBase deserializedSpatialAnalysisTypedOperationBase - = new SpatialAnalysisTypedOperationBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("@type".equals(fieldName)) { - deserializedSpatialAnalysisTypedOperationBase.type = reader.getString(); - } else if ("debug".equals(fieldName)) { - deserializedSpatialAnalysisTypedOperationBase.debug = reader.getString(); - } else if ("calibrationConfiguration".equals(fieldName)) { - deserializedSpatialAnalysisTypedOperationBase.calibrationConfiguration = reader.getString(); - } else if ("cameraConfiguration".equals(fieldName)) { - deserializedSpatialAnalysisTypedOperationBase.cameraConfiguration = reader.getString(); - } else if ("cameraCalibratorNodeConfiguration".equals(fieldName)) { - deserializedSpatialAnalysisTypedOperationBase.cameraCalibratorNodeConfiguration - = reader.getString(); - } else if ("detectorNodeConfiguration".equals(fieldName)) { - deserializedSpatialAnalysisTypedOperationBase.detectorNodeConfiguration = reader.getString(); - } else if ("trackerNodeConfiguration".equals(fieldName)) { - deserializedSpatialAnalysisTypedOperationBase.trackerNodeConfiguration = reader.getString(); - } else if ("enableFaceMaskClassifier".equals(fieldName)) { - deserializedSpatialAnalysisTypedOperationBase.enableFaceMaskClassifier = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSpatialAnalysisTypedOperationBase; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SymmetricKeyCredentials.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SymmetricKeyCredentials.java deleted file mode 100644 index 325337d40e65..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SymmetricKeyCredentials.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Symmetric key credential. - */ -@Immutable -public final class SymmetricKeyCredentials extends CredentialsBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.SymmetricKeyCredentials"; - - /* - * Symmetric key credential. - */ - private final String key; - - /** - * Creates an instance of SymmetricKeyCredentials class. - * - * @param key the key value to set. - */ - public SymmetricKeyCredentials(String key) { - this.key = key; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the key property: Symmetric key credential. - * - * @return the key value. - */ - public String getKey() { - return this.key; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("key", this.key); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SymmetricKeyCredentials from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SymmetricKeyCredentials if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SymmetricKeyCredentials. - */ - public static SymmetricKeyCredentials fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean keyFound = false; - String key = null; - String type = "#Microsoft.VideoAnalyzer.SymmetricKeyCredentials"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("key".equals(fieldName)) { - key = reader.getString(); - keyFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (keyFound) { - SymmetricKeyCredentials deserializedSymmetricKeyCredentials = new SymmetricKeyCredentials(key); - deserializedSymmetricKeyCredentials.type = type; - - return deserializedSymmetricKeyCredentials; - } - throw new IllegalStateException("Missing required property: key"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SystemData.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SystemData.java deleted file mode 100644 index 7d1424554b45..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/SystemData.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * Read-only system metadata associated with a resource. - */ -@Fluent -public final class SystemData implements JsonSerializable { - /* - * Date and time when this resource was first created. Value is represented in UTC according to the ISO8601 date - * format. - */ - private OffsetDateTime createdAt; - - /* - * Date and time when this resource was last modified. Value is represented in UTC according to the ISO8601 date - * format. - */ - private OffsetDateTime lastModifiedAt; - - /** - * Creates an instance of SystemData class. - */ - public SystemData() { - } - - /** - * Get the createdAt property: Date and time when this resource was first created. Value is represented in UTC - * according to the ISO8601 date format. - * - * @return the createdAt value. - */ - public OffsetDateTime getCreatedAt() { - return this.createdAt; - } - - /** - * Set the createdAt property: Date and time when this resource was first created. Value is represented in UTC - * according to the ISO8601 date format. - * - * @param createdAt the createdAt value to set. - * @return the SystemData object itself. - */ - public SystemData setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Get the lastModifiedAt property: Date and time when this resource was last modified. Value is represented in UTC - * according to the ISO8601 date format. - * - * @return the lastModifiedAt value. - */ - public OffsetDateTime getLastModifiedAt() { - return this.lastModifiedAt; - } - - /** - * Set the lastModifiedAt property: Date and time when this resource was last modified. Value is represented in UTC - * according to the ISO8601 date format. - * - * @param lastModifiedAt the lastModifiedAt value to set. - * @return the SystemData object itself. - */ - public SystemData setLastModifiedAt(OffsetDateTime lastModifiedAt) { - this.lastModifiedAt = lastModifiedAt; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("createdAt", - this.createdAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.createdAt)); - jsonWriter.writeStringField("lastModifiedAt", - this.lastModifiedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastModifiedAt)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SystemData from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SystemData if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the SystemData. - */ - public static SystemData fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SystemData deserializedSystemData = new SystemData(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("createdAt".equals(fieldName)) { - deserializedSystemData.createdAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastModifiedAt".equals(fieldName)) { - deserializedSystemData.lastModifiedAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedSystemData; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/TlsEndpoint.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/TlsEndpoint.java deleted file mode 100644 index dc6db355aba3..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/TlsEndpoint.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * TLS endpoint describes an endpoint that the pipeline can connect to over TLS transport (data is encrypted in - * transit). - */ -@Fluent -public final class TlsEndpoint extends EndpointBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.TlsEndpoint"; - - /* - * List of trusted certificate authorities when authenticating a TLS connection. A null list designates that Azure - * Video Analyzer's list of trusted authorities should be used. - */ - private CertificateSource trustedCertificates; - - /* - * Validation options to use when authenticating a TLS connection. By default, strict validation is used. - */ - private TlsValidationOptions validationOptions; - - /** - * Creates an instance of TlsEndpoint class. - * - * @param url the url value to set. - */ - public TlsEndpoint(String url) { - super(url); - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the trustedCertificates property: List of trusted certificate authorities when authenticating a TLS - * connection. A null list designates that Azure Video Analyzer's list of trusted authorities should be used. - * - * @return the trustedCertificates value. - */ - public CertificateSource getTrustedCertificates() { - return this.trustedCertificates; - } - - /** - * Set the trustedCertificates property: List of trusted certificate authorities when authenticating a TLS - * connection. A null list designates that Azure Video Analyzer's list of trusted authorities should be used. - * - * @param trustedCertificates the trustedCertificates value to set. - * @return the TlsEndpoint object itself. - */ - public TlsEndpoint setTrustedCertificates(CertificateSource trustedCertificates) { - this.trustedCertificates = trustedCertificates; - return this; - } - - /** - * Get the validationOptions property: Validation options to use when authenticating a TLS connection. By default, - * strict validation is used. - * - * @return the validationOptions value. - */ - public TlsValidationOptions getValidationOptions() { - return this.validationOptions; - } - - /** - * Set the validationOptions property: Validation options to use when authenticating a TLS connection. By default, - * strict validation is used. - * - * @param validationOptions the validationOptions value to set. - * @return the TlsEndpoint object itself. - */ - public TlsEndpoint setValidationOptions(TlsValidationOptions validationOptions) { - this.validationOptions = validationOptions; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public TlsEndpoint setCredentials(CredentialsBase credentials) { - super.setCredentials(credentials); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("url", getUrl()); - jsonWriter.writeJsonField("credentials", getCredentials()); - jsonWriter.writeStringField("@type", this.type); - jsonWriter.writeJsonField("trustedCertificates", this.trustedCertificates); - jsonWriter.writeJsonField("validationOptions", this.validationOptions); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TlsEndpoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TlsEndpoint if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TlsEndpoint. - */ - public static TlsEndpoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean urlFound = false; - String url = null; - CredentialsBase credentials = null; - String type = "#Microsoft.VideoAnalyzer.TlsEndpoint"; - CertificateSource trustedCertificates = null; - TlsValidationOptions validationOptions = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("url".equals(fieldName)) { - url = reader.getString(); - urlFound = true; - } else if ("credentials".equals(fieldName)) { - credentials = CredentialsBase.fromJson(reader); - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else if ("trustedCertificates".equals(fieldName)) { - trustedCertificates = CertificateSource.fromJson(reader); - } else if ("validationOptions".equals(fieldName)) { - validationOptions = TlsValidationOptions.fromJson(reader); - } else { - reader.skipChildren(); - } - } - if (urlFound) { - TlsEndpoint deserializedTlsEndpoint = new TlsEndpoint(url); - deserializedTlsEndpoint.setCredentials(credentials); - deserializedTlsEndpoint.type = type; - deserializedTlsEndpoint.trustedCertificates = trustedCertificates; - deserializedTlsEndpoint.validationOptions = validationOptions; - - return deserializedTlsEndpoint; - } - throw new IllegalStateException("Missing required property: url"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/TlsValidationOptions.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/TlsValidationOptions.java deleted file mode 100644 index 8d9a0331ddba..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/TlsValidationOptions.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Options for controlling the validation of TLS endpoints. - */ -@Fluent -public final class TlsValidationOptions implements JsonSerializable { - /* - * When set to 'true' causes the certificate subject name validation to be skipped. Default is 'false'. - */ - private String ignoreHostname; - - /* - * When set to 'true' causes the certificate chain trust validation to be skipped. Default is 'false'. - */ - private String ignoreSignature; - - /** - * Creates an instance of TlsValidationOptions class. - */ - public TlsValidationOptions() { - } - - /** - * Get the ignoreHostname property: When set to 'true' causes the certificate subject name validation to be skipped. - * Default is 'false'. - * - * @return the ignoreHostname value. - */ - public String getIgnoreHostname() { - return this.ignoreHostname; - } - - /** - * Set the ignoreHostname property: When set to 'true' causes the certificate subject name validation to be skipped. - * Default is 'false'. - * - * @param ignoreHostname the ignoreHostname value to set. - * @return the TlsValidationOptions object itself. - */ - public TlsValidationOptions setIgnoreHostname(String ignoreHostname) { - this.ignoreHostname = ignoreHostname; - return this; - } - - /** - * Get the ignoreSignature property: When set to 'true' causes the certificate chain trust validation to be skipped. - * Default is 'false'. - * - * @return the ignoreSignature value. - */ - public String getIgnoreSignature() { - return this.ignoreSignature; - } - - /** - * Set the ignoreSignature property: When set to 'true' causes the certificate chain trust validation to be skipped. - * Default is 'false'. - * - * @param ignoreSignature the ignoreSignature value to set. - * @return the TlsValidationOptions object itself. - */ - public TlsValidationOptions setIgnoreSignature(String ignoreSignature) { - this.ignoreSignature = ignoreSignature; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("ignoreHostname", this.ignoreHostname); - jsonWriter.writeStringField("ignoreSignature", this.ignoreSignature); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TlsValidationOptions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TlsValidationOptions if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the TlsValidationOptions. - */ - public static TlsValidationOptions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TlsValidationOptions deserializedTlsValidationOptions = new TlsValidationOptions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ignoreHostname".equals(fieldName)) { - deserializedTlsValidationOptions.ignoreHostname = reader.getString(); - } else if ("ignoreSignature".equals(fieldName)) { - deserializedTlsValidationOptions.ignoreSignature = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTlsValidationOptions; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/UnsecuredEndpoint.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/UnsecuredEndpoint.java deleted file mode 100644 index 73f4de87e59f..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/UnsecuredEndpoint.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Unsecured endpoint describes an endpoint that the pipeline can connect to over clear transport (no encryption in - * transit). - */ -@Fluent -public final class UnsecuredEndpoint extends EndpointBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.UnsecuredEndpoint"; - - /** - * Creates an instance of UnsecuredEndpoint class. - * - * @param url the url value to set. - */ - public UnsecuredEndpoint(String url) { - super(url); - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public UnsecuredEndpoint setCredentials(CredentialsBase credentials) { - super.setCredentials(credentials); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("url", getUrl()); - jsonWriter.writeJsonField("credentials", getCredentials()); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UnsecuredEndpoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UnsecuredEndpoint if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the UnsecuredEndpoint. - */ - public static UnsecuredEndpoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean urlFound = false; - String url = null; - CredentialsBase credentials = null; - String type = "#Microsoft.VideoAnalyzer.UnsecuredEndpoint"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("url".equals(fieldName)) { - url = reader.getString(); - urlFound = true; - } else if ("credentials".equals(fieldName)) { - credentials = CredentialsBase.fromJson(reader); - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (urlFound) { - UnsecuredEndpoint deserializedUnsecuredEndpoint = new UnsecuredEndpoint(url); - deserializedUnsecuredEndpoint.setCredentials(credentials); - deserializedUnsecuredEndpoint.type = type; - - return deserializedUnsecuredEndpoint; - } - throw new IllegalStateException("Missing required property: url"); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/UsernamePasswordCredentials.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/UsernamePasswordCredentials.java deleted file mode 100644 index f0fe74a69774..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/UsernamePasswordCredentials.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Username and password credentials. - */ -@Immutable -public final class UsernamePasswordCredentials extends CredentialsBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials"; - - /* - * Username to be presented as part of the credentials. - */ - private final String username; - - /* - * Password to be presented as part of the credentials. It is recommended that this value is parameterized as a - * secret string in order to prevent this value to be returned as part of the resource on API requests. - */ - private final String password; - - /** - * Creates an instance of UsernamePasswordCredentials class. - * - * @param username the username value to set. - * @param password the password value to set. - */ - public UsernamePasswordCredentials(String username, String password) { - this.username = username; - this.password = password; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the username property: Username to be presented as part of the credentials. - * - * @return the username value. - */ - public String getUsername() { - return this.username; - } - - /** - * Get the password property: Password to be presented as part of the credentials. It is recommended that this value - * is parameterized as a secret string in order to prevent this value to be returned as part of the resource on API - * requests. - * - * @return the password value. - */ - public String getPassword() { - return this.password; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("username", this.username); - jsonWriter.writeStringField("password", this.password); - jsonWriter.writeStringField("@type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UsernamePasswordCredentials from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UsernamePasswordCredentials if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the UsernamePasswordCredentials. - */ - public static UsernamePasswordCredentials fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean usernameFound = false; - String username = null; - boolean passwordFound = false; - String password = null; - String type = "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials"; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("username".equals(fieldName)) { - username = reader.getString(); - usernameFound = true; - } else if ("password".equals(fieldName)) { - password = reader.getString(); - passwordFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else { - reader.skipChildren(); - } - } - if (usernameFound && passwordFound) { - UsernamePasswordCredentials deserializedUsernamePasswordCredentials - = new UsernamePasswordCredentials(username, password); - deserializedUsernamePasswordCredentials.type = type; - - return deserializedUsernamePasswordCredentials; - } - List missingProperties = new ArrayList<>(); - if (!usernameFound) { - missingProperties.add("username"); - } - if (!passwordFound) { - missingProperties.add("password"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoCreationProperties.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoCreationProperties.java deleted file mode 100644 index 60090b19ddbc..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoCreationProperties.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Optional video properties to be used in case a new video resource needs to be created on the service. These will not - * take effect if the video already exists. - */ -@Fluent -public final class VideoCreationProperties implements JsonSerializable { - /* - * Optional video title provided by the user. Value can be up to 256 characters long. - */ - private String title; - - /* - * Optional video description provided by the user. Value can be up to 2048 characters long. - */ - private String description; - - /* - * Video segment length indicates the length of individual video files (segments) which are persisted to storage. - * Smaller segments provide lower archive playback latency but generate larger volume of storage transactions. - * Larger segments reduce the amount of storage transactions while increasing the archive playback latency. Value - * must be specified in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can vary between 30 seconds to - * 5 minutes, in 30 seconds increments. Changing this value after the video is initially created can lead to errors - * when uploading media to the archive. Default value is 30 seconds. - */ - private String segmentLength; - - /* - * Video retention period indicates how long the video is kept in storage, and must be a multiple of 1 day. For - * example, if this is set to 30 days, then content older than 30 days will be deleted. - */ - private String retentionPeriod; - - /** - * Creates an instance of VideoCreationProperties class. - */ - public VideoCreationProperties() { - } - - /** - * Get the title property: Optional video title provided by the user. Value can be up to 256 characters long. - * - * @return the title value. - */ - public String getTitle() { - return this.title; - } - - /** - * Set the title property: Optional video title provided by the user. Value can be up to 256 characters long. - * - * @param title the title value to set. - * @return the VideoCreationProperties object itself. - */ - public VideoCreationProperties setTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description property: Optional video description provided by the user. Value can be up to 2048 characters - * long. - * - * @return the description value. - */ - public String getDescription() { - return this.description; - } - - /** - * Set the description property: Optional video description provided by the user. Value can be up to 2048 characters - * long. - * - * @param description the description value to set. - * @return the VideoCreationProperties object itself. - */ - public VideoCreationProperties setDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the segmentLength property: Video segment length indicates the length of individual video files (segments) - * which are persisted to storage. Smaller segments provide lower archive playback latency but generate larger - * volume of storage transactions. Larger segments reduce the amount of storage transactions while increasing the - * archive playback latency. Value must be specified in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and - * can vary between 30 seconds to 5 minutes, in 30 seconds increments. Changing this value after the video is - * initially created can lead to errors when uploading media to the archive. Default value is 30 seconds. - * - * @return the segmentLength value. - */ - public String getSegmentLength() { - return this.segmentLength; - } - - /** - * Set the segmentLength property: Video segment length indicates the length of individual video files (segments) - * which are persisted to storage. Smaller segments provide lower archive playback latency but generate larger - * volume of storage transactions. Larger segments reduce the amount of storage transactions while increasing the - * archive playback latency. Value must be specified in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and - * can vary between 30 seconds to 5 minutes, in 30 seconds increments. Changing this value after the video is - * initially created can lead to errors when uploading media to the archive. Default value is 30 seconds. - * - * @param segmentLength the segmentLength value to set. - * @return the VideoCreationProperties object itself. - */ - public VideoCreationProperties setSegmentLength(String segmentLength) { - this.segmentLength = segmentLength; - return this; - } - - /** - * Get the retentionPeriod property: Video retention period indicates how long the video is kept in storage, and - * must be a multiple of 1 day. For example, if this is set to 30 days, then content older than 30 days will be - * deleted. - * - * @return the retentionPeriod value. - */ - public String getRetentionPeriod() { - return this.retentionPeriod; - } - - /** - * Set the retentionPeriod property: Video retention period indicates how long the video is kept in storage, and - * must be a multiple of 1 day. For example, if this is set to 30 days, then content older than 30 days will be - * deleted. - * - * @param retentionPeriod the retentionPeriod value to set. - * @return the VideoCreationProperties object itself. - */ - public VideoCreationProperties setRetentionPeriod(String retentionPeriod) { - this.retentionPeriod = retentionPeriod; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("title", this.title); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("segmentLength", this.segmentLength); - jsonWriter.writeStringField("retentionPeriod", this.retentionPeriod); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VideoCreationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VideoCreationProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the VideoCreationProperties. - */ - public static VideoCreationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VideoCreationProperties deserializedVideoCreationProperties = new VideoCreationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("title".equals(fieldName)) { - deserializedVideoCreationProperties.title = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedVideoCreationProperties.description = reader.getString(); - } else if ("segmentLength".equals(fieldName)) { - deserializedVideoCreationProperties.segmentLength = reader.getString(); - } else if ("retentionPeriod".equals(fieldName)) { - deserializedVideoCreationProperties.retentionPeriod = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVideoCreationProperties; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoEncoderConfiguration.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoEncoderConfiguration.java deleted file mode 100644 index 73cf26bf6047..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoEncoderConfiguration.java +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Class representing the MPEG4 Configuration. - */ -@Fluent -public final class VideoEncoderConfiguration implements JsonSerializable { - /* - * The video codec used by the Media Profile. - */ - private VideoEncoding encoding; - - /* - * Relative value representing the quality of the video. - */ - private Float quality; - - /* - * The Video Resolution. - */ - private VideoResolution resolution; - - /* - * The Video's rate control. - */ - private RateControl rateControl; - - /* - * The H264 Configuration. - */ - private H264Configuration h264; - - /* - * The H264 Configuration. - */ - private Mpeg4Configuration mpeg4; - - /** - * Creates an instance of VideoEncoderConfiguration class. - */ - public VideoEncoderConfiguration() { - } - - /** - * Get the encoding property: The video codec used by the Media Profile. - * - * @return the encoding value. - */ - public VideoEncoding getEncoding() { - return this.encoding; - } - - /** - * Set the encoding property: The video codec used by the Media Profile. - * - * @param encoding the encoding value to set. - * @return the VideoEncoderConfiguration object itself. - */ - public VideoEncoderConfiguration setEncoding(VideoEncoding encoding) { - this.encoding = encoding; - return this; - } - - /** - * Get the quality property: Relative value representing the quality of the video. - * - * @return the quality value. - */ - public Float getQuality() { - return this.quality; - } - - /** - * Set the quality property: Relative value representing the quality of the video. - * - * @param quality the quality value to set. - * @return the VideoEncoderConfiguration object itself. - */ - public VideoEncoderConfiguration setQuality(Float quality) { - this.quality = quality; - return this; - } - - /** - * Get the resolution property: The Video Resolution. - * - * @return the resolution value. - */ - public VideoResolution getResolution() { - return this.resolution; - } - - /** - * Set the resolution property: The Video Resolution. - * - * @param resolution the resolution value to set. - * @return the VideoEncoderConfiguration object itself. - */ - public VideoEncoderConfiguration setResolution(VideoResolution resolution) { - this.resolution = resolution; - return this; - } - - /** - * Get the rateControl property: The Video's rate control. - * - * @return the rateControl value. - */ - public RateControl getRateControl() { - return this.rateControl; - } - - /** - * Set the rateControl property: The Video's rate control. - * - * @param rateControl the rateControl value to set. - * @return the VideoEncoderConfiguration object itself. - */ - public VideoEncoderConfiguration setRateControl(RateControl rateControl) { - this.rateControl = rateControl; - return this; - } - - /** - * Get the h264 property: The H264 Configuration. - * - * @return the h264 value. - */ - public H264Configuration getH264() { - return this.h264; - } - - /** - * Set the h264 property: The H264 Configuration. - * - * @param h264 the h264 value to set. - * @return the VideoEncoderConfiguration object itself. - */ - public VideoEncoderConfiguration setH264(H264Configuration h264) { - this.h264 = h264; - return this; - } - - /** - * Get the mpeg4 property: The H264 Configuration. - * - * @return the mpeg4 value. - */ - public Mpeg4Configuration getMpeg4() { - return this.mpeg4; - } - - /** - * Set the mpeg4 property: The H264 Configuration. - * - * @param mpeg4 the mpeg4 value to set. - * @return the VideoEncoderConfiguration object itself. - */ - public VideoEncoderConfiguration setMpeg4(Mpeg4Configuration mpeg4) { - this.mpeg4 = mpeg4; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("encoding", this.encoding == null ? null : this.encoding.toString()); - jsonWriter.writeNumberField("quality", this.quality); - jsonWriter.writeJsonField("resolution", this.resolution); - jsonWriter.writeJsonField("rateControl", this.rateControl); - jsonWriter.writeJsonField("h264", this.h264); - jsonWriter.writeJsonField("mpeg4", this.mpeg4); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VideoEncoderConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VideoEncoderConfiguration if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the VideoEncoderConfiguration. - */ - public static VideoEncoderConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VideoEncoderConfiguration deserializedVideoEncoderConfiguration = new VideoEncoderConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("encoding".equals(fieldName)) { - deserializedVideoEncoderConfiguration.encoding = VideoEncoding.fromString(reader.getString()); - } else if ("quality".equals(fieldName)) { - deserializedVideoEncoderConfiguration.quality = reader.getNullable(JsonReader::getFloat); - } else if ("resolution".equals(fieldName)) { - deserializedVideoEncoderConfiguration.resolution = VideoResolution.fromJson(reader); - } else if ("rateControl".equals(fieldName)) { - deserializedVideoEncoderConfiguration.rateControl = RateControl.fromJson(reader); - } else if ("h264".equals(fieldName)) { - deserializedVideoEncoderConfiguration.h264 = H264Configuration.fromJson(reader); - } else if ("mpeg4".equals(fieldName)) { - deserializedVideoEncoderConfiguration.mpeg4 = Mpeg4Configuration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedVideoEncoderConfiguration; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoEncoding.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoEncoding.java deleted file mode 100644 index b23df0e82af3..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoEncoding.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The video codec used by the Media Profile. - */ -public final class VideoEncoding extends ExpandableStringEnum { - /** - * The Media Profile uses JPEG encoding. - */ - public static final VideoEncoding JPEG = fromString("JPEG"); - - /** - * The Media Profile uses H264 encoding. - */ - public static final VideoEncoding H264 = fromString("H264"); - - /** - * The Media Profile uses MPEG4 encoding. - */ - public static final VideoEncoding MPEG4 = fromString("MPEG4"); - - /** - * Creates a new instance of VideoEncoding value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public VideoEncoding() { - } - - /** - * Creates or finds a VideoEncoding from its string representation. - * - * @param name a name to look for. - * @return the corresponding VideoEncoding. - */ - public static VideoEncoding fromString(String name) { - return fromString(name, VideoEncoding.class); - } - - /** - * Gets known VideoEncoding values. - * - * @return known VideoEncoding values. - */ - public static Collection values() { - return values(VideoEncoding.class); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoPublishingOptions.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoPublishingOptions.java deleted file mode 100644 index ca4807869532..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoPublishingOptions.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Options for changing video publishing behavior on the video sink and output video. - */ -@Fluent -public final class VideoPublishingOptions implements JsonSerializable { - /* - * When set to 'true' the video will publish preview images. Default is 'false'. - */ - private String enableVideoPreviewImage; - - /** - * Creates an instance of VideoPublishingOptions class. - */ - public VideoPublishingOptions() { - } - - /** - * Get the enableVideoPreviewImage property: When set to 'true' the video will publish preview images. Default is - * 'false'. - * - * @return the enableVideoPreviewImage value. - */ - public String getEnableVideoPreviewImage() { - return this.enableVideoPreviewImage; - } - - /** - * Set the enableVideoPreviewImage property: When set to 'true' the video will publish preview images. Default is - * 'false'. - * - * @param enableVideoPreviewImage the enableVideoPreviewImage value to set. - * @return the VideoPublishingOptions object itself. - */ - public VideoPublishingOptions setEnableVideoPreviewImage(String enableVideoPreviewImage) { - this.enableVideoPreviewImage = enableVideoPreviewImage; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("enableVideoPreviewImage", this.enableVideoPreviewImage); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VideoPublishingOptions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VideoPublishingOptions if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the VideoPublishingOptions. - */ - public static VideoPublishingOptions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VideoPublishingOptions deserializedVideoPublishingOptions = new VideoPublishingOptions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enableVideoPreviewImage".equals(fieldName)) { - deserializedVideoPublishingOptions.enableVideoPreviewImage = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedVideoPublishingOptions; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoResolution.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoResolution.java deleted file mode 100644 index 949dce0d26df..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoResolution.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Video resolution. - */ -@Fluent -public final class VideoResolution implements JsonSerializable { - /* - * The number of columns of the Video image. - */ - private Float width; - - /* - * The number of lines of the Video image. - */ - private Float height; - - /** - * Creates an instance of VideoResolution class. - */ - public VideoResolution() { - } - - /** - * Get the width property: The number of columns of the Video image. - * - * @return the width value. - */ - public Float getWidth() { - return this.width; - } - - /** - * Set the width property: The number of columns of the Video image. - * - * @param width the width value to set. - * @return the VideoResolution object itself. - */ - public VideoResolution setWidth(Float width) { - this.width = width; - return this; - } - - /** - * Get the height property: The number of lines of the Video image. - * - * @return the height value. - */ - public Float getHeight() { - return this.height; - } - - /** - * Set the height property: The number of lines of the Video image. - * - * @param height the height value to set. - * @return the VideoResolution object itself. - */ - public VideoResolution setHeight(Float height) { - this.height = height; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("width", this.width); - jsonWriter.writeNumberField("height", this.height); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VideoResolution from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VideoResolution if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the VideoResolution. - */ - public static VideoResolution fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VideoResolution deserializedVideoResolution = new VideoResolution(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("width".equals(fieldName)) { - deserializedVideoResolution.width = reader.getNullable(JsonReader::getFloat); - } else if ("height".equals(fieldName)) { - deserializedVideoResolution.height = reader.getNullable(JsonReader::getFloat); - } else { - reader.skipChildren(); - } - } - - return deserializedVideoResolution; - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoSink.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoSink.java deleted file mode 100644 index 51d6ff5a9369..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/VideoSink.java +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.media.videoanalyzer.edge.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * Video sink allows for video and audio to be recorded to the Video Analyzer service. The recorded video can be played - * from anywhere and further managed from the cloud. Due to security reasons, a given Video Analyzer edge module - * instance can only record content to new video entries, or existing video entries previously recorded by the same - * module. Any attempt to record content to an existing video which has not been created by the same module instance - * will result in failure to record. - */ -@Fluent -public final class VideoSink extends SinkNodeBase { - /* - * Type discriminator for the derived types. - */ - private String type = "#Microsoft.VideoAnalyzer.VideoSink"; - - /* - * Name of a new or existing Video Analyzer video resource used for the media recording. - */ - private final String videoName; - - /* - * Optional video properties to be used in case a new video resource needs to be created on the service. - */ - private VideoCreationProperties videoCreationProperties; - - /* - * Optional video publishing options to be used for changing publishing behavior of the output video. - */ - private VideoPublishingOptions videoPublishingOptions; - - /* - * Path to a local file system directory for caching of temporary media files. This will also be used to store - * content which cannot be immediately uploaded to Azure due to Internet connectivity issues. - */ - private final String localMediaCachePath; - - /* - * Maximum amount of disk space that can be used for caching of temporary media files. Once this limit is reached, - * the oldest segments of the media archive will be continuously deleted in order to make space for new media, thus - * leading to gaps in the cloud recorded content. - */ - private final String localMediaCacheMaximumSizeMiB; - - /** - * Creates an instance of VideoSink class. - * - * @param name the name value to set. - * @param inputs the inputs value to set. - * @param videoName the videoName value to set. - * @param localMediaCachePath the localMediaCachePath value to set. - * @param localMediaCacheMaximumSizeMiB the localMediaCacheMaximumSizeMiB value to set. - */ - public VideoSink(String name, List inputs, String videoName, String localMediaCachePath, - String localMediaCacheMaximumSizeMiB) { - super(name, inputs); - this.videoName = videoName; - this.localMediaCachePath = localMediaCachePath; - this.localMediaCacheMaximumSizeMiB = localMediaCacheMaximumSizeMiB; - } - - /** - * Get the type property: Type discriminator for the derived types. - * - * @return the type value. - */ - @Override - public String getType() { - return this.type; - } - - /** - * Get the videoName property: Name of a new or existing Video Analyzer video resource used for the media recording. - * - * @return the videoName value. - */ - public String getVideoName() { - return this.videoName; - } - - /** - * Get the videoCreationProperties property: Optional video properties to be used in case a new video resource needs - * to be created on the service. - * - * @return the videoCreationProperties value. - */ - public VideoCreationProperties getVideoCreationProperties() { - return this.videoCreationProperties; - } - - /** - * Set the videoCreationProperties property: Optional video properties to be used in case a new video resource needs - * to be created on the service. - * - * @param videoCreationProperties the videoCreationProperties value to set. - * @return the VideoSink object itself. - */ - public VideoSink setVideoCreationProperties(VideoCreationProperties videoCreationProperties) { - this.videoCreationProperties = videoCreationProperties; - return this; - } - - /** - * Get the videoPublishingOptions property: Optional video publishing options to be used for changing publishing - * behavior of the output video. - * - * @return the videoPublishingOptions value. - */ - public VideoPublishingOptions getVideoPublishingOptions() { - return this.videoPublishingOptions; - } - - /** - * Set the videoPublishingOptions property: Optional video publishing options to be used for changing publishing - * behavior of the output video. - * - * @param videoPublishingOptions the videoPublishingOptions value to set. - * @return the VideoSink object itself. - */ - public VideoSink setVideoPublishingOptions(VideoPublishingOptions videoPublishingOptions) { - this.videoPublishingOptions = videoPublishingOptions; - return this; - } - - /** - * Get the localMediaCachePath property: Path to a local file system directory for caching of temporary media files. - * This will also be used to store content which cannot be immediately uploaded to Azure due to Internet - * connectivity issues. - * - * @return the localMediaCachePath value. - */ - public String getLocalMediaCachePath() { - return this.localMediaCachePath; - } - - /** - * Get the localMediaCacheMaximumSizeMiB property: Maximum amount of disk space that can be used for caching of - * temporary media files. Once this limit is reached, the oldest segments of the media archive will be continuously - * deleted in order to make space for new media, thus leading to gaps in the cloud recorded content. - * - * @return the localMediaCacheMaximumSizeMiB value. - */ - public String getLocalMediaCacheMaximumSizeMiB() { - return this.localMediaCacheMaximumSizeMiB; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", getName()); - jsonWriter.writeArrayField("inputs", getInputs(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("videoName", this.videoName); - jsonWriter.writeStringField("localMediaCachePath", this.localMediaCachePath); - jsonWriter.writeStringField("localMediaCacheMaximumSizeMiB", this.localMediaCacheMaximumSizeMiB); - jsonWriter.writeStringField("@type", this.type); - jsonWriter.writeJsonField("videoCreationProperties", this.videoCreationProperties); - jsonWriter.writeJsonField("videoPublishingOptions", this.videoPublishingOptions); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VideoSink from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VideoSink if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the VideoSink. - */ - public static VideoSink fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - boolean nameFound = false; - String name = null; - boolean inputsFound = false; - List inputs = null; - boolean videoNameFound = false; - String videoName = null; - boolean localMediaCachePathFound = false; - String localMediaCachePath = null; - boolean localMediaCacheMaximumSizeMiBFound = false; - String localMediaCacheMaximumSizeMiB = null; - String type = "#Microsoft.VideoAnalyzer.VideoSink"; - VideoCreationProperties videoCreationProperties = null; - VideoPublishingOptions videoPublishingOptions = null; - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - name = reader.getString(); - nameFound = true; - } else if ("inputs".equals(fieldName)) { - inputs = reader.readArray(reader1 -> NodeInput.fromJson(reader1)); - inputsFound = true; - } else if ("videoName".equals(fieldName)) { - videoName = reader.getString(); - videoNameFound = true; - } else if ("localMediaCachePath".equals(fieldName)) { - localMediaCachePath = reader.getString(); - localMediaCachePathFound = true; - } else if ("localMediaCacheMaximumSizeMiB".equals(fieldName)) { - localMediaCacheMaximumSizeMiB = reader.getString(); - localMediaCacheMaximumSizeMiBFound = true; - } else if ("@type".equals(fieldName)) { - type = reader.getString(); - } else if ("videoCreationProperties".equals(fieldName)) { - videoCreationProperties = VideoCreationProperties.fromJson(reader); - } else if ("videoPublishingOptions".equals(fieldName)) { - videoPublishingOptions = VideoPublishingOptions.fromJson(reader); - } else { - reader.skipChildren(); - } - } - if (nameFound - && inputsFound - && videoNameFound - && localMediaCachePathFound - && localMediaCacheMaximumSizeMiBFound) { - VideoSink deserializedVideoSink - = new VideoSink(name, inputs, videoName, localMediaCachePath, localMediaCacheMaximumSizeMiB); - deserializedVideoSink.type = type; - deserializedVideoSink.videoCreationProperties = videoCreationProperties; - deserializedVideoSink.videoPublishingOptions = videoPublishingOptions; - - return deserializedVideoSink; - } - List missingProperties = new ArrayList<>(); - if (!nameFound) { - missingProperties.add("name"); - } - if (!inputsFound) { - missingProperties.add("inputs"); - } - if (!videoNameFound) { - missingProperties.add("videoName"); - } - if (!localMediaCachePathFound) { - missingProperties.add("localMediaCachePath"); - } - if (!localMediaCacheMaximumSizeMiBFound) { - missingProperties.add("localMediaCacheMaximumSizeMiB"); - } - - throw new IllegalStateException( - "Missing required property/properties: " + String.join(", ", missingProperties)); - }); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/package-info.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/package-info.java deleted file mode 100644 index d435ce235646..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the data models for MicrosoftAzureSDKForAzureVideoAnalyzerOnIoTEdgeClientLibraryForJava. - * This package contains the edge client library for Azure Video Analyzer on IoT Edge. - */ -package com.azure.media.videoanalyzer.edge.models; diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/package-info.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/package-info.java deleted file mode 100644 index 239147b16b70..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/com/azure/media/videoanalyzer/edge/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the classes for MicrosoftAzureSDKForAzureVideoAnalyzerOnIoTEdgeClientLibraryForJava. - * This package contains the edge client library for Azure Video Analyzer on IoT Edge. - */ -package com.azure.media.videoanalyzer.edge; diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/module-info.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/module-info.java deleted file mode 100644 index 5ad92e51ecbd..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/main/java/module-info.java +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -module com.azure.media.videoanalyzer.edge { - requires transitive com.azure.core; - - exports com.azure.media.videoanalyzer.edge.models; - - opens com.azure.media.videoanalyzer.edge.models to com.azure.core; -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/samples/README.md b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/samples/README.md deleted file mode 100644 index 397f57bb5c38..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/samples/README.md +++ /dev/null @@ -1,167 +0,0 @@ -# Azure Video Analyzer Edge client library for Java - -This document explains samples and how to use them. - -## Getting started - -Getting started explained in detail [here][sdk_readme_getting_started]. - -## Key concepts - -Key concepts are explained in detail [here][sdk_readme_key_concepts]. - -## Examples - -### Creating a pipeline topology - -To create a pipeline topology you need to define parameters, sources, and sinks. - -```java readme-sample-buildPipelineTopology -private static PipelineTopology buildPipeLineTopology() { - IotHubMessageSource msgSource = new IotHubMessageSource("iotMsgSource") - .setHubInputName("${hubSourceInput}"); - - UsernamePasswordCredentials creds = new UsernamePasswordCredentials("${rtspUsername}", "${rtspPassword}"); - - UnsecuredEndpoint endpoint = new UnsecuredEndpoint("${rtspUrl}") - .setCredentials(creds); - - RtspSource rtspSource = new RtspSource("rtspSource", endpoint); - - NodeInput rtspInput = new NodeInput("rtspSource"); - - OutputSelector rtspOutputSelector = new OutputSelector() - .setProperty(OutputSelectorProperty.MEDIA_TYPE) - .setOperator(OutputSelectorOperator.IS) - .setValue("video"); - ImageScale imageScale = new ImageScale() - .setMode(ImageScaleMode.PRESERVE_ASPECT_RATIO) - .setHeight("416") - .setWidth("416"); - ImageFormatBmp imageFormat = new ImageFormatBmp(); - ImageProperties image = new ImageProperties() - .setScale(imageScale) - .setFormat(imageFormat); - ExtensionProcessorBase httpExtension = new HttpExtension("inferenceClient", Arrays.asList(rtspInput), endpoint, image); - - NodeInput nodeInput = new NodeInput("inferenceClient"); - - IotHubMessageSink msgSink = new IotHubMessageSink("msgSink", - Arrays.asList(nodeInput), - "${hubSinkOutputName}"); - - ParameterDeclaration userName = new ParameterDeclaration("rtspUserName", ParameterType.STRING); - - ParameterDeclaration password = new ParameterDeclaration("rtspPassword", ParameterType.SECRET_STRING); - ParameterDeclaration url = new ParameterDeclaration("rtspUrl", ParameterType.STRING); - ParameterDeclaration hubOutput = new ParameterDeclaration("hubSinkOutputName", ParameterType.STRING); - - PipelineTopologyProperties pipeProps = new PipelineTopologyProperties() - .setParameters(Arrays.asList(userName, password, url, hubOutput)) - .setSources(Arrays.asList(rtspSource)) - .setSinks(Arrays.asList(msgSink)) - .setProcessors(Arrays.asList(httpExtension)); - - return new PipelineTopology(TOPOLOGY_NAME) - .setProperties(pipeProps); -} -``` - -### Creating a live pipeline - -To create a live pipeline instance, you need to have an existing pipeline topology. - -```java readme-sample-buildLivePipeline -private static LivePipeline buildLivePipeline() { - ParameterDefinition hubParam = new ParameterDefinition("hubSinkOutputName") - .setValue("testHubOutput"); - ParameterDefinition userParam = new ParameterDefinition("rtspUserName") - .setValue("testuser"); - ParameterDefinition urlParam = new ParameterDefinition("rtspUrl") - .setValue("rtsp://sample-url-from-camera"); - ParameterDefinition passParam = new ParameterDefinition("rtspPassword") - .setValue("testpass"); - - LivePipelineProperties livePipelineProps = new LivePipelineProperties() - .setParameters(Arrays.asList(urlParam, userParam, passParam, hubParam)) - .setTopologyName(TOPOLOGY_NAME); - - return new LivePipeline(LIVE_PIPELINE_NAME) - .setProperties(livePipelineProps); -} -``` - -### Invoking a pipeline method request - -```java readme-sample-invokeDirectMethodHelper -private static MethodResult invokeDirectMethodHelper(DeviceMethod client, String methodName, String payload) throws IOException, IotHubException { - MethodResult result = null; - try { - result = client.invoke(iothubDeviceid, iothubModuleid, methodName, null, null, payload); - } catch (IotHubException e) { - System.out.println("An error has occurred."); - System.out.println(e.toString()); - } - - return result; -} -``` - -```java readme-sample-setPipelineTopologyRequest -PipelineTopologySetRequest setPipelineTopologyRequest = new PipelineTopologySetRequest(pipelineTopology); -MethodResult setPipelineResult = invokeDirectMethodHelper(dClient, setPipelineTopologyRequest.getMethodName(), setPipelineTopologyRequest.getPayloadAsJson()); -System.out.println(setPipelineResult.getPayload()); -``` - -## Troubleshooting - -Troubleshooting steps can be found [here][sdk_readme_troubleshooting]. - -## Next steps - -- [Samples][samples] -- [Azure IoT Device SDK][iot-device-sdk] -- [Azure IoTHub Service SDK][iot-hub-sdk] - -## Contributing - -This project welcomes contributions and suggestions. Most contributions require -you to agree to a Contributor License Agreement (CLA) declaring that you have -the right to, and actually do, grant us the rights to use your contribution. -For details, visit https://cla.microsoft.com. - -If you encounter any issues, please open an issue on our [Github][github-page-issues]. - -When you submit a pull request, a CLA-bot will automatically determine whether -you need to provide a CLA and decorate the PR appropriately (e.g., label, -comment). Simply follow the instructions provided by the bot. You will only -need to do this once across all repos using our CLA. - -This project has adopted the -[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information, -see the Code of Conduct FAQ or contact opencode@microsoft.com with any -additional questions or comments. - - - -[azure_cli]: https://learn.microsoft.com/cli/azure -[azure_sub]: https://azure.microsoft.com/free/ -[cla]: https://cla.microsoft.com -[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ -[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ -[coc_contact]: mailto:opencode@microsoft.com -[package]: TODO://link-to-published-package -[source]: TODO://link-to-published-source -[doc_direct_methods]: TODO://lilink-to-published-docnk -[doc_product]: TODO://link-to-published-doc -[doc_pipeline]: TODO://link-to-published-doc -[iot_device_connection_string]: TODO://link-to-published-doc -[iot-device-sdk]: https://central.sonatype.com/artifact/com.microsoft.azure.sdk.iot/iot-service-client -[iot-hub-sdk]: https://github.com/Azure/azure-iot-sdk-java -[github-page-issues]: https://github.com/Azure/azure-sdk-for-java/issues -[sdk_readme_key_concepts]: TODO://link-to-published-readme -[sdk_readme_getting_started]: TODO://link-to-published-readme -[sdk_readme_troubleshooting]: TODO://link-to-published-readme -[samples]: TODO://link-to-published-samples - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fvideoanalyzer%2Fazure-media-videoanalyzer-edge%2FREADME.png) diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/samples/java/com/azure/media/videoanalyzer/edge/LvaInvokeModuleSample.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/samples/java/com/azure/media/videoanalyzer/edge/LvaInvokeModuleSample.java deleted file mode 100644 index 68ca09ed0ff5..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/src/samples/java/com/azure/media/videoanalyzer/edge/LvaInvokeModuleSample.java +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.media.videoanalyzer.edge; - -import com.azure.media.videoanalyzer.edge.models.ExtensionProcessorBase; -import com.azure.media.videoanalyzer.edge.models.HttpExtension; -import com.azure.media.videoanalyzer.edge.models.ImageFormatBmp; -import com.azure.media.videoanalyzer.edge.models.ImageProperties; -import com.azure.media.videoanalyzer.edge.models.ImageScale; -import com.azure.media.videoanalyzer.edge.models.ImageScaleMode; -import com.azure.media.videoanalyzer.edge.models.IotHubDeviceConnection; -import com.azure.media.videoanalyzer.edge.models.IotHubMessageSink; -import com.azure.media.videoanalyzer.edge.models.IotHubMessageSource; -import com.azure.media.videoanalyzer.edge.models.LivePipeline; -import com.azure.media.videoanalyzer.edge.models.LivePipelineActivateRequest; -import com.azure.media.videoanalyzer.edge.models.LivePipelineDeactivateRequest; -import com.azure.media.videoanalyzer.edge.models.LivePipelineDeleteRequest; -import com.azure.media.videoanalyzer.edge.models.LivePipelineGetRequest; -import com.azure.media.videoanalyzer.edge.models.LivePipelineListRequest; -import com.azure.media.videoanalyzer.edge.models.LivePipelineProperties; -import com.azure.media.videoanalyzer.edge.models.LivePipelineSetRequest; -import com.azure.media.videoanalyzer.edge.models.NodeInput; -import com.azure.media.videoanalyzer.edge.models.OnvifDeviceDiscoverRequest; -import com.azure.media.videoanalyzer.edge.models.OnvifDeviceGetRequest; -import com.azure.media.videoanalyzer.edge.models.OutputSelector; -import com.azure.media.videoanalyzer.edge.models.OutputSelectorOperator; -import com.azure.media.videoanalyzer.edge.models.OutputSelectorProperty; -import com.azure.media.videoanalyzer.edge.models.ParameterDeclaration; -import com.azure.media.videoanalyzer.edge.models.ParameterDefinition; -import com.azure.media.videoanalyzer.edge.models.ParameterType; -import com.azure.media.videoanalyzer.edge.models.PipelineTopology; -import com.azure.media.videoanalyzer.edge.models.PipelineTopologyDeleteRequest; -import com.azure.media.videoanalyzer.edge.models.PipelineTopologyGetRequest; -import com.azure.media.videoanalyzer.edge.models.PipelineTopologyListRequest; -import com.azure.media.videoanalyzer.edge.models.PipelineTopologyProperties; -import com.azure.media.videoanalyzer.edge.models.PipelineTopologySetRequest; -import com.azure.media.videoanalyzer.edge.models.RemoteDeviceAdapter; -import com.azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterDeleteRequest; -import com.azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterGetRequest; -import com.azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterListRequest; -import com.azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterProperties; -import com.azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterSetRequest; -import com.azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterTarget; -import com.azure.media.videoanalyzer.edge.models.RtspSource; -import com.azure.media.videoanalyzer.edge.models.SymmetricKeyCredentials; -import com.azure.media.videoanalyzer.edge.models.UnsecuredEndpoint; -import com.azure.media.videoanalyzer.edge.models.UsernamePasswordCredentials; -import com.microsoft.azure.sdk.iot.service.Device; -import com.microsoft.azure.sdk.iot.service.RegistryManager; -import com.microsoft.azure.sdk.iot.service.devicetwin.DeviceMethod; -import com.microsoft.azure.sdk.iot.service.devicetwin.MethodResult; -import com.microsoft.azure.sdk.iot.service.exceptions.IotHubException; - -import java.io.IOException; -import java.util.Arrays; - -/*** - * Public class showing code how to utilize the sdk - */ -public class LvaInvokeModuleSample { - - private static String iothubConnectionstring = System.getenv("iothub_connectionstring"); - private static String iothubDeviceid = System.getenv("iothub_deviceid"); - private static String iothubModuleid = System.getenv("iothub_moduleid"); - private static final String TOPOLOGY_NAME = "javaPipelineTopology"; - private static final String LIVE_PIPELINE_NAME = "javaLivePipeline"; - private static final String REMOTE_DEVICE_ADAPTER_NAME = "RemoteDeviceAdapterSample1"; - - /*** - * Build a pipeLine topology including its parameters, sources, and sinks - * @return PipelineTopology - */ - // BEGIN: readme-sample-buildPipelineTopology - private static PipelineTopology buildPipeLineTopology() { - IotHubMessageSource msgSource = new IotHubMessageSource("iotMsgSource") - .setHubInputName("${hubSourceInput}"); - - UsernamePasswordCredentials creds = new UsernamePasswordCredentials("${rtspUsername}", "${rtspPassword}"); - - UnsecuredEndpoint endpoint = new UnsecuredEndpoint("${rtspUrl}") - .setCredentials(creds); - - RtspSource rtspSource = new RtspSource("rtspSource", endpoint); - - NodeInput rtspInput = new NodeInput("rtspSource"); - - OutputSelector rtspOutputSelector = new OutputSelector() - .setProperty(OutputSelectorProperty.MEDIA_TYPE) - .setOperator(OutputSelectorOperator.IS) - .setValue("video"); - ImageScale imageScale = new ImageScale() - .setMode(ImageScaleMode.PRESERVE_ASPECT_RATIO) - .setHeight("416") - .setWidth("416"); - ImageFormatBmp imageFormat = new ImageFormatBmp(); - ImageProperties image = new ImageProperties() - .setScale(imageScale) - .setFormat(imageFormat); - ExtensionProcessorBase httpExtension = new HttpExtension("inferenceClient", Arrays.asList(rtspInput), endpoint, image); - - NodeInput nodeInput = new NodeInput("inferenceClient"); - - IotHubMessageSink msgSink = new IotHubMessageSink("msgSink", - Arrays.asList(nodeInput), - "${hubSinkOutputName}"); - - ParameterDeclaration userName = new ParameterDeclaration("rtspUserName", ParameterType.STRING); - - ParameterDeclaration password = new ParameterDeclaration("rtspPassword", ParameterType.SECRET_STRING); - ParameterDeclaration url = new ParameterDeclaration("rtspUrl", ParameterType.STRING); - ParameterDeclaration hubOutput = new ParameterDeclaration("hubSinkOutputName", ParameterType.STRING); - - PipelineTopologyProperties pipeProps = new PipelineTopologyProperties() - .setParameters(Arrays.asList(userName, password, url, hubOutput)) - .setSources(Arrays.asList(rtspSource)) - .setSinks(Arrays.asList(msgSink)) - .setProcessors(Arrays.asList(httpExtension)); - - return new PipelineTopology(TOPOLOGY_NAME) - .setProperties(pipeProps); - } - // END: readme-sample-buildPipelineTopology - - /*** - * Build a live pipeline using a pipeline topology - * @return LivePipeline - */ - // BEGIN: readme-sample-buildLivePipeline - private static LivePipeline buildLivePipeline() { - ParameterDefinition hubParam = new ParameterDefinition("hubSinkOutputName") - .setValue("testHubOutput"); - ParameterDefinition userParam = new ParameterDefinition("rtspUserName") - .setValue("testuser"); - ParameterDefinition urlParam = new ParameterDefinition("rtspUrl") - .setValue("rtsp://sample-url-from-camera"); - ParameterDefinition passParam = new ParameterDefinition("rtspPassword") - .setValue("testpass"); - - LivePipelineProperties livePipelineProps = new LivePipelineProperties() - .setParameters(Arrays.asList(urlParam, userParam, passParam, hubParam)) - .setTopologyName(TOPOLOGY_NAME); - - return new LivePipeline(LIVE_PIPELINE_NAME) - .setProperties(livePipelineProps); - } - // END: readme-sample-buildLivePipeline - - private static RemoteDeviceAdapter createRemoteDeviceAdapter(String remoteDeviceName, String iotDeviceName) throws IOException, IotHubException { - RegistryManager registryManager = new RegistryManager(iothubConnectionstring); - Device iotDevice; - try { - iotDevice = registryManager.getDevice(iotDeviceName); - } catch (IllegalArgumentException e) { - iotDevice = registryManager.addDevice(Device.createFromId(iotDeviceName, null, null)); - } - - IotHubDeviceConnection iotHubDeviceConnection = new IotHubDeviceConnection(iotDeviceName) - .setCredentials(new SymmetricKeyCredentials(iotDevice.getPrimaryKey())); - - RemoteDeviceAdapterProperties remoteDeviceAdapterProperties = new RemoteDeviceAdapterProperties(new RemoteDeviceAdapterTarget("camerasimulator"), iotHubDeviceConnection); - - return new RemoteDeviceAdapter(remoteDeviceName) - .setProperties(remoteDeviceAdapterProperties); - } - /*** - * Helper method to invoke module method on iot hub device - * @param client Iot Hub Service Client - * @param methodName method name to invoke on module - * @param payload payload to send to module - * @return Result from invoke method call - * @throws IOException IOException - * @throws IotHubException IotHubException - */ - // BEGIN: readme-sample-invokeDirectMethodHelper - private static MethodResult invokeDirectMethodHelper(DeviceMethod client, String methodName, String payload) throws IOException, IotHubException { - MethodResult result = null; - try { - result = client.invoke(iothubDeviceid, iothubModuleid, methodName, null, null, payload); - } catch (IotHubException e) { - System.out.println("An error has occurred."); - System.out.println(e.toString()); - } - - return result; - } - // END: readme-sample-invokeDirectMethodHelper - - private static void initializeIotHubCredentials() { - iothubConnectionstring = System.getenv("iothub_connectionstring"); - iothubDeviceid = System.getenv("iothub_deviceid"); - iothubModuleid = System.getenv("iothub_moduleid"); - } - /*** - * Main method to run sample - * @param args args - * @throws IOException IOException - * @throws IotHubException IotHubException - */ - public static void main(String[] args) throws IOException, IotHubException { - PipelineTopology pipelineTopology = buildPipeLineTopology(); - LivePipeline livePipeline = buildLivePipeline(); - DeviceMethod dClient = new DeviceMethod(iothubConnectionstring); - - // BEGIN: readme-sample-setPipelineTopologyRequest - PipelineTopologySetRequest setPipelineTopologyRequest = new PipelineTopologySetRequest(pipelineTopology); - MethodResult setPipelineResult = invokeDirectMethodHelper(dClient, setPipelineTopologyRequest.getMethodName(), setPipelineTopologyRequest.getPayloadAsJson()); - System.out.println(setPipelineResult.getPayload()); - // END: readme-sample-setPipelineTopologyRequest - - PipelineTopologyGetRequest getTopologyRequest = new PipelineTopologyGetRequest(pipelineTopology.getName()); - MethodResult getTopologyResult = invokeDirectMethodHelper(dClient, getTopologyRequest.getMethodName(), getTopologyRequest.getPayloadAsJson()); - System.out.println(getTopologyResult); - - PipelineTopologyListRequest listTopologyRequest = new PipelineTopologyListRequest(); - MethodResult listPipelineResult = invokeDirectMethodHelper(dClient, listTopologyRequest.getMethodName(), listTopologyRequest.getPayloadAsJson()); - System.out.println(listPipelineResult); - - LivePipelineSetRequest setLivePipelineRequest = new LivePipelineSetRequest(livePipeline); - MethodResult setLivePipelineResult = invokeDirectMethodHelper(dClient, setLivePipelineRequest.getMethodName(), setLivePipelineRequest.getPayloadAsJson()); - System.out.println(setLivePipelineResult); - - LivePipelineListRequest listLivePipelineRequest = new LivePipelineListRequest(); - MethodResult liveLivePipelineResult = invokeDirectMethodHelper(dClient, listLivePipelineRequest.getMethodName(), listLivePipelineRequest.getPayloadAsJson()); - - LivePipelineActivateRequest activateLivePipelineRequest = new LivePipelineActivateRequest(livePipeline.getName()); - MethodResult activateLivePipelineResult = invokeDirectMethodHelper(dClient, activateLivePipelineRequest.getMethodName(), activateLivePipelineRequest.getPayloadAsJson()); - - LivePipelineGetRequest getLivePipelineRequest = new LivePipelineGetRequest(livePipeline.getName()); - MethodResult getLivePipelineResult = invokeDirectMethodHelper(dClient, getLivePipelineRequest.getMethodName(), getLivePipelineRequest.getPayloadAsJson()); - - LivePipelineDeactivateRequest deactivateLivePipelineRequest = new LivePipelineDeactivateRequest(livePipeline.getName()); - MethodResult deactivateLivePipelineResult = invokeDirectMethodHelper(dClient, deactivateLivePipelineRequest.getMethodName(), deactivateLivePipelineRequest.getPayloadAsJson()); - - LivePipelineDeleteRequest deleteLivePipelineRequest = new LivePipelineDeleteRequest(livePipeline.getName()); - MethodResult deleteLivePipelineResult = invokeDirectMethodHelper(dClient, deleteLivePipelineRequest.getMethodName(), deleteLivePipelineRequest.getPayloadAsJson()); - - PipelineTopologyDeleteRequest deletePipelineRequest = new PipelineTopologyDeleteRequest(livePipeline.getName()); - MethodResult deletePipelineResult = invokeDirectMethodHelper(dClient, deletePipelineRequest.getMethodName(), deleteLivePipelineRequest.getPayloadAsJson()); - - RemoteDeviceAdapter remoteDeviceAdapter = createRemoteDeviceAdapter(REMOTE_DEVICE_ADAPTER_NAME, "iotDeviceSample"); - RemoteDeviceAdapterSetRequest remoteDeviceAdapterSetRequest = new RemoteDeviceAdapterSetRequest(remoteDeviceAdapter); - MethodResult remoteDeviceAdapterSetResult = invokeDirectMethodHelper(dClient, remoteDeviceAdapterSetRequest.getMethodName(), remoteDeviceAdapterSetRequest.getPayloadAsJson()); - System.out.println(remoteDeviceAdapterSetResult); - - RemoteDeviceAdapterGetRequest remoteDeviceGetRequest = new RemoteDeviceAdapterGetRequest(REMOTE_DEVICE_ADAPTER_NAME); - MethodResult remoteDeviceGetResult = invokeDirectMethodHelper(dClient, remoteDeviceGetRequest.getMethodName(), remoteDeviceGetRequest.getPayloadAsJson()); - - RemoteDeviceAdapterListRequest remoteDeviceAdapterListRequest = new RemoteDeviceAdapterListRequest(); - MethodResult remoteDeviceAdapterListResult = invokeDirectMethodHelper(dClient, remoteDeviceAdapterListRequest.getMethodName(), remoteDeviceAdapterListRequest.getPayloadAsJson()); - - RemoteDeviceAdapterDeleteRequest remoteDeviceAdapterDeleteRequest = new RemoteDeviceAdapterDeleteRequest(REMOTE_DEVICE_ADAPTER_NAME); - MethodResult remoteDeviceAdapterDeleteResult = invokeDirectMethodHelper(dClient, remoteDeviceAdapterDeleteRequest.getMethodName(), remoteDeviceAdapterDeleteRequest.getPayloadAsJson()); - - OnvifDeviceGetRequest onvifDeviceGetRequest = new OnvifDeviceGetRequest(new UnsecuredEndpoint("rtsp://camerasimulator:554")); - MethodResult onvifDeviceGetResult = invokeDirectMethodHelper(dClient, onvifDeviceGetRequest.getMethodName(), onvifDeviceGetRequest.getPayloadAsJson()); - - OnvifDeviceDiscoverRequest onvifDeviceDiscoverRequest = new OnvifDeviceDiscoverRequest(); - MethodResult onvifDeviceDiscoverResult = invokeDirectMethodHelper(dClient, onvifDeviceDiscoverRequest.getMethodName(), onvifDeviceGetRequest.getPayloadAsJson()); - } -} diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/swagger/README.md b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/swagger/README.md deleted file mode 100644 index 08122c854677..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/swagger/README.md +++ /dev/null @@ -1,102 +0,0 @@ -# Azure Java Autorest config file - -> see https://aka.ms/autorest - -## Configuration - -```yaml -title: Microsoft Azure SDK for Azure Video Analyzer on IoT Edge - edge client library for Java -description: This package contains the edge client library for Azure Video Analyzer on IoT Edge. -license-header: MICROSOFT_MIT_SMALL -output-folder: ../ -source-code-folder-path: ./src/generated -java: true -require: https://github.com/Azure/azure-rest-api-specs/blob/60fcb275cbce38d343f9c35411786e672aba154e/specification/videoanalyzer/data-plane/readme.md -namespace: com.azure.media.videoanalyzer.edge -sync-methods: none -models-subpackage: models -custom-types-subpacakge: models -use: '@autorest/java@4.1.42' -required-fields-as-ctor-args: true -customization-class: src/main/java/VideoAnalyzerEdgeCustomization.java -``` - -### discriminator vs default enum -```yaml -directive: -- from: AzureVideoAnalyzerSdkDefinitions.json - where: $.definitions - transform: > - let definitionKeys = Object.keys($); - for(let i = 0; i < definitionKeys.length; i++) { - if(definitionKeys[i] === "MethodRequest") { - delete $[definitionKeys[i]].properties.methodName; - delete $[definitionKeys[i]].discriminator; - delete $[definitionKeys[i]].properties["@apiVersion"].enum; - delete $[definitionKeys[i]].properties["@apiVersion"]["x-ms-enum"]; - } - else { - if($[definitionKeys[i]]["x-ms-discriminator-value"]) { - let definition = $[definitionKeys[i]]; - let value = definition["x-ms-discriminator-value"]; - delete definition["x-ms-discriminator-value"]; - if(!definition.properties) { - definition.properties = {}; - } - definition.properties.methodName = { - "type": "string", - "description": "method name", - "readOnly": true - }; - if(definition.required){ - definition.required.push("methodName"); - } - else { - definition.required = ["methodName"]; - } - } - } - } -``` - -### Add AssetSink -```yaml -directive: -- from: AzureVideoAnalyzer.json - where: $.definitions - transform: > - $.AssetSink = { - "type": "object", - "properties": { - "assetContainerSasUrl": { - "type": "string", - "description": "An Azure Storage SAS Url which points to container, such as the one created for an Azure Media Services asset." - }, - "segmentLength": { - "type": "string", - "description": "When writing media to an asset, wait until at least this duration of media has been accumulated on the Edge. Expressed in increments of 30 seconds, with a minimum of 30 seconds and a recommended maximum of 5 minutes." - }, - "localMediaCachePath": { - "type": "string", - "description": "Path to a local file system directory for temporary caching of media before writing to an Asset. Used when the Edge device is temporarily disconnected from Azure." - }, - "localMediaCacheMaximumSizeMiB": { - "type": "string", - "description": "Maximum amount of disk space that can be used for temporary caching of media." - } - }, - "required": [ - "@type", - "assetContainerSasUrl", - "localMediaCachePath", - "localMediaCacheMaximumSizeMiB" - ], - "allOf": [ - { - "$ref": "#/definitions/SinkNodeBase" - } - ], - "description": "Enables a pipeline topology to record media to an Azure Media Services asset for subsequent playback.", - "x-ms-discriminator-value": "#Microsoft.VideoAnalyzer.AssetSink" - }; -``` diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/swagger/pom.xml b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/swagger/pom.xml deleted file mode 100644 index 83812cd4161d..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/swagger/pom.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - com.azure - azure-code-customization-parent - 1.0.0-beta.1 - ../../../parents/azure-code-customization-parent - - - com.azure - azure-media-videoanalyzer-edge-customization - 1.0.0-beta.1 - 4.0.0 - diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/swagger/src/main/java/VideoAnalyzerEdgeCustomization.java b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/swagger/src/main/java/VideoAnalyzerEdgeCustomization.java deleted file mode 100644 index 3cd2d057c353..000000000000 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/swagger/src/main/java/VideoAnalyzerEdgeCustomization.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -import com.azure.autorest.customization.ClassCustomization; -import com.azure.autorest.customization.Customization; -import com.azure.autorest.customization.LibraryCustomization; -import com.azure.autorest.customization.PackageCustomization; -import com.github.javaparser.StaticJavaParser; -import com.github.javaparser.ast.CompilationUnit; -import com.github.javaparser.ast.Modifier; -import com.github.javaparser.ast.Node; -import com.github.javaparser.ast.body.MethodDeclaration; -import com.github.javaparser.ast.type.ClassOrInterfaceType; -import com.github.javaparser.javadoc.Javadoc; -import com.github.javaparser.javadoc.description.JavadocDescription; -import org.slf4j.Logger; - -import java.util.Map; -import java.util.function.Function; -import java.util.stream.Collectors; - -/** - * Customization class for Video Analyzer Edge. - */ -public class VideoAnalyzerEdgeCustomization extends Customization { - @Override - public void customize(LibraryCustomization libraryCustomization, Logger logger) { - customizeModelsPackage(libraryCustomization.getPackage("com.azure.media.videoanalyzer.edge.models")); - } - - private void customizeModelsPackage(PackageCustomization packageCustomization) { - customizeMethodRequest(packageCustomization.getClass("MethodRequest")); - customizePipelineSetRequest(packageCustomization.getClass("PipelineTopologySetRequest")); - customizeLivePipelineSetRequest(packageCustomization.getClass("LivePipelineSetRequest")); - customizeRemoteDeviceAdapterSetRequest(packageCustomization.getClass("RemoteDeviceAdapterSetRequest")); - - Map classNameToCustomization = packageCustomization.listClasses() - .stream() - .collect(Collectors.toMap(ClassCustomization::getClassName, Function.identity())); - - // Remove "setApiVersion" from "MethodRequest" subtypes. - for (ClassCustomization customization : classNameToCustomization.values()) { - if ("MethodRequest".equals(customization.getClassName())) { - continue; // Don't need to modify MethodRequest itself. - } - - if (extendsMethodRequest(customization, classNameToCustomization)) { - customization.customizeAst(ast -> ast.getClassByName(customization.getClassName()) - .ifPresent(clazz -> clazz.getMethodsByName("setApiVersion").forEach(Node::remove))); - } - } - } - - private void customizePipelineSetRequest(ClassCustomization classCustomization) { - addGetPayloadAsJsonShared(classCustomization, "PipelineTopologySetRequestBody", "pipelineTopology"); - } - - private void customizeRemoteDeviceAdapterSetRequest(ClassCustomization classCustomization) { - addGetPayloadAsJsonShared(classCustomization, "RemoteDeviceAdapterSetRequestBody", "remoteDeviceAdapter"); - } - - private void customizeLivePipelineSetRequest(ClassCustomization classCustomization) { - addGetPayloadAsJsonShared(classCustomization, "LivePipelineSetRequestBody", "livePipeline"); - } - - private static void addGetPayloadAsJsonShared(ClassCustomization customization, String classToCreate, - String fieldToUse) { - customization.customizeAst(ast -> { - ast.addImport("java.io.UncheckedIOException"); - - ast.getClassByName(customization.getClassName()) - .ifPresent(clazz -> clazz.addMethod("getPayloadAsJson", Modifier.Keyword.PUBLIC) - .setType("String") - .setBody(StaticJavaParser.parseBlock(String.format("{return new %1$s(this.%2$s.getName())" - + ".setSystemData(this.%2$s.getSystemData()).setProperties(this.%2$s.getProperties())" - + ".getPayloadAsJson();}", classToCreate, fieldToUse))) - .setJavadocComment(createGetPayloadAsJsonJavadoc())); - }); - } - - private void customizeMethodRequest(ClassCustomization classCustomization) { - classCustomization.customizeAst(ast -> { - ast.addImport("com.azure.core.util.logging.ClientLogger"); - ast.addImport("java.io.UncheckedIOException"); - - ast.getClassByName(classCustomization.getClassName()) - .ifPresent(clazz -> { - clazz.addFieldWithInitializer("ClientLogger", "LOGGER", - StaticJavaParser.parseExpression("new ClientLogger(" + classCustomization.getClassName() + ".class)"), - Modifier.Keyword.PRIVATE, Modifier.Keyword.STATIC, Modifier.Keyword.FINAL); - - clazz.addMethod("getPayloadAsJson", Modifier.Keyword.PUBLIC) - .setType("String") - .setBody(StaticJavaParser.parseBlock("{try { return this.toJsonString(); } " - + "catch (IOException ex) { throw LOGGER.logExceptionAsError(new UncheckedIOException(ex)); }}")) - .setJavadocComment(createGetPayloadAsJsonJavadoc()); - - clazz.getMethodsByName("setApiVersion").forEach(MethodDeclaration::setModifiers); - }); - }); - } - - private static Javadoc createGetPayloadAsJsonJavadoc() { - return new Javadoc(JavadocDescription.parseText( - "Get the payload as JSON: the serialized form of the request body")) - .addBlockTag("throws", "UncheckedIOException", "UncheckedIOException") - .addBlockTag("return", "the payload as JSON"); - } - - private static boolean extendsMethodRequest(ClassCustomization customization, - Map classNameToCustomization) { - CompilationUnit ast = getAst(customization); - for (ClassOrInterfaceType extended : ast.getClassByName(customization.getClassName()).get().getExtendedTypes()) { - String extendedName = extended.asString(); - if ("MethodRequest".equals(extendedName)) { - return true; - } - - ClassCustomization extendedCustomization = classNameToCustomization.get(extendedName); - if (extendedCustomization == null) { - continue; - } - - if (extendsMethodRequest(extendedCustomization, classNameToCustomization)) { - return true; - } - } - - return false; - } - - private static CompilationUnit getAst(ClassCustomization customization) { - return StaticJavaParser.parse(customization.getEditor().getFileContent(customization.getFileName())); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/CHANGELOG.md b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/CHANGELOG.md deleted file mode 100644 index ff0a0adda9c2..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/CHANGELOG.md +++ /dev/null @@ -1,445 +0,0 @@ -# Release History - -## 1.0.0-beta.6 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.5 (2022-05-13) - -- We’re retiring the Azure Video Analyzer preview service; you're advised to transition your applications off of Video Analyzer by 01 December 2022. This SDK is no longer maintained and won’t work after the service is retired. To learn how to transition off, please refer to: [Transition from Azure Video Analyzer](https://aka.ms/azsdk/videoanalyzer/transitionoffguidance) - -- Azure Resource Manager Video Analyzer client library for Java. This package contains Microsoft Azure SDK for Video Analyzer Management SDK. Azure Video Analyzer provides a platform for you to build intelligent video applications that span the edge and the cloud. Package tag package-preview-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). - -### Breaking Changes - -* `models.VideoAnalyzersUpdateHeaders` was removed - -* `models.VideoAnalyzersCreateOrUpdateHeaders` was removed - -* `models.VideoAnalyzersUpdateResponse` was removed - -* `models.VideoAnalyzersCreateOrUpdateResponse` was removed - -### Features Added - -#### `models.PipelineJob` was modified - -* `resourceGroupName()` was added - -#### `models.AccessPolicyEntity` was modified - -* `resourceGroupName()` was added - -#### `VideoAnalyzerManager` was modified - -* `authenticate(com.azure.core.http.HttpPipeline,com.azure.core.management.profile.AzureProfile)` was added - -#### `models.LivePipeline` was modified - -* `resourceGroupName()` was added - -#### `models.VideoAnalyzer` was modified - -* `resourceGroupName()` was added - -#### `VideoAnalyzerManager$Configurable` was modified - -* `withRetryOptions(com.azure.core.http.policy.RetryOptions)` was added - -#### `models.VideoEntity` was modified - -* `resourceGroupName()` was added - -#### `models.EdgeModuleEntity` was modified - -* `resourceGroupName()` was added - -#### `models.PrivateEndpointConnection` was modified - -* `resourceGroupName()` was added - -#### `models.PipelineTopology` was modified - -* `resourceGroupName()` was added - -## 1.0.0-beta.4 (2021-10-27) - -- Azure Resource Manager Video Analyzer client library for Java. This package contains Microsoft Azure SDK for Video Analyzer Management SDK. Azure Video Analyzer provides a platform for you to build intelligent video applications that span the edge and the cloud. Package tag package-preview-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). - -### Features Added - -#### `models.VideoEntity$Update` was modified - -* `withMediaInfo(models.VideoMediaInfo)` was added - -#### `models.VideoEntity$Definition` was modified - -* `withMediaInfo(models.VideoMediaInfo)` was added - -#### `models.VideoMediaInfo` was modified - -* `withSegmentLength(java.lang.String)` was added - -## 1.0.0-beta.3 (2021-10-18) - -- Azure Resource Manager Video Analyzer client library for Java. This package contains Microsoft Azure SDK for Video Analyzer Management SDK. Azure Video Analyzer provides a platform for you to build intelligent video applications that span the edge and the cloud. Package tag package-preview-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). - -### Breaking Changes - -* `models.VideoStreaming` was removed - -* `models.SyncStorageKeysInput` was removed - -* `models.VideoAnalyzerProperties` was removed - -* `models.VideoAnalyzerPropertiesUpdate` was removed - -* `models.VideoStreamingToken` was removed - -#### `models.VideoAnalyzers` was modified - -* `syncStorageKeysWithResponse(java.lang.String,java.lang.String,models.SyncStorageKeysInput,com.azure.core.util.Context)` was removed -* `syncStorageKeys(java.lang.String,java.lang.String,models.SyncStorageKeysInput)` was removed - -#### `models.EdgeModules` was modified - -* `list(java.lang.String,java.lang.String,java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was removed - -#### `models.VideoAnalyzer` was modified - -* `syncStorageKeys(models.SyncStorageKeysInput)` was removed -* `systemData()` was removed -* `syncStorageKeysWithResponse(models.SyncStorageKeysInput,com.azure.core.util.Context)` was removed - -#### `models.VideoEntity` was modified - -* `listStreamingTokenWithResponse(com.azure.core.util.Context)` was removed -* `streaming()` was removed -* `listStreamingToken()` was removed - -#### `models.Videos` was modified - -* `listStreamingTokenWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `listStreamingToken(java.lang.String,java.lang.String,java.lang.String)` was removed - -#### `models.VideoFlags` was modified - -* `withIsRecording(boolean)` was removed -* `isRecording()` was removed - -#### `models.EdgeModuleEntity` was modified - -* `systemData()` was removed - -#### `models.UserAssignedManagedIdentity` was modified - -* `java.lang.String clientId()` -> `java.util.UUID clientId()` -* `java.lang.String principalId()` -> `java.util.UUID principalId()` - -### Features Added - -* `models.PipelineJobState` was added - -* `models.ProcessorNodeBase` was added - -* `models.ParameterDeclaration` was added - -* `models.VideoContentToken` was added - -* `models.PipelineJob` was added - -* `models.VideoSequenceAbsoluteTimeMarkers` was added - -* `models.EncoderPresetBase` was added - -* `models.PipelineJobCollection` was added - -* `models.PrivateEndpointConnectionsCreateOrUpdateResponse` was added - -* `models.PrivateEndpointConnectionProvisioningState` was added - -* `models.LivePipelineOperationStatuses` was added - -* `models.PipelineJobUpdate` was added - -* `models.VideoAnalyzerOperationResults` was added - -* `models.PrivateEndpointConnection$Definition` was added - -* `models.IotHub` was added - -* `models.UnsecuredEndpoint` was added - -* `models.NetworkAccessControl` was added - -* `models.PrivateLinkResourceListResult` was added - -* `models.GroupLevelAccessControl` was added - -* `models.PipelineTopology$UpdateStages` was added - -* `models.PipelineTopologyUpdate` was added - -* `models.EncoderProcessor` was added - -* `models.TimeSequenceBase` was added - -* `models.PipelineJob$Definition` was added - -* `models.CredentialsBase` was added - -* `models.LivePipelineUpdate` was added - -* `models.EndpointBase` was added - -* `models.PipelineJob$DefinitionStages` was added - -* `models.VideoPublishingOptions` was added - -* `models.PipelineTopologyCollection` was added - -* `models.CertificateSource` was added - -* `models.PrivateLinkResource` was added - -* `models.VideoCreationProperties` was added - -* `models.EncoderSystemPreset` was added - -* `models.PublicNetworkAccess` was added - -* `models.VideoEncoderH264` was added - -* `models.PrivateEndpoint` was added - -* `models.VideoAnalyzersUpdateHeaders` was added - -* `models.VideoAnalyzerOperationStatuses` was added - -* `models.PemCertificateList` was added - -* `models.PrivateLinkServiceConnectionState` was added - -* `models.RtspSource` was added - -* `models.VideoAnalyzersCreateOrUpdateHeaders` was added - -* `models.PipelineJobError` was added - -* `models.PipelineJob$UpdateStages` was added - -* `models.VideoEncoderBase` was added - -* `models.LivePipeline` was added - -* `models.PrivateEndpointConnection$UpdateStages` was added - -* `models.SkuTier` was added - -* `models.PrivateEndpointConnection$DefinitionStages` was added - -* `models.PipelineTopology$DefinitionStages` was added - -* `models.VideoContentUrls` was added - -* `models.PipelineTopology$Update` was added - -* `models.TunnelBase` was added - -* `models.PipelineTopology$Definition` was added - -* `models.VideoPreviewImageUrls` was added - -* `models.NodeInput` was added - -* `models.OperationStatuses` was added - -* `models.LivePipelineCollection` was added - -* `models.Sku` was added - -* `models.PipelineJob$Update` was added - -* `models.SinkNodeBase` was added - -* `models.EncoderCustomPreset` was added - -* `models.VideoArchival` was added - -* `models.PrivateEndpointConnectionListResult` was added - -* `models.SkuName` was added - -* `models.LivePipeline$DefinitionStages` was added - -* `models.ParameterType` was added - -* `models.LivePipeline$Update` was added - -* `models.PrivateEndpointConnection$Update` was added - -* `models.Kind` was added - -* `models.LivePipelines` was added - -* `models.PipelineTopologies` was added - -* `models.PrivateLinkResources` was added - -* `models.PipelineJobOperationStatus` was added - -* `models.VideoSink` was added - -* `models.LivePipeline$UpdateStages` was added - -* `models.NodeBase` was added - -* `models.VideoSource` was added - -* `models.LivePipelineOperationStatus` was added - -* `models.VideoAnalyzersUpdateResponse` was added - -* `models.VideoScale` was added - -* `models.TlsEndpoint` was added - -* `models.VideoAnalyzersCreateOrUpdateResponse` was added - -* `models.UsernamePasswordCredentials` was added - -* `models.RtspTransport` was added - -* `models.OperationResults` was added - -* `models.PrivateEndpointConnections` was added - -* `models.SourceNodeBase` was added - -* `models.SecureIotDeviceRemoteTunnel` was added - -* `models.PipelineJobs` was added - -* `models.EncoderSystemPresetType` was added - -* `models.LivePipeline$Definition` was added - -* `models.PrivateEndpointConnection` was added - -* `models.PrivateEndpointServiceConnectionStatus` was added - -* `models.TlsValidationOptions` was added - -* `models.VideoScaleMode` was added - -* `models.PrivateEndpointConnectionsCreateOrUpdateHeaders` was added - -* `models.AudioEncoderAac` was added - -* `models.ProvisioningState` was added - -* `models.AudioEncoderBase` was added - -* `models.PipelineTopology` was added - -* `models.VideoAnalyzerOperationStatus` was added - -* `models.VideoAnalyzerPrivateEndpointConnectionOperationStatus` was added - -* `models.PipelineJobOperationStatuses` was added - -* `models.LivePipelineState` was added - -* `models.ParameterDefinition` was added - -#### `VideoAnalyzerManager` was modified - -* `livePipelineOperationStatuses()` was added -* `operationResults()` was added -* `videoAnalyzerOperationStatuses()` was added -* `pipelineTopologies()` was added -* `videoAnalyzerOperationResults()` was added -* `pipelineJobOperationStatuses()` was added -* `livePipelines()` was added -* `privateLinkResources()` was added -* `privateEndpointConnections()` was added -* `operationStatuses()` was added -* `pipelineJobs()` was added - -#### `models.VideoEntity$Update` was modified - -* `withArchival(models.VideoArchival)` was added - -#### `models.VideoEntity$Definition` was modified - -* `withArchival(models.VideoArchival)` was added - -#### `models.EdgeModules` was modified - -* `list(java.lang.String,java.lang.String,java.lang.Integer,com.azure.core.util.Context)` was added - -#### `models.VideoAnalyzer` was modified - -* `provisioningState()` was added -* `iotHubs()` was added -* `privateEndpointConnections()` was added -* `publicNetworkAccess()` was added -* `networkAccessControl()` was added - -#### `VideoAnalyzerManager$Configurable` was modified - -* `withScope(java.lang.String)` was added - -#### `models.VideoEntity` was modified - -* `contentUrls()` was added -* `listContentToken()` was added -* `archival()` was added -* `listContentTokenWithResponse(com.azure.core.util.Context)` was added - -#### `models.Videos` was modified - -* `listContentToken(java.lang.String,java.lang.String,java.lang.String)` was added -* `listContentTokenWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added - -#### `models.VideoFlags` was modified - -* `isInUse()` was added -* `withIsInUse(boolean)` was added - -#### `models.VideoAnalyzerUpdate` was modified - -* `networkAccessControl()` was added -* `withIotHubs(java.util.List)` was added -* `privateEndpointConnections()` was added -* `withNetworkAccessControl(models.NetworkAccessControl)` was added -* `withPublicNetworkAccess(models.PublicNetworkAccess)` was added -* `publicNetworkAccess()` was added -* `iotHubs()` was added -* `provisioningState()` was added - -#### `models.VideoAnalyzer$Definition` was modified - -* `withIotHubs(java.util.List)` was added -* `withPublicNetworkAccess(models.PublicNetworkAccess)` was added -* `withNetworkAccessControl(models.NetworkAccessControl)` was added - -#### `models.VideoAnalyzer$Update` was modified - -* `withNetworkAccessControl(models.NetworkAccessControl)` was added -* `withIotHubs(java.util.List)` was added -* `withPublicNetworkAccess(models.PublicNetworkAccess)` was added - -## 1.0.0-beta.2 (2021-05-25) - -- Azure Resource Manager Video Analyzer client library for Java. This package contains Microsoft Azure SDK for Video Analyzer Management SDK. Azure Video Analyzer provides a platform for you to build intelligent video applications that span the edge and the cloud. Package tag package-2021-05-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). - -## 1.0.0-beta.1 (2021-04-30) - -- Azure Resource Manager VideoAnalyzer client library for Java. This package contains Microsoft Azure SDK for VideoAnalyzer Management SDK. Azure Video Analyzer ARM Client. Package tag package-2021-05-01-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/videoanalyzer/azure-resourcemanager-videoanalyzer/README.md b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/README.md deleted file mode 100644 index 2afb2f3b3c26..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/README.md +++ /dev/null @@ -1,104 +0,0 @@ -# Azure Resource Manager Video Analyzer client library for Java - -We’re retiring the Azure Video Analyzer preview service; you're advised to transition your applications off of Video Analyzer by 01 December 2022. This SDK is no longer maintained and won’t work after the service is retired. To learn how to transition off, please refer to: [Transition from Azure Video Analyzer](https://aka.ms/azsdk/videoanalyzer/transitionoffguidance) - -Azure Resource Manager Video Analyzer client library for Java. - -This package contains Microsoft Azure SDK for Video Analyzer Management SDK. Azure Video Analyzer provides a platform for you to build intelligent video applications that span the edge and the cloud. Package tag package-preview-2021-11. 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-videoanalyzer;current}) -```xml - - com.azure.resourcemanager - azure-resourcemanager-videoanalyzer - 1.0.0-beta.5 - -``` -[//]: # ({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(); -VideoAnalyzerManager manager = VideoAnalyzerManager - .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/videoanalyzer/azure-resourcemanager-videoanalyzer/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://learn.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/videoanalyzer/azure-resourcemanager-videoanalyzer/SAMPLE.md b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/SAMPLE.md deleted file mode 100644 index 22df3777aa9c..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/SAMPLE.md +++ /dev/null @@ -1,1612 +0,0 @@ -# Code snippets and samples - - -## AccessPolicies - -- [CreateOrUpdate](#accesspolicies_createorupdate) -- [Delete](#accesspolicies_delete) -- [Get](#accesspolicies_get) -- [List](#accesspolicies_list) -- [Update](#accesspolicies_update) - -## EdgeModules - -- [CreateOrUpdate](#edgemodules_createorupdate) -- [Delete](#edgemodules_delete) -- [Get](#edgemodules_get) -- [List](#edgemodules_list) -- [ListProvisioningToken](#edgemodules_listprovisioningtoken) - -## LivePipelineOperationStatuses - -- [Get](#livepipelineoperationstatuses_get) - -## LivePipelines - -- [Activate](#livepipelines_activate) -- [CreateOrUpdate](#livepipelines_createorupdate) -- [Deactivate](#livepipelines_deactivate) -- [Delete](#livepipelines_delete) -- [Get](#livepipelines_get) -- [List](#livepipelines_list) -- [Update](#livepipelines_update) - -## Locations - -- [CheckNameAvailability](#locations_checknameavailability) - -## OperationResults - -- [Get](#operationresults_get) - -## OperationStatuses - -- [Get](#operationstatuses_get) - -## Operations - -- [List](#operations_list) - -## PipelineJobOperationStatuses - -- [Get](#pipelinejoboperationstatuses_get) - -## PipelineJobs - -- [Cancel](#pipelinejobs_cancel) -- [CreateOrUpdate](#pipelinejobs_createorupdate) -- [Delete](#pipelinejobs_delete) -- [Get](#pipelinejobs_get) -- [List](#pipelinejobs_list) -- [Update](#pipelinejobs_update) - -## PipelineTopologies - -- [CreateOrUpdate](#pipelinetopologies_createorupdate) -- [Delete](#pipelinetopologies_delete) -- [Get](#pipelinetopologies_get) -- [List](#pipelinetopologies_list) -- [Update](#pipelinetopologies_update) - -## PrivateEndpointConnections - -- [CreateOrUpdate](#privateendpointconnections_createorupdate) -- [Delete](#privateendpointconnections_delete) -- [Get](#privateendpointconnections_get) -- [List](#privateendpointconnections_list) - -## PrivateLinkResources - -- [Get](#privatelinkresources_get) -- [List](#privatelinkresources_list) - -## VideoAnalyzerOperationResults - -- [Get](#videoanalyzeroperationresults_get) - -## VideoAnalyzerOperationStatuses - -- [Get](#videoanalyzeroperationstatuses_get) - -## VideoAnalyzers - -- [CreateOrUpdate](#videoanalyzers_createorupdate) -- [Delete](#videoanalyzers_delete) -- [GetByResourceGroup](#videoanalyzers_getbyresourcegroup) -- [List](#videoanalyzers_list) -- [ListBySubscription](#videoanalyzers_listbysubscription) -- [Update](#videoanalyzers_update) - -## Videos - -- [CreateOrUpdate](#videos_createorupdate) -- [Delete](#videos_delete) -- [Get](#videos_get) -- [List](#videos_list) -- [ListContentToken](#videos_listcontenttoken) -- [Update](#videos_update) -### AccessPolicies_CreateOrUpdate - -```java -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicyEccAlgo; -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicyRsaAlgo; -import com.azure.resourcemanager.videoanalyzer.models.EccTokenKey; -import com.azure.resourcemanager.videoanalyzer.models.JwtAuthentication; -import com.azure.resourcemanager.videoanalyzer.models.RsaTokenKey; -import com.azure.resourcemanager.videoanalyzer.models.TokenClaim; -import java.util.Arrays; - -/** Samples for AccessPolicies CreateOrUpdate. */ -public final class AccessPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/access-policy-create.json - */ - /** - * Sample code: Register access policy entity. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void registerAccessPolicyEntity( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .accessPolicies() - .define("accessPolicyName1") - .withExistingVideoAnalyzer("testrg", "testaccount2") - .withAuthentication( - new JwtAuthentication() - .withIssuers(Arrays.asList("issuer1", "issuer2")) - .withAudiences(Arrays.asList("audience1")) - .withClaims( - Arrays - .asList( - new TokenClaim().withName("claimname1").withValue("claimvalue1"), - new TokenClaim().withName("claimname2").withValue("claimvalue2"))) - .withKeys( - Arrays - .asList( - new RsaTokenKey() - .withKid("123") - .withAlg(AccessPolicyRsaAlgo.RS256) - .withN("YmFzZTY0IQ==") - .withE("ZLFzZTY0IQ=="), - new EccTokenKey() - .withKid("124") - .withAlg(AccessPolicyEccAlgo.ES256) - .withX("XX==") - .withY("YY==")))) - .create(); - } -} -``` - -### AccessPolicies_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for AccessPolicies Delete. */ -public final class AccessPoliciesDeleteSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/access-policy-delete.json - */ - /** - * Sample code: Deletes an access policy entity. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deletesAnAccessPolicyEntity( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.accessPolicies().deleteWithResponse("testrg", "testaccount2", "accessPolicyName1", Context.NONE); - } -} -``` - -### AccessPolicies_Get - -```java -import com.azure.core.util.Context; - -/** Samples for AccessPolicies Get. */ -public final class AccessPoliciesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/access-policy-get.json - */ - /** - * Sample code: Gets an access policy entity. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getsAnAccessPolicyEntity(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.accessPolicies().getWithResponse("testrg", "testaccount2", "accessPolicyName1", Context.NONE); - } -} -``` - -### AccessPolicies_List - -```java -import com.azure.core.util.Context; - -/** Samples for AccessPolicies List. */ -public final class AccessPoliciesListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/access-policy-list.json - */ - /** - * Sample code: Lists access policy entities. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listsAccessPolicyEntities(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.accessPolicies().list("testrg", "testaccount2", 2, Context.NONE); - } -} -``` - -### AccessPolicies_Update - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicyEccAlgo; -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicyEntity; -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicyRsaAlgo; -import com.azure.resourcemanager.videoanalyzer.models.EccTokenKey; -import com.azure.resourcemanager.videoanalyzer.models.JwtAuthentication; -import com.azure.resourcemanager.videoanalyzer.models.RsaTokenKey; -import com.azure.resourcemanager.videoanalyzer.models.TokenClaim; -import java.util.Arrays; - -/** Samples for AccessPolicies Update. */ -public final class AccessPoliciesUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/access-policy-patch.json - */ - /** - * Sample code: Update access policy entity. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void updateAccessPolicyEntity(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - AccessPolicyEntity resource = - manager - .accessPolicies() - .getWithResponse("testrg", "testaccount2", "accessPolicyName1", Context.NONE) - .getValue(); - resource - .update() - .withAuthentication( - new JwtAuthentication() - .withIssuers(Arrays.asList("issuer1", "issuer2")) - .withAudiences(Arrays.asList("audience1")) - .withClaims( - Arrays - .asList( - new TokenClaim().withName("claimname1").withValue("claimvalue1"), - new TokenClaim().withName("claimname2").withValue("claimvalue2"))) - .withKeys( - Arrays - .asList( - new RsaTokenKey() - .withKid("123") - .withAlg(AccessPolicyRsaAlgo.RS256) - .withN("YmFzZTY0IQ==") - .withE("ZLFzZTY0IQ=="), - new EccTokenKey() - .withKid("124") - .withAlg(AccessPolicyEccAlgo.ES256) - .withX("XX==") - .withY("YY==")))) - .apply(); - } -} -``` - -### EdgeModules_CreateOrUpdate - -```java -/** Samples for EdgeModules CreateOrUpdate. */ -public final class EdgeModulesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/edge-modules-create.json - */ - /** - * Sample code: Registers an edge module. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void registersAnEdgeModule(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.edgeModules().define("edgeModule1").withExistingVideoAnalyzer("testrg", "testaccount2").create(); - } -} -``` - -### EdgeModules_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for EdgeModules Delete. */ -public final class EdgeModulesDeleteSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/edge-modules-delete.json - */ - /** - * Sample code: Deletes an edge module registration. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deletesAnEdgeModuleRegistration( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.edgeModules().deleteWithResponse("testrg", "testaccount2", "edgeModule1", Context.NONE); - } -} -``` - -### EdgeModules_Get - -```java -import com.azure.core.util.Context; - -/** Samples for EdgeModules Get. */ -public final class EdgeModulesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/edge-modules-get.json - */ - /** - * Sample code: Gets edge module registration. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getsEdgeModuleRegistration( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.edgeModules().getWithResponse("testrg", "testaccount2", "edgeModule1", Context.NONE); - } -} -``` - -### EdgeModules_List - -```java -import com.azure.core.util.Context; - -/** Samples for EdgeModules List. */ -public final class EdgeModulesListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/edge-modules-list.json - */ - /** - * Sample code: Lists the registered edge modules. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listsTheRegisteredEdgeModules( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.edgeModules().list("testrg", "testaccount2", null, Context.NONE); - } -} -``` - -### EdgeModules_ListProvisioningToken - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.ListProvisioningTokenInput; -import java.time.OffsetDateTime; - -/** Samples for EdgeModules ListProvisioningToken. */ -public final class EdgeModulesListProvisioningTokenSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/edge-modules-listProvisioningToken.json - */ - /** - * Sample code: Generate the Provisioning token for an edge module registration. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void generateTheProvisioningTokenForAnEdgeModuleRegistration( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .edgeModules() - .listProvisioningTokenWithResponse( - "testrg", - "testaccount2", - "edgeModule1", - new ListProvisioningTokenInput() - .withExpirationDate(OffsetDateTime.parse("2023-01-23T11:04:49.0526841-08:00")), - Context.NONE); - } -} -``` - -### LivePipelineOperationStatuses_Get - -```java -import com.azure.core.util.Context; - -/** Samples for LivePipelineOperationStatuses Get. */ -public final class LivePipelineOperationStatusesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/live-pipeline-operation-status-get.json - */ - /** - * Sample code: Get the live pipeline operation status. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getTheLivePipelineOperationStatus( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .livePipelineOperationStatuses() - .getWithResponse( - "testrg", "testaccount2", "livePipeline1", "00000000-0000-0000-0000-000000000001", Context.NONE); - } -} -``` - -### LivePipelines_Activate - -```java -import com.azure.core.util.Context; - -/** Samples for LivePipelines Activate. */ -public final class LivePipelinesActivateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/live-pipeline-activate.json - */ - /** - * Sample code: Activate live pipeline. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void activateLivePipeline(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.livePipelines().activate("testrg", "testaccount2", "livePipeline1", Context.NONE); - } -} -``` - -### LivePipelines_CreateOrUpdate - -```java -import com.azure.resourcemanager.videoanalyzer.models.ParameterDefinition; -import java.util.Arrays; - -/** Samples for LivePipelines CreateOrUpdate. */ -public final class LivePipelinesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/live-pipeline-create.json - */ - /** - * Sample code: Create or update a live pipeline. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void createOrUpdateALivePipeline( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .livePipelines() - .define("livePipeline1") - .withExistingVideoAnalyzer("testrg", "testaccount2") - .withTopologyName("pipelinetopology1") - .withDescription("Live Pipeline 1 Description") - .withBitrateKbps(500) - .withParameters( - Arrays - .asList( - new ParameterDefinition().withName("rtspUrlParameter").withValue("rtsp://contoso.com/stream"))) - .create(); - } -} -``` - -### LivePipelines_Deactivate - -```java -import com.azure.core.util.Context; - -/** Samples for LivePipelines Deactivate. */ -public final class LivePipelinesDeactivateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/live-pipeline-deactivate.json - */ - /** - * Sample code: Deactivate Live pipeline. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deactivateLivePipeline(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.livePipelines().deactivate("testrg", "testaccount2", "livePipeline1", Context.NONE); - } -} -``` - -### LivePipelines_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for LivePipelines Delete. */ -public final class LivePipelinesDeleteSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/live-pipeline-delete.json - */ - /** - * Sample code: Delete a live pipeline. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deleteALivePipeline(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.livePipelines().deleteWithResponse("testrg", "testaccount2", "livePipeline1", Context.NONE); - } -} -``` - -### LivePipelines_Get - -```java -import com.azure.core.util.Context; - -/** Samples for LivePipelines Get. */ -public final class LivePipelinesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/live-pipeline-get-by-name.json - */ - /** - * Sample code: Retrieves a specific live pipeline by name. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void retrievesASpecificLivePipelineByName( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.livePipelines().getWithResponse("testrg", "testaccount2", "livePipeline1", Context.NONE); - } -} -``` - -### LivePipelines_List - -```java -import com.azure.core.util.Context; - -/** Samples for LivePipelines List. */ -public final class LivePipelinesListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/live-pipeline-list.json - */ - /** - * Sample code: List live pipelines. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listLivePipelines(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.livePipelines().list("testrg", "testaccount2", null, 2, Context.NONE); - } -} -``` - -### LivePipelines_Update - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.LivePipeline; - -/** Samples for LivePipelines Update. */ -public final class LivePipelinesUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/live-pipeline-patch.json - */ - /** - * Sample code: Updates a live pipeline. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void updatesALivePipeline(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - LivePipeline resource = - manager.livePipelines().getWithResponse("testrg", "testaccount2", "livePipeline1", Context.NONE).getValue(); - resource.update().withDescription("Live Pipeline 1 Description").apply(); - } -} -``` - -### Locations_CheckNameAvailability - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.CheckNameAvailabilityRequest; - -/** Samples for Locations CheckNameAvailability. */ -public final class LocationsCheckNameAvailabilitySamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/accounts-check-name-availability.json - */ - /** - * Sample code: Check Name Availability. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void checkNameAvailability(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .locations() - .checkNameAvailabilityWithResponse( - "japanwest", - new CheckNameAvailabilityRequest().withName("contosotv").withType("videoAnalyzers"), - Context.NONE); - } -} -``` - -### OperationResults_Get - -```java -import com.azure.core.util.Context; - -/** Samples for OperationResults Get. */ -public final class OperationResultsGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-private-endpoint-connection-operation-result-by-id.json - */ - /** - * Sample code: Get status of private endpoint connection asynchronous operation. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getStatusOfPrivateEndpointConnectionAsynchronousOperation( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .operationResults() - .getWithResponse( - "contoso", - "contososports", - "6FBA62C4-99B5-4FF8-9826-FC4744A8864F", - "10000000-0000-0000-0000-000000000000", - Context.NONE); - } -} -``` - -### OperationStatuses_Get - -```java -import com.azure.core.util.Context; - -/** Samples for OperationStatuses Get. */ -public final class OperationStatusesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-private-endpoint-connection-operation-status-by-id-terminal-state.json - */ - /** - * Sample code: Get status of private endpoint asynchronous operation when it is completed. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getStatusOfPrivateEndpointAsynchronousOperationWhenItIsCompleted( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .operationStatuses() - .getWithResponse( - "contoso", - "contososports", - "D612C429-2526-49D5-961B-885AE11406FD", - "CDE44A33-DD32-4FFA-A1BC-601DC4D52B03", - Context.NONE); - } -} -``` - -### Operations_List - -```java -import com.azure.core.util.Context; - -/** Samples for Operations List. */ -public final class OperationsListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/operations-list-all.json - */ - /** - * Sample code: List Operations. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listOperations(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.operations().listWithResponse(Context.NONE); - } -} -``` - -### PipelineJobOperationStatuses_Get - -```java -import com.azure.core.util.Context; - -/** Samples for PipelineJobOperationStatuses Get. */ -public final class PipelineJobOperationStatusesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-job-operation-status-get.json - */ - /** - * Sample code: Get the pipeline job operation status. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getThePipelineJobOperationStatus( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .pipelineJobOperationStatuses() - .getWithResponse( - "testrg", "testaccount2", "pipelineJob1", "00000000-0000-0000-0000-000000000001", Context.NONE); - } -} -``` - -### PipelineJobs_Cancel - -```java -import com.azure.core.util.Context; - -/** Samples for PipelineJobs Cancel. */ -public final class PipelineJobsCancelSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-job-cancel.json - */ - /** - * Sample code: Cancels a pipeline job. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void cancelsAPipelineJob(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.pipelineJobs().cancel("testrg", "testaccount2", "pipelineJob1", Context.NONE); - } -} -``` - -### PipelineJobs_CreateOrUpdate - -```java -import com.azure.resourcemanager.videoanalyzer.models.ParameterDefinition; -import java.util.Arrays; - -/** Samples for PipelineJobs CreateOrUpdate. */ -public final class PipelineJobsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-job-create.json - */ - /** - * Sample code: Create or update a pipeline job. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void createOrUpdateAPipelineJob( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .pipelineJobs() - .define("pipelineJob1") - .withExistingVideoAnalyzer("testrg", "testaccount2") - .withTopologyName("pipelinetopology1") - .withDescription("Pipeline Job 1 Dsecription") - .withParameters( - Arrays - .asList( - new ParameterDefinition() - .withName("timesequences") - .withValue("[[\"2020-10-05T03:30:00Z\", \"2020-10-05T04:30:00Z\"]]"), - new ParameterDefinition().withName("videoSourceName").withValue("camera001"))) - .create(); - } -} -``` - -### PipelineJobs_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for PipelineJobs Delete. */ -public final class PipelineJobsDeleteSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-job-delete.json - */ - /** - * Sample code: Deletes a pipeline job. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deletesAPipelineJob(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.pipelineJobs().deleteWithResponse("testrg", "testaccount2", "pipelineJob1", Context.NONE); - } -} -``` - -### PipelineJobs_Get - -```java -import com.azure.core.util.Context; - -/** Samples for PipelineJobs Get. */ -public final class PipelineJobsGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-job-get-by-name.json - */ - /** - * Sample code: Get a pipeline job by name. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getAPipelineJobByName(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.pipelineJobs().getWithResponse("testrg", "testaccount2", "pipelineJob1", Context.NONE); - } -} -``` - -### PipelineJobs_List - -```java -import com.azure.core.util.Context; - -/** Samples for PipelineJobs List. */ -public final class PipelineJobsListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-job-list.json - */ - /** - * Sample code: List all pipeline jobs. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listAllPipelineJobs(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.pipelineJobs().list("testrg", "testaccount2", null, 2, Context.NONE); - } -} -``` - -### PipelineJobs_Update - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJob; - -/** Samples for PipelineJobs Update. */ -public final class PipelineJobsUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-job-patch.json - */ - /** - * Sample code: Updates a pipeline job. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void updatesAPipelineJob(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - PipelineJob resource = - manager.pipelineJobs().getWithResponse("testrg", "testaccount2", "pipelineJob1", Context.NONE).getValue(); - resource.update().withDescription("Pipeline Job 1 description").apply(); - } -} -``` - -### PipelineTopologies_CreateOrUpdate - -```java -import com.azure.resourcemanager.videoanalyzer.models.Kind; -import com.azure.resourcemanager.videoanalyzer.models.NodeInput; -import com.azure.resourcemanager.videoanalyzer.models.ParameterDeclaration; -import com.azure.resourcemanager.videoanalyzer.models.ParameterType; -import com.azure.resourcemanager.videoanalyzer.models.RtspSource; -import com.azure.resourcemanager.videoanalyzer.models.RtspTransport; -import com.azure.resourcemanager.videoanalyzer.models.Sku; -import com.azure.resourcemanager.videoanalyzer.models.SkuName; -import com.azure.resourcemanager.videoanalyzer.models.UnsecuredEndpoint; -import com.azure.resourcemanager.videoanalyzer.models.UsernamePasswordCredentials; -import com.azure.resourcemanager.videoanalyzer.models.VideoCreationProperties; -import com.azure.resourcemanager.videoanalyzer.models.VideoPublishingOptions; -import com.azure.resourcemanager.videoanalyzer.models.VideoSink; -import java.util.Arrays; - -/** Samples for PipelineTopologies CreateOrUpdate. */ -public final class PipelineTopologiesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-topology-create.json - */ - /** - * Sample code: Create or update a pipeline topology with an Rtsp source and video sink. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void createOrUpdateAPipelineTopologyWithAnRtspSourceAndVideoSink( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .pipelineTopologies() - .define("pipelineTopology1") - .withExistingVideoAnalyzer("testrg", "testaccount2") - .withKind(Kind.LIVE) - .withSku(new Sku().withName(SkuName.LIVE_S1)) - .withDescription("Pipeline Topology 1 Description") - .withParameters( - Arrays - .asList( - new ParameterDeclaration() - .withName("rtspUrlParameter") - .withType(ParameterType.STRING) - .withDescription("rtsp source url parameter") - .withDefaultProperty("rtsp://microsoft.com/video.mp4"), - new ParameterDeclaration() - .withName("rtspPasswordParameter") - .withType(ParameterType.SECRET_STRING) - .withDescription("rtsp source password parameter") - .withDefaultProperty("password"))) - .withSources( - Arrays - .asList( - new RtspSource() - .withName("rtspSource") - .withTransport(RtspTransport.HTTP) - .withEndpoint( - new UnsecuredEndpoint() - .withCredentials( - new UsernamePasswordCredentials() - .withUsername("username") - .withPassword("${rtspPasswordParameter}")) - .withUrl("${rtspUrlParameter}")))) - .withSinks( - Arrays - .asList( - new VideoSink() - .withName("videoSink") - .withInputs(Arrays.asList(new NodeInput().withNodeName("rtspSource"))) - .withVideoName("camera001") - .withVideoCreationProperties( - new VideoCreationProperties() - .withTitle("Parking Lot (Camera 1)") - .withDescription("Parking lot south entrance") - .withSegmentLength("PT30S")) - .withVideoPublishingOptions( - new VideoPublishingOptions() - .withDisableArchive("false") - .withDisableRtspPublishing("true")))) - .create(); - } -} -``` - -### PipelineTopologies_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for PipelineTopologies Delete. */ -public final class PipelineTopologiesDeleteSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-topology-delete.json - */ - /** - * Sample code: Delete a pipeline topology. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deleteAPipelineTopology(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.pipelineTopologies().deleteWithResponse("testrg", "testaccount2", "pipelineTopology1", Context.NONE); - } -} -``` - -### PipelineTopologies_Get - -```java -import com.azure.core.util.Context; - -/** Samples for PipelineTopologies Get. */ -public final class PipelineTopologiesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-topology-get-by-name.json - */ - /** - * Sample code: Get a pipeline topology by name. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getAPipelineTopologyByName( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.pipelineTopologies().getWithResponse("testrg", "testaccount2", "pipelineTopology1", Context.NONE); - } -} -``` - -### PipelineTopologies_List - -```java -import com.azure.core.util.Context; - -/** Samples for PipelineTopologies List. */ -public final class PipelineTopologiesListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-topology-list.json - */ - /** - * Sample code: List all pipeline topologies. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listAllPipelineTopologies(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.pipelineTopologies().list("testrg", "testaccount2", null, 2, Context.NONE); - } -} -``` - -### PipelineTopologies_Update - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.PipelineTopology; - -/** Samples for PipelineTopologies Update. */ -public final class PipelineTopologiesUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-topology-patch.json - */ - /** - * Sample code: Update pipeline topology. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void updatePipelineTopology(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - PipelineTopology resource = - manager - .pipelineTopologies() - .getWithResponse("testrg", "testaccount2", "pipelineTopology1", Context.NONE) - .getValue(); - resource.update().withDescription("Pipeline Topology 1 Description").apply(); - } -} -``` - -### PrivateEndpointConnections_CreateOrUpdate - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnection; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkServiceConnectionState; - -/** Samples for PrivateEndpointConnections CreateOrUpdate. */ -public final class PrivateEndpointConnectionsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-private-endpoint-connection-put.json - */ - /** - * Sample code: Update private endpoint connection. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void updatePrivateEndpointConnection( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - PrivateEndpointConnection resource = - manager - .privateEndpointConnections() - .getWithResponse("contoso", "contososports", "10000000-0000-0000-0000-000000000000", Context.NONE) - .getValue(); - resource - .update() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Test description.")) - .apply(); - } -} -``` - -### PrivateEndpointConnections_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections Delete. */ -public final class PrivateEndpointConnectionsDeleteSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-private-endpoint-connection-delete.json - */ - /** - * Sample code: Delete private endpoint connection. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deletePrivateEndpointConnection( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .privateEndpointConnections() - .deleteWithResponse("contoso", "contososports", "connectionName1", Context.NONE); - } -} -``` - -### PrivateEndpointConnections_Get - -```java -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections Get. */ -public final class PrivateEndpointConnectionsGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-private-endpoint-connection-get-by-name.json - */ - /** - * Sample code: Get private endpoint connection. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getPrivateEndpointConnection( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .privateEndpointConnections() - .getWithResponse("contoso", "contososports", "10000000-0000-0000-0000-000000000000", Context.NONE); - } -} -``` - -### PrivateEndpointConnections_List - -```java -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections List. */ -public final class PrivateEndpointConnectionsListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-private-endpoint-connection-list.json - */ - /** - * Sample code: Get all private endpoint connections. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getAllPrivateEndpointConnections( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.privateEndpointConnections().listWithResponse("contoso", "contososports", Context.NONE); - } -} -``` - -### PrivateLinkResources_Get - -```java -import com.azure.core.util.Context; - -/** Samples for PrivateLinkResources Get. */ -public final class PrivateLinkResourcesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-private-link-resources-get-by-name.json - */ - /** - * Sample code: Get details of a group ID. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getDetailsOfAGroupID(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.privateLinkResources().getWithResponse("contoso", "contososports", "integration", Context.NONE); - } -} -``` - -### PrivateLinkResources_List - -```java -import com.azure.core.util.Context; - -/** Samples for PrivateLinkResources List. */ -public final class PrivateLinkResourcesListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-private-link-resources-list.json - */ - /** - * Sample code: Get list of all group IDs. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getListOfAllGroupIDs(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.privateLinkResources().listWithResponse("contoso", "contososports", Context.NONE); - } -} -``` - -### VideoAnalyzerOperationResults_Get - -```java -import com.azure.core.util.Context; - -/** Samples for VideoAnalyzerOperationResults Get. */ -public final class VideoAnalyzerOperationResultsGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-operation-result-by-id.json - */ - /** - * Sample code: Get status of asynchronous operation. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getStatusOfAsynchronousOperation( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .videoAnalyzerOperationResults() - .getWithResponse("westus", "6FBA62C4-99B5-4FF8-9826-FC4744A8864F", Context.NONE); - } -} -``` - -### VideoAnalyzerOperationStatuses_Get - -```java -import com.azure.core.util.Context; - -/** Samples for VideoAnalyzerOperationStatuses Get. */ -public final class VideoAnalyzerOperationStatusesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-operation-status-by-id-non-terminal-state-failed.json - */ - /** - * Sample code: Get status of asynchronous operation when it is completed with error. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getStatusOfAsynchronousOperationWhenItIsCompletedWithError( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .videoAnalyzerOperationStatuses() - .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); - } - - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-operation-status-by-id-terminal-state.json - */ - /** - * Sample code: Get status of asynchronous operation when it is completed. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getStatusOfAsynchronousOperationWhenItIsCompleted( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .videoAnalyzerOperationStatuses() - .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); - } - - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-operation-status-by-id-non-terminal-state.json - */ - /** - * Sample code: Get status of asynchronous operation when it is ongoing. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getStatusOfAsynchronousOperationWhenItIsOngoing( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .videoAnalyzerOperationStatuses() - .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); - } -} -``` - -### VideoAnalyzers_CreateOrUpdate - -```java -import com.azure.resourcemanager.videoanalyzer.models.AccountEncryption; -import com.azure.resourcemanager.videoanalyzer.models.AccountEncryptionKeyType; -import com.azure.resourcemanager.videoanalyzer.models.IotHub; -import com.azure.resourcemanager.videoanalyzer.models.ResourceIdentity; -import com.azure.resourcemanager.videoanalyzer.models.StorageAccount; -import com.azure.resourcemanager.videoanalyzer.models.UserAssignedManagedIdentity; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for VideoAnalyzers CreateOrUpdate. */ -public final class VideoAnalyzersCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-accounts-create-or-update.json - */ - /** - * Sample code: Create a Video Analyzer account. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void createAVideoAnalyzerAccount( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .videoAnalyzers() - .define("contosotv") - .withRegion("South Central US") - .withExistingResourceGroup("contoso") - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withIdentity( - new VideoAnalyzerIdentity() - .withType("UserAssigned") - .withUserAssignedIdentities( - mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", - new UserAssignedManagedIdentity(), - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2", - new UserAssignedManagedIdentity(), - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id3", - new UserAssignedManagedIdentity()))) - .withStorageAccounts( - Arrays - .asList( - new StorageAccount() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/storage1") - .withIdentity( - new ResourceIdentity() - .withUserAssignedIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2")))) - .withEncryption(new AccountEncryption().withType(AccountEncryptionKeyType.SYSTEM_KEY)) - .withIotHubs( - Arrays - .asList( - new IotHub() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Devices/IotHubs/hub1") - .withIdentity( - new ResourceIdentity() - .withUserAssignedIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id3")), - new IotHub() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Devices/IotHubs/hub2") - .withIdentity( - new ResourceIdentity() - .withUserAssignedIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id3")))) - .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; - } -} -``` - -### VideoAnalyzers_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for VideoAnalyzers Delete. */ -public final class VideoAnalyzersDeleteSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-accounts-delete.json - */ - /** - * Sample code: Delete a Video Analyzer account. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deleteAVideoAnalyzerAccount( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.videoAnalyzers().deleteWithResponse("contoso", "contosotv", Context.NONE); - } -} -``` - -### VideoAnalyzers_GetByResourceGroup - -```java -import com.azure.core.util.Context; - -/** Samples for VideoAnalyzers GetByResourceGroup. */ -public final class VideoAnalyzersGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-accounts-get-by-name.json - */ - /** - * Sample code: Get a Video Analyzer account by name. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getAVideoAnalyzerAccountByName( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.videoAnalyzers().getByResourceGroupWithResponse("contoso", "contosotv", Context.NONE); - } -} -``` - -### VideoAnalyzers_List - -```java -import com.azure.core.util.Context; - -/** Samples for VideoAnalyzers List. */ -public final class VideoAnalyzersListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-accounts-list-all-accounts.json - */ - /** - * Sample code: List all Video Analyzer accounts. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listAllVideoAnalyzerAccounts( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.videoAnalyzers().listWithResponse("contoso", Context.NONE); - } -} -``` - -### VideoAnalyzers_ListBySubscription - -```java -import com.azure.core.util.Context; - -/** Samples for VideoAnalyzers ListBySubscription. */ -public final class VideoAnalyzersListBySubscriptionSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-accounts-subscription-list-all-accounts.json - */ - /** - * Sample code: List all Video Analyzer accounts in the specified subscription. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listAllVideoAnalyzerAccountsInTheSpecifiedSubscription( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.videoAnalyzers().listBySubscriptionWithResponse(Context.NONE); - } -} -``` - -### VideoAnalyzers_Update - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzer; -import java.util.HashMap; -import java.util.Map; - -/** Samples for VideoAnalyzers Update. */ -public final class VideoAnalyzersUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-accounts-update.json - */ - /** - * Sample code: Update a Video Analyzer accounts. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void updateAVideoAnalyzerAccounts( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - VideoAnalyzer resource = - manager.videoAnalyzers().getByResourceGroupWithResponse("contoso", "contosotv", Context.NONE).getValue(); - resource.update().withTags(mapOf("key1", "value3")).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; - } -} -``` - -### Videos_CreateOrUpdate - -```java -/** Samples for Videos CreateOrUpdate. */ -public final class VideosCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-create.json - */ - /** - * Sample code: Register video entity. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void registerVideoEntity(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .videos() - .define("video1") - .withExistingVideoAnalyzer("testrg", "testaccount2") - .withTitle("Sample Title 1") - .withDescription("Sample Description 1") - .create(); - } -} -``` - -### Videos_Delete - -```java -import com.azure.core.util.Context; - -/** Samples for Videos Delete. */ -public final class VideosDeleteSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-delete.json - */ - /** - * Sample code: Deletes a video entity. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deletesAVideoEntity(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.videos().deleteWithResponse("testrg", "testaccount2", "video1", Context.NONE); - } -} -``` - -### Videos_Get - -```java -import com.azure.core.util.Context; - -/** Samples for Videos Get. */ -public final class VideosGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-get.json - */ - /** - * Sample code: Gets a video entity. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getsAVideoEntity(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.videos().getWithResponse("testrg", "testaccount2", "video1", Context.NONE); - } -} -``` - -### Videos_List - -```java -import com.azure.core.util.Context; - -/** Samples for Videos List. */ -public final class VideosListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-list.json - */ - /** - * Sample code: Lists video entities. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listsVideoEntities(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.videos().list("testrg", "testaccount2", 2, Context.NONE); - } -} -``` - -### Videos_ListContentToken - -```java -import com.azure.core.util.Context; - -/** Samples for Videos ListContentToken. */ -public final class VideosListContentTokenSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-listContentToken.json - */ - /** - * Sample code: Generate a content token for media endpoint authorization. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void generateAContentTokenForMediaEndpointAuthorization( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.videos().listContentTokenWithResponse("testrg", "testaccount2", "video3", Context.NONE); - } -} -``` - -### Videos_Update - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.VideoEntity; - -/** Samples for Videos Update. */ -public final class VideosUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-patch.json - */ - /** - * Sample code: Update video entity. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void updateVideoEntity(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - VideoEntity resource = - manager.videos().getWithResponse("testrg", "testaccount2", "video1", Context.NONE).getValue(); - resource.update().withDescription("Parking Lot East Entrance").apply(); - } -} -``` - diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/pom.xml b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/pom.xml deleted file mode 100644 index a6a3a863983f..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - - - com.azure.resourcemanager - azure-resourcemanager-videoanalyzer - 1.0.0-beta.6 - jar - - Microsoft Azure SDK for Video Analyzer Management - We’re retiring the Azure Video Analyzer preview service; you're advised to transition your applications off of Video Analyzer by 01 December 2022. This SDK is no longer maintained and won’t work after the service is retired. To learn how to transition off, please refer to: https://aka.ms/azsdk/videoanalyzer/transitionoffguidance This package contains Microsoft Azure SDK for Video Analyzer Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Video Analyzer provides a platform for you to build intelligent video applications that span the edge and the cloud. Package tag package-preview-2021-11. - 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 - - - - - - com.azure - azure-core - 1.54.1 - - - com.azure - azure-core-management - 1.15.6 - - - diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/VideoAnalyzerManager.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/VideoAnalyzerManager.java deleted file mode 100644 index 625795f27eed..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/VideoAnalyzerManager.java +++ /dev/null @@ -1,532 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.HttpPipelinePosition; -import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.core.http.policy.RetryOptions; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzerManagementClient; -import com.azure.resourcemanager.videoanalyzer.implementation.AccessPoliciesImpl; -import com.azure.resourcemanager.videoanalyzer.implementation.EdgeModulesImpl; -import com.azure.resourcemanager.videoanalyzer.implementation.LivePipelineOperationStatusesImpl; -import com.azure.resourcemanager.videoanalyzer.implementation.LivePipelinesImpl; -import com.azure.resourcemanager.videoanalyzer.implementation.LocationsImpl; -import com.azure.resourcemanager.videoanalyzer.implementation.OperationResultsImpl; -import com.azure.resourcemanager.videoanalyzer.implementation.OperationStatusesImpl; -import com.azure.resourcemanager.videoanalyzer.implementation.OperationsImpl; -import com.azure.resourcemanager.videoanalyzer.implementation.PipelineJobOperationStatusesImpl; -import com.azure.resourcemanager.videoanalyzer.implementation.PipelineJobsImpl; -import com.azure.resourcemanager.videoanalyzer.implementation.PipelineTopologiesImpl; -import com.azure.resourcemanager.videoanalyzer.implementation.PrivateEndpointConnectionsImpl; -import com.azure.resourcemanager.videoanalyzer.implementation.PrivateLinkResourcesImpl; -import com.azure.resourcemanager.videoanalyzer.implementation.VideoAnalyzerManagementClientBuilder; -import com.azure.resourcemanager.videoanalyzer.implementation.VideoAnalyzerOperationResultsImpl; -import com.azure.resourcemanager.videoanalyzer.implementation.VideoAnalyzerOperationStatusesImpl; -import com.azure.resourcemanager.videoanalyzer.implementation.VideoAnalyzersImpl; -import com.azure.resourcemanager.videoanalyzer.implementation.VideosImpl; -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicies; -import com.azure.resourcemanager.videoanalyzer.models.EdgeModules; -import com.azure.resourcemanager.videoanalyzer.models.LivePipelineOperationStatuses; -import com.azure.resourcemanager.videoanalyzer.models.LivePipelines; -import com.azure.resourcemanager.videoanalyzer.models.Locations; -import com.azure.resourcemanager.videoanalyzer.models.OperationResults; -import com.azure.resourcemanager.videoanalyzer.models.OperationStatuses; -import com.azure.resourcemanager.videoanalyzer.models.Operations; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobOperationStatuses; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobs; -import com.azure.resourcemanager.videoanalyzer.models.PipelineTopologies; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnections; -import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkResources; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerOperationResults; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerOperationStatuses; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzers; -import com.azure.resourcemanager.videoanalyzer.models.Videos; -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 VideoAnalyzerManager. Azure Video Analyzer provides a platform for you to build intelligent video - * applications that span the edge and the cloud. - */ -public final class VideoAnalyzerManager { - private EdgeModules edgeModules; - - private PipelineTopologies pipelineTopologies; - - private LivePipelines livePipelines; - - private PipelineJobs pipelineJobs; - - private LivePipelineOperationStatuses livePipelineOperationStatuses; - - private PipelineJobOperationStatuses pipelineJobOperationStatuses; - - private Operations operations; - - private VideoAnalyzers videoAnalyzers; - - private PrivateLinkResources privateLinkResources; - - private PrivateEndpointConnections privateEndpointConnections; - - private OperationStatuses operationStatuses; - - private OperationResults operationResults; - - private VideoAnalyzerOperationStatuses videoAnalyzerOperationStatuses; - - private VideoAnalyzerOperationResults videoAnalyzerOperationResults; - - private Locations locations; - - private Videos videos; - - private AccessPolicies accessPolicies; - - private final VideoAnalyzerManagementClient clientObject; - - private VideoAnalyzerManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new VideoAnalyzerManagementClientBuilder().pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of Video Analyzer service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the Video Analyzer service API instance. - */ - public static VideoAnalyzerManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Creates an instance of Video Analyzer service API entry point. - * - * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. - * @param profile the Azure profile for client. - * @return the Video Analyzer service API instance. - */ - public static VideoAnalyzerManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return new VideoAnalyzerManager(httpPipeline, profile, null); - } - - /** - * Gets a Configurable instance that can be used to create VideoAnalyzerManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new VideoAnalyzerManager.Configurable(); - } - - /** The Configurable allowing configurations to be set. */ - public static final class Configurable { - private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private final List scopes = new ArrayList<>(); - private RetryPolicy retryPolicy; - private RetryOptions retryOptions; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Adds the scope to permission sets. - * - * @param scope the scope. - * @return the configurable object itself. - */ - public Configurable withScope(String scope) { - this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. - * - * @param retryOptions the retry options for the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryOptions(RetryOptions retryOptions) { - this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval - = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of Video Analyzer service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the Video Analyzer service API instance. - */ - public VideoAnalyzerManager 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.videoanalyzer") - .append("/") - .append("1.0.0-beta.5"); - if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder.append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - if (retryOptions != null) { - retryPolicy = new RetryPolicy(retryOptions); - } else { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new AddHeadersFromContextPolicy()); - policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new VideoAnalyzerManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of EdgeModules. It manages EdgeModuleEntity. - * - * @return Resource collection API of EdgeModules. - */ - public EdgeModules edgeModules() { - if (this.edgeModules == null) { - this.edgeModules = new EdgeModulesImpl(clientObject.getEdgeModules(), this); - } - return edgeModules; - } - - /** - * Gets the resource collection API of PipelineTopologies. It manages PipelineTopology. - * - * @return Resource collection API of PipelineTopologies. - */ - public PipelineTopologies pipelineTopologies() { - if (this.pipelineTopologies == null) { - this.pipelineTopologies = new PipelineTopologiesImpl(clientObject.getPipelineTopologies(), this); - } - return pipelineTopologies; - } - - /** - * Gets the resource collection API of LivePipelines. It manages LivePipeline. - * - * @return Resource collection API of LivePipelines. - */ - public LivePipelines livePipelines() { - if (this.livePipelines == null) { - this.livePipelines = new LivePipelinesImpl(clientObject.getLivePipelines(), this); - } - return livePipelines; - } - - /** - * Gets the resource collection API of PipelineJobs. It manages PipelineJob. - * - * @return Resource collection API of PipelineJobs. - */ - public PipelineJobs pipelineJobs() { - if (this.pipelineJobs == null) { - this.pipelineJobs = new PipelineJobsImpl(clientObject.getPipelineJobs(), this); - } - return pipelineJobs; - } - - /** - * Gets the resource collection API of LivePipelineOperationStatuses. - * - * @return Resource collection API of LivePipelineOperationStatuses. - */ - public LivePipelineOperationStatuses livePipelineOperationStatuses() { - if (this.livePipelineOperationStatuses == null) { - this.livePipelineOperationStatuses - = new LivePipelineOperationStatusesImpl(clientObject.getLivePipelineOperationStatuses(), this); - } - return livePipelineOperationStatuses; - } - - /** - * Gets the resource collection API of PipelineJobOperationStatuses. - * - * @return Resource collection API of PipelineJobOperationStatuses. - */ - public PipelineJobOperationStatuses pipelineJobOperationStatuses() { - if (this.pipelineJobOperationStatuses == null) { - this.pipelineJobOperationStatuses - = new PipelineJobOperationStatusesImpl(clientObject.getPipelineJobOperationStatuses(), this); - } - return pipelineJobOperationStatuses; - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of VideoAnalyzers. It manages VideoAnalyzer. - * - * @return Resource collection API of VideoAnalyzers. - */ - public VideoAnalyzers videoAnalyzers() { - if (this.videoAnalyzers == null) { - this.videoAnalyzers = new VideoAnalyzersImpl(clientObject.getVideoAnalyzers(), this); - } - return videoAnalyzers; - } - - /** - * Gets the resource collection API of PrivateLinkResources. - * - * @return Resource collection API of PrivateLinkResources. - */ - public PrivateLinkResources privateLinkResources() { - if (this.privateLinkResources == null) { - this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); - } - return privateLinkResources; - } - - /** - * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. - * - * @return Resource collection API of PrivateEndpointConnections. - */ - public PrivateEndpointConnections privateEndpointConnections() { - if (this.privateEndpointConnections == null) { - this.privateEndpointConnections - = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); - } - return privateEndpointConnections; - } - - /** - * Gets the resource collection API of OperationStatuses. - * - * @return Resource collection API of OperationStatuses. - */ - public OperationStatuses operationStatuses() { - if (this.operationStatuses == null) { - this.operationStatuses = new OperationStatusesImpl(clientObject.getOperationStatuses(), this); - } - return operationStatuses; - } - - /** - * Gets the resource collection API of OperationResults. - * - * @return Resource collection API of OperationResults. - */ - public OperationResults operationResults() { - if (this.operationResults == null) { - this.operationResults = new OperationResultsImpl(clientObject.getOperationResults(), this); - } - return operationResults; - } - - /** - * Gets the resource collection API of VideoAnalyzerOperationStatuses. - * - * @return Resource collection API of VideoAnalyzerOperationStatuses. - */ - public VideoAnalyzerOperationStatuses videoAnalyzerOperationStatuses() { - if (this.videoAnalyzerOperationStatuses == null) { - this.videoAnalyzerOperationStatuses - = new VideoAnalyzerOperationStatusesImpl(clientObject.getVideoAnalyzerOperationStatuses(), this); - } - return videoAnalyzerOperationStatuses; - } - - /** - * Gets the resource collection API of VideoAnalyzerOperationResults. - * - * @return Resource collection API of VideoAnalyzerOperationResults. - */ - public VideoAnalyzerOperationResults videoAnalyzerOperationResults() { - if (this.videoAnalyzerOperationResults == null) { - this.videoAnalyzerOperationResults - = new VideoAnalyzerOperationResultsImpl(clientObject.getVideoAnalyzerOperationResults(), this); - } - return videoAnalyzerOperationResults; - } - - /** - * Gets the resource collection API of Locations. - * - * @return Resource collection API of Locations. - */ - public Locations locations() { - if (this.locations == null) { - this.locations = new LocationsImpl(clientObject.getLocations(), this); - } - return locations; - } - - /** - * Gets the resource collection API of Videos. It manages VideoEntity. - * - * @return Resource collection API of Videos. - */ - public Videos videos() { - if (this.videos == null) { - this.videos = new VideosImpl(clientObject.getVideos(), this); - } - return videos; - } - - /** - * Gets the resource collection API of AccessPolicies. It manages AccessPolicyEntity. - * - * @return Resource collection API of AccessPolicies. - */ - public AccessPolicies accessPolicies() { - if (this.accessPolicies == null) { - this.accessPolicies = new AccessPoliciesImpl(clientObject.getAccessPolicies(), this); - } - return accessPolicies; - } - - /** - * @return Wrapped service client VideoAnalyzerManagementClient providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. - */ - public VideoAnalyzerManagementClient serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/AccessPoliciesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/AccessPoliciesClient.java deleted file mode 100644 index 0726701aed1c..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/AccessPoliciesClient.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.AccessPolicyEntityInner; - -/** An instance of this class provides access to all the operations defined in AccessPoliciesClient. */ -public interface AccessPoliciesClient { - /** - * Retrieves all existing access policy resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccessPolicyEntity items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Retrieves all existing access policy resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccessPolicyEntity items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, Integer top, - Context context); - - /** - * Retrieves an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AccessPolicyEntityInner get(String resourceGroupName, String accountName, String accessPolicyName); - - /** - * Retrieves an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources - * along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, - String accessPolicyName, Context context); - - /** - * Creates a new access policy resource or updates an existing one with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AccessPolicyEntityInner createOrUpdate(String resourceGroupName, String accountName, String accessPolicyName, - AccessPolicyEntityInner parameters); - - /** - * Creates a new access policy resource or updates an existing one with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources - * along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String accountName, - String accessPolicyName, AccessPolicyEntityInner parameters, Context context); - - /** - * Deletes an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String accessPolicyName); - - /** - * Deletes an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String accountName, String accessPolicyName, - Context context); - - /** - * Updates individual properties of an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AccessPolicyEntityInner update(String resourceGroupName, String accountName, String accessPolicyName, - AccessPolicyEntityInner parameters); - - /** - * Updates individual properties of an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources - * along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String accountName, - String accessPolicyName, AccessPolicyEntityInner parameters, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/EdgeModulesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/EdgeModulesClient.java deleted file mode 100644 index 17283da0f9f8..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/EdgeModulesClient.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.EdgeModuleEntityInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.EdgeModuleProvisioningTokenInner; -import com.azure.resourcemanager.videoanalyzer.models.ListProvisioningTokenInput; - -/** An instance of this class provides access to all the operations defined in EdgeModulesClient. */ -public interface EdgeModulesClient { - /** - * List all existing edge module resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of EdgeModuleEntity items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName); - - /** - * List all existing edge module resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of EdgeModuleEntity items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, Integer top, - Context context); - - /** - * Retrieves an existing edge module resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeModuleEntityInner get(String resourceGroupName, String accountName, String edgeModuleName); - - /** - * Retrieves an existing edge module resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, String edgeModuleName, - Context context); - - /** - * Creates a new edge module or updates an existing one. An edge module resource enables a single instance of an - * Azure Video Analyzer IoT edge module to interact with the Video Analyzer Account. This is used for authorization - * and also to make sure that the particular edge module instance only has access to the data it requires from the - * Azure Video Analyzer service. A new edge module resource should be created for every new instance of an Azure - * Video Analyzer edge module deployed to you Azure IoT edge environment. Edge module resources can be deleted if - * the specific module is not in use anymore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeModuleEntityInner createOrUpdate(String resourceGroupName, String accountName, String edgeModuleName, - EdgeModuleEntityInner parameters); - - /** - * Creates a new edge module or updates an existing one. An edge module resource enables a single instance of an - * Azure Video Analyzer IoT edge module to interact with the Video Analyzer Account. This is used for authorization - * and also to make sure that the particular edge module instance only has access to the data it requires from the - * Azure Video Analyzer service. A new edge module resource should be created for every new instance of an Azure - * Video Analyzer edge module deployed to you Azure IoT edge environment. Edge module resources can be deleted if - * the specific module is not in use anymore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String accountName, - String edgeModuleName, EdgeModuleEntityInner parameters, Context context); - - /** - * Deletes an existing edge module resource. Deleting the edge module resource will prevent an Azure Video Analyzer - * IoT edge module which was previously initiated with the module provisioning token from communicating with the - * cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String edgeModuleName); - - /** - * Deletes an existing edge module resource. Deleting the edge module resource will prevent an Azure Video Analyzer - * IoT edge module which was previously initiated with the module provisioning token from communicating with the - * cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String accountName, String edgeModuleName, - Context context); - - /** - * Creates a new provisioning token. A provisioning token allows for a single instance of Azure Video analyzer IoT - * edge module to be initialized and authorized to the cloud account. The provisioning token itself is short lived - * and it is only used for the initial handshake between IoT edge module and the cloud. After the initial handshake, - * the IoT edge module will agree on a set of authentication keys which will be auto-rotated as long as the module - * is able to periodically connect to the cloud. A new provisioning token can be generated for the same IoT edge - * module in case the module state lost or reset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provisioning token properties. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EdgeModuleProvisioningTokenInner listProvisioningToken(String resourceGroupName, String accountName, - String edgeModuleName, ListProvisioningTokenInput parameters); - - /** - * Creates a new provisioning token. A provisioning token allows for a single instance of Azure Video analyzer IoT - * edge module to be initialized and authorized to the cloud account. The provisioning token itself is short lived - * and it is only used for the initial handshake between IoT edge module and the cloud. After the initial handshake, - * the IoT edge module will agree on a set of authentication keys which will be auto-rotated as long as the module - * is able to periodically connect to the cloud. A new provisioning token can be generated for the same IoT edge - * module in case the module state lost or reset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provisioning token properties along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listProvisioningTokenWithResponse(String resourceGroupName, - String accountName, String edgeModuleName, ListProvisioningTokenInput parameters, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LivePipelineOperationStatusesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LivePipelineOperationStatusesClient.java deleted file mode 100644 index 54c065653f37..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LivePipelineOperationStatusesClient.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.models.LivePipelineOperationStatusInner; - -/** An instance of this class provides access to all the operations defined in LivePipelineOperationStatusesClient. */ -public interface LivePipelineOperationStatusesClient { - /** - * Get the operation status of a live pipeline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param operationId The operation 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 operation status of a live pipeline. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LivePipelineOperationStatusInner get(String resourceGroupName, String accountName, String livePipelineName, - String operationId); - - /** - * Get the operation status of a live pipeline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param operationId The operation 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 operation status of a live pipeline along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, - String livePipelineName, String operationId, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LivePipelinesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LivePipelinesClient.java deleted file mode 100644 index 7fa4d7839a9f..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LivePipelinesClient.java +++ /dev/null @@ -1,300 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.models.LivePipelineInner; -import com.azure.resourcemanager.videoanalyzer.models.LivePipelineUpdate; - -/** An instance of this class provides access to all the operations defined in LivePipelinesClient. */ -public interface LivePipelinesClient { - /** - * Retrieves a list of live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of LivePipeline items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Retrieves a list of live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of LivePipeline items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, String filter, Integer top, - Context context); - - /** - * Retrieves a specific live pipeline by name. If a live pipeline with that name has been previously created, the - * call will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LivePipelineInner get(String resourceGroupName, String accountName, String livePipelineName); - - /** - * Retrieves a specific live pipeline by name. If a live pipeline with that name has been previously created, the - * call will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, String livePipelineName, - Context context); - - /** - * Creates a new live pipeline or updates an existing one, with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LivePipelineInner createOrUpdate(String resourceGroupName, String accountName, String livePipelineName, - LivePipelineInner parameters); - - /** - * Creates a new live pipeline or updates an existing one, with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String accountName, - String livePipelineName, LivePipelineInner parameters, Context context); - - /** - * Deletes a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String livePipelineName); - - /** - * Deletes a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String accountName, String livePipelineName, - Context context); - - /** - * Updates an existing live pipeline with the given name. Properties that can be updated include: description, - * bitrateKbps, and parameter definitions. Only the description can be updated while the live pipeline is active. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LivePipelineInner update(String resourceGroupName, String accountName, String livePipelineName, - LivePipelineUpdate parameters); - - /** - * Updates an existing live pipeline with the given name. Properties that can be updated include: description, - * bitrateKbps, and parameter definitions. Only the description can be updated while the live pipeline is active. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String accountName, - String livePipelineName, LivePipelineUpdate parameters, Context context); - - /** - * Activates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginActivate(String resourceGroupName, String accountName, - String livePipelineName); - - /** - * Activates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginActivate(String resourceGroupName, String accountName, - String livePipelineName, Context context); - - /** - * Activates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void activate(String resourceGroupName, String accountName, String livePipelineName); - - /** - * Activates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void activate(String resourceGroupName, String accountName, String livePipelineName, Context context); - - /** - * Deactivates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeactivate(String resourceGroupName, String accountName, - String livePipelineName); - - /** - * Deactivates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeactivate(String resourceGroupName, String accountName, - String livePipelineName, Context context); - - /** - * Deactivates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deactivate(String resourceGroupName, String accountName, String livePipelineName); - - /** - * Deactivates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deactivate(String resourceGroupName, String accountName, String livePipelineName, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LocationsClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LocationsClient.java deleted file mode 100644 index 97364beea775..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LocationsClient.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.videoanalyzer.models.CheckNameAvailabilityRequest; - -/** An instance of this class provides access to all the operations defined in LocationsClient. */ -public interface LocationsClient { - /** - * Checks whether the Video Analyzer resource name is available. - * - * @param locationName Location Name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CheckNameAvailabilityResponseInner checkNameAvailability(String locationName, - CheckNameAvailabilityRequest parameters); - - /** - * Checks whether the Video Analyzer resource name is available. - * - * @param locationName Location Name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse(String locationName, - CheckNameAvailabilityRequest parameters, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/OperationResultsClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/OperationResultsClient.java deleted file mode 100644 index e7c464f7b276..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/OperationResultsClient.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; - -/** An instance of this class provides access to all the operations defined in OperationResultsClient. */ -public interface OperationResultsClient { - /** - * Get private endpoint connection operation result. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation 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 private endpoint connection operation result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get(String resourceGroupName, String accountName, String name, String operationId); - - /** - * Get private endpoint connection operation result. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation 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 private endpoint connection operation result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, String name, - String operationId, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/OperationStatusesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/OperationStatusesClient.java deleted file mode 100644 index c18155d6bad3..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/OperationStatusesClient.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.models.VideoAnalyzerPrivateEndpointConnectionOperationStatusInner; - -/** An instance of this class provides access to all the operations defined in OperationStatusesClient. */ -public interface OperationStatusesClient { - /** - * Get private endpoint connection operation status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation 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 private endpoint connection operation status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VideoAnalyzerPrivateEndpointConnectionOperationStatusInner get(String resourceGroupName, String accountName, - String name, String operationId); - - /** - * Get private endpoint connection operation status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation 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 private endpoint connection operation status along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, - String accountName, String name, String operationId, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/OperationsClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/OperationsClient.java deleted file mode 100644 index 7c545574de1b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/OperationsClient.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.models.OperationCollectionInner; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public interface OperationsClient { - /** - * Lists all the Media 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 a collection of Operation items. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OperationCollectionInner list(); - - /** - * Lists all the Media 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 a collection of Operation items along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineJobOperationStatusesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineJobOperationStatusesClient.java deleted file mode 100644 index d08b61e46ecc..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineJobOperationStatusesClient.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.models.PipelineJobOperationStatusInner; - -/** An instance of this class provides access to all the operations defined in PipelineJobOperationStatusesClient. */ -public interface PipelineJobOperationStatusesClient { - /** - * Get the operation status of a pipeline job with the given operationId. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param operationId The operation 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 operation status of a pipeline job with the given operationId. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PipelineJobOperationStatusInner get(String resourceGroupName, String accountName, String pipelineJobName, - String operationId); - - /** - * Get the operation status of a pipeline job with the given operationId. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param operationId The operation 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 operation status of a pipeline job with the given operationId along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, - String pipelineJobName, String operationId, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineJobsClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineJobsClient.java deleted file mode 100644 index 37e3bfa915d4..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineJobsClient.java +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.models.PipelineJobInner; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobUpdate; - -/** An instance of this class provides access to all the operations defined in PipelineJobsClient. */ -public interface PipelineJobsClient { - /** - * Retrieves a list of all live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineJob items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Retrieves a list of all live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineJob items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, String filter, Integer top, - Context context); - - /** - * Retrieves a specific pipeline job by name. If a pipeline job with that name has been previously created, the call - * will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PipelineJobInner get(String resourceGroupName, String accountName, String pipelineJobName); - - /** - * Retrieves a specific pipeline job by name. If a pipeline job with that name has been previously created, the call - * will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, String pipelineJobName, - Context context); - - /** - * Creates a new pipeline job or updates an existing one, with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PipelineJobInner createOrUpdate(String resourceGroupName, String accountName, String pipelineJobName, - PipelineJobInner parameters); - - /** - * Creates a new pipeline job or updates an existing one, with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String accountName, - String pipelineJobName, PipelineJobInner parameters, Context context); - - /** - * Deletes a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String pipelineJobName); - - /** - * Deletes a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String accountName, String pipelineJobName, - Context context); - - /** - * Updates an existing pipeline job with the given name. Properties that can be updated include: description. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PipelineJobInner update(String resourceGroupName, String accountName, String pipelineJobName, - PipelineJobUpdate parameters); - - /** - * Updates an existing pipeline job with the given name. Properties that can be updated include: description. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String accountName, String pipelineJobName, - PipelineJobUpdate parameters, Context context); - - /** - * Cancels a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCancel(String resourceGroupName, String accountName, - String pipelineJobName); - - /** - * Cancels a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCancel(String resourceGroupName, String accountName, String pipelineJobName, - Context context); - - /** - * Cancels a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void cancel(String resourceGroupName, String accountName, String pipelineJobName); - - /** - * Cancels a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void cancel(String resourceGroupName, String accountName, String pipelineJobName, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineTopologiesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineTopologiesClient.java deleted file mode 100644 index 553f59198b37..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineTopologiesClient.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineTopologyInner; -import com.azure.resourcemanager.videoanalyzer.models.PipelineTopologyUpdate; - -/** An instance of this class provides access to all the operations defined in PipelineTopologiesClient. */ -public interface PipelineTopologiesClient { - /** - * Retrieves a list of pipeline topologies that have been added to the account, if any, along with their JSON - * representation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineTopology items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Retrieves a list of pipeline topologies that have been added to the account, if any, along with their JSON - * representation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineTopology items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, String filter, Integer top, - Context context); - - /** - * Retrieves a specific pipeline topology by name. If a topology with that name has been previously created, the - * call will return the JSON representation of that topology. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PipelineTopologyInner get(String resourceGroupName, String accountName, String pipelineTopologyName); - - /** - * Retrieves a specific pipeline topology by name. If a topology with that name has been previously created, the - * call will return the JSON representation of that topology. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, - String pipelineTopologyName, Context context); - - /** - * Creates a new pipeline topology or updates an existing one, with the given name. A pipeline topology describes - * the processing steps to be applied when processing content for a particular outcome. The topology should be - * defined according to the scenario to be achieved and can be reused across many pipeline instances which share the - * same processing characteristics. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PipelineTopologyInner createOrUpdate(String resourceGroupName, String accountName, String pipelineTopologyName, - PipelineTopologyInner parameters); - - /** - * Creates a new pipeline topology or updates an existing one, with the given name. A pipeline topology describes - * the processing steps to be applied when processing content for a particular outcome. The topology should be - * defined according to the scenario to be achieved and can be reused across many pipeline instances which share the - * same processing characteristics. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String accountName, - String pipelineTopologyName, PipelineTopologyInner parameters, Context context); - - /** - * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology - * have been stopped and deleted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String pipelineTopologyName); - - /** - * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology - * have been stopped and deleted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String accountName, String pipelineTopologyName, - Context context); - - /** - * Updates an existing pipeline topology with the given name. If the associated live pipelines or pipeline jobs are - * in active or processing state, respectively, then only the description can be updated. Else, the properties that - * can be updated include: description, parameter declarations, sources, processors, and sinks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PipelineTopologyInner update(String resourceGroupName, String accountName, String pipelineTopologyName, - PipelineTopologyUpdate parameters); - - /** - * Updates an existing pipeline topology with the given name. If the associated live pipelines or pipeline jobs are - * in active or processing state, respectively, then only the description can be updated. Else, the properties that - * can be updated include: description, parameter declarations, sources, processors, and sinks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String accountName, - String pipelineTopologyName, PipelineTopologyUpdate parameters, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PrivateEndpointConnectionsClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PrivateEndpointConnectionsClient.java deleted file mode 100644 index 0faafc2082f7..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PrivateEndpointConnectionsClient.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionListResultInner; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnectionsCreateOrUpdateResponse; - -/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ -public interface PrivateEndpointConnectionsClient { - /** - * Get all private endpoint connections under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under video analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionListResultInner list(String resourceGroupName, String accountName); - - /** - * Get all private endpoint connections under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under video analyzer account along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, String accountName, - Context context); - - /** - * Get private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection under video analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get(String resourceGroupName, String accountName, String name); - - /** - * Get private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection under video analyzer account along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, String name, - Context context); - - /** - * Update private endpoint connection state under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String accountName, String name, - PrivateEndpointConnectionInner parameters); - - /** - * Update private endpoint connection state under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionsCreateOrUpdateResponse createOrUpdateWithResponse(String resourceGroupName, - String accountName, String name, PrivateEndpointConnectionInner parameters, Context context); - - /** - * Delete private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String name); - - /** - * Delete private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String accountName, String name, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PrivateLinkResourcesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PrivateLinkResourcesClient.java deleted file mode 100644 index 65c505707629..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PrivateLinkResourcesClient.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceListResultInner; - -/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ -public interface PrivateLinkResourcesClient { - /** - * Get list of group IDs for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs for video analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceListResultInner list(String resourceGroupName, String accountName); - - /** - * Get list of group IDs for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs for video analyzer account along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, String accountName, - Context context); - - /** - * Get group ID for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Name of the private link resource (Group 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 group ID for video analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceInner get(String resourceGroupName, String accountName, String name); - - /** - * Get group ID for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Name of the private link resource (Group 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 group ID for video analyzer account along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, String name, - Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerManagementClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerManagementClient.java deleted file mode 100644 index a44ec2e4a0a9..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerManagementClient.java +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** The interface for VideoAnalyzerManagementClient class. */ -public interface VideoAnalyzerManagementClient { - /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the EdgeModulesClient object to access its operations. - * - * @return the EdgeModulesClient object. - */ - EdgeModulesClient getEdgeModules(); - - /** - * Gets the PipelineTopologiesClient object to access its operations. - * - * @return the PipelineTopologiesClient object. - */ - PipelineTopologiesClient getPipelineTopologies(); - - /** - * Gets the LivePipelinesClient object to access its operations. - * - * @return the LivePipelinesClient object. - */ - LivePipelinesClient getLivePipelines(); - - /** - * Gets the PipelineJobsClient object to access its operations. - * - * @return the PipelineJobsClient object. - */ - PipelineJobsClient getPipelineJobs(); - - /** - * Gets the LivePipelineOperationStatusesClient object to access its operations. - * - * @return the LivePipelineOperationStatusesClient object. - */ - LivePipelineOperationStatusesClient getLivePipelineOperationStatuses(); - - /** - * Gets the PipelineJobOperationStatusesClient object to access its operations. - * - * @return the PipelineJobOperationStatusesClient object. - */ - PipelineJobOperationStatusesClient getPipelineJobOperationStatuses(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the VideoAnalyzersClient object to access its operations. - * - * @return the VideoAnalyzersClient object. - */ - VideoAnalyzersClient getVideoAnalyzers(); - - /** - * Gets the PrivateLinkResourcesClient object to access its operations. - * - * @return the PrivateLinkResourcesClient object. - */ - PrivateLinkResourcesClient getPrivateLinkResources(); - - /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. - * - * @return the PrivateEndpointConnectionsClient object. - */ - PrivateEndpointConnectionsClient getPrivateEndpointConnections(); - - /** - * Gets the OperationStatusesClient object to access its operations. - * - * @return the OperationStatusesClient object. - */ - OperationStatusesClient getOperationStatuses(); - - /** - * Gets the OperationResultsClient object to access its operations. - * - * @return the OperationResultsClient object. - */ - OperationResultsClient getOperationResults(); - - /** - * Gets the VideoAnalyzerOperationStatusesClient object to access its operations. - * - * @return the VideoAnalyzerOperationStatusesClient object. - */ - VideoAnalyzerOperationStatusesClient getVideoAnalyzerOperationStatuses(); - - /** - * Gets the VideoAnalyzerOperationResultsClient object to access its operations. - * - * @return the VideoAnalyzerOperationResultsClient object. - */ - VideoAnalyzerOperationResultsClient getVideoAnalyzerOperationResults(); - - /** - * Gets the LocationsClient object to access its operations. - * - * @return the LocationsClient object. - */ - LocationsClient getLocations(); - - /** - * Gets the VideosClient object to access its operations. - * - * @return the VideosClient object. - */ - VideosClient getVideos(); - - /** - * Gets the AccessPoliciesClient object to access its operations. - * - * @return the AccessPoliciesClient object. - */ - AccessPoliciesClient getAccessPolicies(); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerOperationResultsClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerOperationResultsClient.java deleted file mode 100644 index 7039f2b3e23e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerOperationResultsClient.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.models.VideoAnalyzerInner; - -/** An instance of this class provides access to all the operations defined in VideoAnalyzerOperationResultsClient. */ -public interface VideoAnalyzerOperationResultsClient { - /** - * Get video analyzer operation result. - * - * @param locationName Location name. - * @param operationId Operation 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 video analyzer operation result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VideoAnalyzerInner get(String locationName, String operationId); - - /** - * Get video analyzer operation result. - * - * @param locationName Location name. - * @param operationId Operation 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 video analyzer operation result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String locationName, String operationId, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerOperationStatusesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerOperationStatusesClient.java deleted file mode 100644 index ecdb83311ad6..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerOperationStatusesClient.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.models.VideoAnalyzerOperationStatusInner; - -/** An instance of this class provides access to all the operations defined in VideoAnalyzerOperationStatusesClient. */ -public interface VideoAnalyzerOperationStatusesClient { - /** - * Get video analyzer operation status. - * - * @param locationName Location name. - * @param operationId Operation 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 video analyzer operation status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VideoAnalyzerOperationStatusInner get(String locationName, String operationId); - - /** - * Get video analyzer operation status. - * - * @param locationName Location name. - * @param operationId Operation 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 video analyzer operation status along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String locationName, String operationId, - Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzersClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzersClient.java deleted file mode 100644 index 87044be6a428..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzersClient.java +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -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.videoanalyzer.fluent.models.VideoAnalyzerCollectionInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerUpdate; - -/** An instance of this class provides access to all the operations defined in VideoAnalyzersClient. */ -public interface VideoAnalyzersClient { - /** - * Lists the Video Analyzer accounts in the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoAnalyzer items. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VideoAnalyzerCollectionInner list(String resourceGroupName); - - /** - * Lists the Video Analyzer accounts in the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoAnalyzer items along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, Context context); - - /** - * Get the details of the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VideoAnalyzerInner getByResourceGroup(String resourceGroupName, String accountName); - - /** - * Get the details of the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified Video Analyzer account along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, - Context context); - - /** - * Create or update an instance of a Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VideoAnalyzerInner> beginCreateOrUpdate(String resourceGroupName, - String accountName, VideoAnalyzerInner parameters); - - /** - * Create or update an instance of a Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VideoAnalyzerInner> beginCreateOrUpdate(String resourceGroupName, - String accountName, VideoAnalyzerInner parameters, Context context); - - /** - * Create or update an instance of a Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VideoAnalyzerInner createOrUpdate(String resourceGroupName, String accountName, VideoAnalyzerInner parameters); - - /** - * Create or update an instance of a Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VideoAnalyzerInner createOrUpdate(String resourceGroupName, String accountName, VideoAnalyzerInner parameters, - Context context); - - /** - * Delete the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName); - - /** - * Delete the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String accountName, Context context); - - /** - * Updates an existing instance of Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VideoAnalyzerInner> beginUpdate(String resourceGroupName, - String accountName, VideoAnalyzerUpdate parameters); - - /** - * Updates an existing instance of Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, VideoAnalyzerInner> beginUpdate(String resourceGroupName, - String accountName, VideoAnalyzerUpdate parameters, Context context); - - /** - * Updates an existing instance of Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VideoAnalyzerInner update(String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters); - - /** - * Updates an existing instance of Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VideoAnalyzerInner update(String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters, - Context context); - - /** - * List all Video Analyzer accounts 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 a collection of VideoAnalyzer items. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VideoAnalyzerCollectionInner listBySubscription(); - - /** - * List all Video Analyzer accounts in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoAnalyzer items along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listBySubscriptionWithResponse(Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideosClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideosClient.java deleted file mode 100644 index b8643c1f80c1..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideosClient.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoContentTokenInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoEntityInner; - -/** An instance of this class provides access to all the operations defined in VideosClient. */ -public interface VideosClient { - /** - * Retrieves a list of video resources that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoEntity items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Retrieves a list of video resources that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoEntity items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, Integer top, Context context); - - /** - * Retrieves an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VideoEntityInner get(String resourceGroupName, String accountName, String videoName); - - /** - * Retrieves an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, String videoName, - Context context); - - /** - * Creates a new video resource or updates an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VideoEntityInner createOrUpdate(String resourceGroupName, String accountName, String videoName, - VideoEntityInner parameters); - - /** - * Creates a new video resource or updates an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String accountName, - String videoName, VideoEntityInner parameters, Context context); - - /** - * Deletes an existing video resource and its underlying data. This operation is irreversible. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String videoName); - - /** - * Deletes an existing video resource and its underlying data. This operation is irreversible. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String accountName, String videoName, Context context); - - /** - * Updates individual properties of an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VideoEntityInner update(String resourceGroupName, String accountName, String videoName, - VideoEntityInner parameters); - - /** - * Updates individual properties of an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String accountName, String videoName, - VideoEntityInner parameters, Context context); - - /** - * Generates a streaming token which can be used for accessing content from video content URLs, for a video resource - * with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return "Video content token grants access to the video content URLs.". - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VideoContentTokenInner listContentToken(String resourceGroupName, String accountName, String videoName); - - /** - * Generates a streaming token which can be used for accessing content from video content URLs, for a video resource - * with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return "Video content token grants access to the video content URLs." along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listContentTokenWithResponse(String resourceGroupName, String accountName, - String videoName, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/AccessPolicyEntityInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/AccessPolicyEntityInner.java deleted file mode 100644 index 343fea10e837..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/AccessPolicyEntityInner.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicyRole; -import com.azure.resourcemanager.videoanalyzer.models.AuthenticationBase; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Access policies help define the authentication rules, and control access to specific video resources. */ -@Fluent -public final class AccessPolicyEntityInner extends ProxyResource { - /* - * The resource properties. - */ - @JsonProperty(value = "properties") - private AccessPolicyProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: The resource properties. - * - * @return the innerProperties value. - */ - private AccessPolicyProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the role property: Defines the access level granted by this policy. - * - * @return the role value. - */ - public AccessPolicyRole role() { - return this.innerProperties() == null ? null : this.innerProperties().role(); - } - - /** - * Set the role property: Defines the access level granted by this policy. - * - * @param role the role value to set. - * @return the AccessPolicyEntityInner object itself. - */ - public AccessPolicyEntityInner withRole(AccessPolicyRole role) { - if (this.innerProperties() == null) { - this.innerProperties = new AccessPolicyProperties(); - } - this.innerProperties().withRole(role); - return this; - } - - /** - * Get the authentication property: Authentication method to be used when validating client API access. - * - * @return the authentication value. - */ - public AuthenticationBase authentication() { - return this.innerProperties() == null ? null : this.innerProperties().authentication(); - } - - /** - * Set the authentication property: Authentication method to be used when validating client API access. - * - * @param authentication the authentication value to set. - * @return the AccessPolicyEntityInner object itself. - */ - public AccessPolicyEntityInner withAuthentication(AuthenticationBase authentication) { - if (this.innerProperties() == null) { - this.innerProperties = new AccessPolicyProperties(); - } - this.innerProperties().withAuthentication(authentication); - 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/AccessPolicyProperties.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/AccessPolicyProperties.java deleted file mode 100644 index cf974eef8fff..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/AccessPolicyProperties.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicyRole; -import com.azure.resourcemanager.videoanalyzer.models.AuthenticationBase; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Application level properties for the access policy resource. */ -@Fluent -public final class AccessPolicyProperties { - /* - * Defines the access level granted by this policy. - */ - @JsonProperty(value = "role") - private AccessPolicyRole role; - - /* - * Authentication method to be used when validating client API access. - */ - @JsonProperty(value = "authentication") - private AuthenticationBase authentication; - - /** - * Get the role property: Defines the access level granted by this policy. - * - * @return the role value. - */ - public AccessPolicyRole role() { - return this.role; - } - - /** - * Set the role property: Defines the access level granted by this policy. - * - * @param role the role value to set. - * @return the AccessPolicyProperties object itself. - */ - public AccessPolicyProperties withRole(AccessPolicyRole role) { - this.role = role; - return this; - } - - /** - * Get the authentication property: Authentication method to be used when validating client API access. - * - * @return the authentication value. - */ - public AuthenticationBase authentication() { - return this.authentication; - } - - /** - * Set the authentication property: Authentication method to be used when validating client API access. - * - * @param authentication the authentication value to set. - * @return the AccessPolicyProperties object itself. - */ - public AccessPolicyProperties withAuthentication(AuthenticationBase authentication) { - this.authentication = authentication; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (authentication() != null) { - authentication().validate(); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/CheckNameAvailabilityResponseInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/CheckNameAvailabilityResponseInner.java deleted file mode 100644 index 0420211ff1d1..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/CheckNameAvailabilityResponseInner.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.videoanalyzer.models.CheckNameAvailabilityReason; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The check availability result. */ -@Fluent -public final class CheckNameAvailabilityResponseInner { - /* - * Indicates if the resource name is available. - */ - @JsonProperty(value = "nameAvailable") - private Boolean nameAvailable; - - /* - * The reason why the given name is not available. - */ - @JsonProperty(value = "reason") - private CheckNameAvailabilityReason reason; - - /* - * Detailed reason why the given name is available. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the nameAvailable property: Indicates if the resource name is available. - * - * @return the nameAvailable value. - */ - public Boolean nameAvailable() { - return this.nameAvailable; - } - - /** - * Set the nameAvailable property: Indicates if the resource name is available. - * - * @param nameAvailable the nameAvailable value to set. - * @return the CheckNameAvailabilityResponseInner object itself. - */ - public CheckNameAvailabilityResponseInner withNameAvailable(Boolean nameAvailable) { - this.nameAvailable = nameAvailable; - return this; - } - - /** - * Get the reason property: The reason why the given name is not available. - * - * @return the reason value. - */ - public CheckNameAvailabilityReason reason() { - return this.reason; - } - - /** - * Set the reason property: The reason why the given name is not available. - * - * @param reason the reason value to set. - * @return the CheckNameAvailabilityResponseInner object itself. - */ - public CheckNameAvailabilityResponseInner withReason(CheckNameAvailabilityReason reason) { - this.reason = reason; - return this; - } - - /** - * Get the message property: Detailed reason why the given name is available. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: Detailed reason why the given name is available. - * - * @param message the message value to set. - * @return the CheckNameAvailabilityResponseInner object itself. - */ - public CheckNameAvailabilityResponseInner withMessage(String message) { - this.message = message; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/EdgeModuleEntityInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/EdgeModuleEntityInner.java deleted file mode 100644 index 9c9df09aeffc..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/EdgeModuleEntityInner.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.UUID; - -/** The representation of an edge module. */ -@Fluent -public final class EdgeModuleEntityInner extends ProxyResource { - /* - * The resource properties. - */ - @JsonProperty(value = "properties") - private EdgeModuleProperties innerProperties; - - /** - * Get the innerProperties property: The resource properties. - * - * @return the innerProperties value. - */ - private EdgeModuleProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the edgeModuleId property: Internal ID generated for the instance of the Video Analyzer edge module. - * - * @return the edgeModuleId value. - */ - public UUID edgeModuleId() { - return this.innerProperties() == null ? null : this.innerProperties().edgeModuleId(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/EdgeModuleProperties.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/EdgeModuleProperties.java deleted file mode 100644 index 31e5d4ff2e5b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/EdgeModuleProperties.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.UUID; - -/** Application level properties for the edge module resource. */ -@Immutable -public final class EdgeModuleProperties { - /* - * Internal ID generated for the instance of the Video Analyzer edge - * module. - */ - @JsonProperty(value = "edgeModuleId", access = JsonProperty.Access.WRITE_ONLY) - private UUID edgeModuleId; - - /** - * Get the edgeModuleId property: Internal ID generated for the instance of the Video Analyzer edge module. - * - * @return the edgeModuleId value. - */ - public UUID edgeModuleId() { - return this.edgeModuleId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/EdgeModuleProvisioningTokenInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/EdgeModuleProvisioningTokenInner.java deleted file mode 100644 index e1405d43255e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/EdgeModuleProvisioningTokenInner.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** - * Provisioning token properties. A provisioning token allows for a single instance of Azure Video analyzer IoT edge - * module to be initialized and authorized to the cloud account. The provisioning token itself is short lived and it is - * only used for the initial handshake between IoT edge module and the cloud. After the initial handshake, the IoT edge - * module will agree on a set of authentication keys which will be auto-rotated as long as the module is able to - * periodically connect to the cloud. A new provisioning token can be generated for the same IoT edge module in case the - * module state lost or reset. - */ -@Immutable -public final class EdgeModuleProvisioningTokenInner { - /* - * The expiration date of the registration token. The Azure Video Analyzer - * IoT edge module must be initialized and connected to the Internet prior - * to the token expiration date. - */ - @JsonProperty(value = "expirationDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime expirationDate; - - /* - * The token blob to be provided to the Azure Video Analyzer IoT edge - * module through the Azure IoT Edge module twin properties. - */ - @JsonProperty(value = "token", access = JsonProperty.Access.WRITE_ONLY) - private String token; - - /** - * Get the expirationDate property: The expiration date of the registration token. The Azure Video Analyzer IoT edge - * module must be initialized and connected to the Internet prior to the token expiration date. - * - * @return the expirationDate value. - */ - public OffsetDateTime expirationDate() { - return this.expirationDate; - } - - /** - * Get the token property: The token blob to be provided to the Azure Video Analyzer IoT edge module through the - * Azure IoT Edge module twin properties. - * - * @return the token value. - */ - public String token() { - return this.token; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineInner.java deleted file mode 100644 index 27e2810e4ced..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineInner.java +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.videoanalyzer.models.LivePipelineState; -import com.azure.resourcemanager.videoanalyzer.models.ParameterDefinition; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** - * Live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving and publishing - * of content for a unique RTSP camera. - */ -@Fluent -public final class LivePipelineInner extends ProxyResource { - /* - * The resource properties. - */ - @JsonProperty(value = "properties") - private LivePipelineProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: The resource properties. - * - * @return the innerProperties value. - */ - private LivePipelineProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the topologyName property: The reference to an existing pipeline topology defined for real-time content - * processing. When activated, this live pipeline will process content according to the pipeline topology - * definition. - * - * @return the topologyName value. - */ - public String topologyName() { - return this.innerProperties() == null ? null : this.innerProperties().topologyName(); - } - - /** - * Set the topologyName property: The reference to an existing pipeline topology defined for real-time content - * processing. When activated, this live pipeline will process content according to the pipeline topology - * definition. - * - * @param topologyName the topologyName value to set. - * @return the LivePipelineInner object itself. - */ - public LivePipelineInner withTopologyName(String topologyName) { - if (this.innerProperties() == null) { - this.innerProperties = new LivePipelineProperties(); - } - this.innerProperties().withTopologyName(topologyName); - return this; - } - - /** - * Get the description property: An optional description for the pipeline. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: An optional description for the pipeline. - * - * @param description the description value to set. - * @return the LivePipelineInner object itself. - */ - public LivePipelineInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new LivePipelineProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range - * is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the service - * will disconnect temporarily from the camera. It will retry to re-establish connection (with exponential backoff), - * checking to see if the camera bitrate is now below the reserved capacity. Doing so will ensure that one 'noisy - * neighbor' does not affect other live pipelines in your account. - * - * @return the bitrateKbps value. - */ - public Integer bitrateKbps() { - return this.innerProperties() == null ? null : this.innerProperties().bitrateKbps(); - } - - /** - * Set the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range - * is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the service - * will disconnect temporarily from the camera. It will retry to re-establish connection (with exponential backoff), - * checking to see if the camera bitrate is now below the reserved capacity. Doing so will ensure that one 'noisy - * neighbor' does not affect other live pipelines in your account. - * - * @param bitrateKbps the bitrateKbps value to set. - * @return the LivePipelineInner object itself. - */ - public LivePipelineInner withBitrateKbps(Integer bitrateKbps) { - if (this.innerProperties() == null) { - this.innerProperties = new LivePipelineProperties(); - } - this.innerProperties().withBitrateKbps(bitrateKbps); - return this; - } - - /** - * Get the state property: Current state of the pipeline (read-only). - * - * @return the state value. - */ - public LivePipelineState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); - } - - /** - * Get the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @return the parameters value. - */ - public List parameters() { - return this.innerProperties() == null ? null : this.innerProperties().parameters(); - } - - /** - * Set the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @param parameters the parameters value to set. - * @return the LivePipelineInner object itself. - */ - public LivePipelineInner withParameters(List parameters) { - if (this.innerProperties() == null) { - this.innerProperties = new LivePipelineProperties(); - } - this.innerProperties().withParameters(parameters); - 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineOperationStatusInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineOperationStatusInner.java deleted file mode 100644 index 9769968533aa..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineOperationStatusInner.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Used for tracking the status of an operation on the live pipeline. */ -@Immutable -public final class LivePipelineOperationStatusInner { - /* - * The name of the live pipeline operation. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * The status of the live pipeline operation. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private String status; - - /* - * The error details for the live pipeline operation. - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private ManagementError error; - - /** - * Get the name property: The name of the live pipeline operation. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the status property: The status of the live pipeline operation. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Get the error property: The error details for the live pipeline operation. - * - * @return the error value. - */ - public ManagementError error() { - return this.error; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineProperties.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineProperties.java deleted file mode 100644 index 56178c01a2a5..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineProperties.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.videoanalyzer.models.LivePipelineState; -import com.azure.resourcemanager.videoanalyzer.models.ParameterDefinition; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Live pipeline properties. */ -@Fluent -public final class LivePipelineProperties { - /* - * The reference to an existing pipeline topology defined for real-time - * content processing. When activated, this live pipeline will process - * content according to the pipeline topology definition. - */ - @JsonProperty(value = "topologyName", required = true) - private String topologyName; - - /* - * An optional description for the pipeline. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Maximum bitrate capacity in Kbps reserved for the live pipeline. The - * allowed range is from 500 to 3000 Kbps in increments of 100 Kbps. If the - * RTSP camera exceeds this capacity, then the service will disconnect - * temporarily from the camera. It will retry to re-establish connection - * (with exponential backoff), checking to see if the camera bitrate is now - * below the reserved capacity. Doing so will ensure that one 'noisy - * neighbor' does not affect other live pipelines in your account. - */ - @JsonProperty(value = "bitrateKbps", required = true) - private int bitrateKbps; - - /* - * Current state of the pipeline (read-only). - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private LivePipelineState state; - - /* - * List of the instance level parameter values for the user-defined - * topology parameters. A pipeline can only define or override parameters - * values for parameters which have been declared in the referenced - * topology. Topology parameters without a default value must be defined. - * Topology parameters with a default value can be optionally be - * overridden. - */ - @JsonProperty(value = "parameters") - private List parameters; - - /** - * Get the topologyName property: The reference to an existing pipeline topology defined for real-time content - * processing. When activated, this live pipeline will process content according to the pipeline topology - * definition. - * - * @return the topologyName value. - */ - public String topologyName() { - return this.topologyName; - } - - /** - * Set the topologyName property: The reference to an existing pipeline topology defined for real-time content - * processing. When activated, this live pipeline will process content according to the pipeline topology - * definition. - * - * @param topologyName the topologyName value to set. - * @return the LivePipelineProperties object itself. - */ - public LivePipelineProperties withTopologyName(String topologyName) { - this.topologyName = topologyName; - return this; - } - - /** - * Get the description property: An optional description for the pipeline. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: An optional description for the pipeline. - * - * @param description the description value to set. - * @return the LivePipelineProperties object itself. - */ - public LivePipelineProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range - * is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the service - * will disconnect temporarily from the camera. It will retry to re-establish connection (with exponential backoff), - * checking to see if the camera bitrate is now below the reserved capacity. Doing so will ensure that one 'noisy - * neighbor' does not affect other live pipelines in your account. - * - * @return the bitrateKbps value. - */ - public int bitrateKbps() { - return this.bitrateKbps; - } - - /** - * Set the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range - * is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the service - * will disconnect temporarily from the camera. It will retry to re-establish connection (with exponential backoff), - * checking to see if the camera bitrate is now below the reserved capacity. Doing so will ensure that one 'noisy - * neighbor' does not affect other live pipelines in your account. - * - * @param bitrateKbps the bitrateKbps value to set. - * @return the LivePipelineProperties object itself. - */ - public LivePipelineProperties withBitrateKbps(int bitrateKbps) { - this.bitrateKbps = bitrateKbps; - return this; - } - - /** - * Get the state property: Current state of the pipeline (read-only). - * - * @return the state value. - */ - public LivePipelineState state() { - return this.state; - } - - /** - * Get the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @return the parameters value. - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @param parameters the parameters value to set. - * @return the LivePipelineProperties object itself. - */ - public LivePipelineProperties withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (topologyName() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property topologyName in model LivePipelineProperties")); - } - if (parameters() != null) { - parameters().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(LivePipelineProperties.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelinePropertiesUpdate.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelinePropertiesUpdate.java deleted file mode 100644 index 0a8406c5bbec..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelinePropertiesUpdate.java +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.videoanalyzer.models.LivePipelineState; -import com.azure.resourcemanager.videoanalyzer.models.ParameterDefinition; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Live pipeline properties. */ -@Fluent -public final class LivePipelinePropertiesUpdate { - /* - * The reference to an existing pipeline topology defined for real-time - * content processing. When activated, this live pipeline will process - * content according to the pipeline topology definition. - */ - @JsonProperty(value = "topologyName") - private String topologyName; - - /* - * An optional description for the pipeline. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Maximum bitrate capacity in Kbps reserved for the live pipeline. The - * allowed range is from 500 to 3000 Kbps in increments of 100 Kbps. If the - * RTSP camera exceeds this capacity, then the service will disconnect - * temporarily from the camera. It will retry to re-establish connection - * (with exponential backoff), checking to see if the camera bitrate is now - * below the reserved capacity. Doing so will ensure that one 'noisy - * neighbor' does not affect other live pipelines in your account. - */ - @JsonProperty(value = "bitrateKbps") - private Integer bitrateKbps; - - /* - * Current state of the pipeline (read-only). - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private LivePipelineState state; - - /* - * List of the instance level parameter values for the user-defined - * topology parameters. A pipeline can only define or override parameters - * values for parameters which have been declared in the referenced - * topology. Topology parameters without a default value must be defined. - * Topology parameters with a default value can be optionally be - * overridden. - */ - @JsonProperty(value = "parameters") - private List parameters; - - /** - * Get the topologyName property: The reference to an existing pipeline topology defined for real-time content - * processing. When activated, this live pipeline will process content according to the pipeline topology - * definition. - * - * @return the topologyName value. - */ - public String topologyName() { - return this.topologyName; - } - - /** - * Set the topologyName property: The reference to an existing pipeline topology defined for real-time content - * processing. When activated, this live pipeline will process content according to the pipeline topology - * definition. - * - * @param topologyName the topologyName value to set. - * @return the LivePipelinePropertiesUpdate object itself. - */ - public LivePipelinePropertiesUpdate withTopologyName(String topologyName) { - this.topologyName = topologyName; - return this; - } - - /** - * Get the description property: An optional description for the pipeline. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: An optional description for the pipeline. - * - * @param description the description value to set. - * @return the LivePipelinePropertiesUpdate object itself. - */ - public LivePipelinePropertiesUpdate withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range - * is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the service - * will disconnect temporarily from the camera. It will retry to re-establish connection (with exponential backoff), - * checking to see if the camera bitrate is now below the reserved capacity. Doing so will ensure that one 'noisy - * neighbor' does not affect other live pipelines in your account. - * - * @return the bitrateKbps value. - */ - public Integer bitrateKbps() { - return this.bitrateKbps; - } - - /** - * Set the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range - * is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the service - * will disconnect temporarily from the camera. It will retry to re-establish connection (with exponential backoff), - * checking to see if the camera bitrate is now below the reserved capacity. Doing so will ensure that one 'noisy - * neighbor' does not affect other live pipelines in your account. - * - * @param bitrateKbps the bitrateKbps value to set. - * @return the LivePipelinePropertiesUpdate object itself. - */ - public LivePipelinePropertiesUpdate withBitrateKbps(Integer bitrateKbps) { - this.bitrateKbps = bitrateKbps; - return this; - } - - /** - * Get the state property: Current state of the pipeline (read-only). - * - * @return the state value. - */ - public LivePipelineState state() { - return this.state; - } - - /** - * Get the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @return the parameters value. - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @param parameters the parameters value to set. - * @return the LivePipelinePropertiesUpdate object itself. - */ - public LivePipelinePropertiesUpdate withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (parameters() != null) { - parameters().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/OperationCollectionInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/OperationCollectionInner.java deleted file mode 100644 index c1e58a31943b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/OperationCollectionInner.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.videoanalyzer.models.Operation; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A collection of Operation items. */ -@Fluent -public final class OperationCollectionInner { - /* - * A collection of Operation items. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: A collection of Operation items. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A collection of Operation items. - * - * @param value the value value to set. - * @return the OperationCollectionInner object itself. - */ - public OperationCollectionInner 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobInner.java deleted file mode 100644 index 31f15a55092c..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobInner.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.videoanalyzer.models.ParameterDefinition; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobError; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobState; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Pipeline job represents a unique instance of a batch topology, used for offline processing of selected portions of - * archived content. - */ -@Fluent -public final class PipelineJobInner extends ProxyResource { - /* - * The resource properties. - */ - @JsonProperty(value = "properties") - private PipelineJobProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: The resource properties. - * - * @return the innerProperties value. - */ - private PipelineJobProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the topologyName property: Reference to an existing pipeline topology. When activated, this pipeline job will - * process content according to the pipeline topology definition. - * - * @return the topologyName value. - */ - public String topologyName() { - return this.innerProperties() == null ? null : this.innerProperties().topologyName(); - } - - /** - * Set the topologyName property: Reference to an existing pipeline topology. When activated, this pipeline job will - * process content according to the pipeline topology definition. - * - * @param topologyName the topologyName value to set. - * @return the PipelineJobInner object itself. - */ - public PipelineJobInner withTopologyName(String topologyName) { - if (this.innerProperties() == null) { - this.innerProperties = new PipelineJobProperties(); - } - this.innerProperties().withTopologyName(topologyName); - return this; - } - - /** - * Get the description property: An optional description for the pipeline. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: An optional description for the pipeline. - * - * @param description the description value to set. - * @return the PipelineJobInner object itself. - */ - public PipelineJobInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new PipelineJobProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the state property: Current state of the pipeline (read-only). - * - * @return the state value. - */ - public PipelineJobState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); - } - - /** - * Get the expiration property: The date-time by when this pipeline job will be automatically deleted from your - * account. - * - * @return the expiration value. - */ - public OffsetDateTime expiration() { - return this.innerProperties() == null ? null : this.innerProperties().expiration(); - } - - /** - * Get the error property: Details about the error, in case the pipeline job fails. - * - * @return the error value. - */ - public PipelineJobError error() { - return this.innerProperties() == null ? null : this.innerProperties().error(); - } - - /** - * Get the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @return the parameters value. - */ - public List parameters() { - return this.innerProperties() == null ? null : this.innerProperties().parameters(); - } - - /** - * Set the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @param parameters the parameters value to set. - * @return the PipelineJobInner object itself. - */ - public PipelineJobInner withParameters(List parameters) { - if (this.innerProperties() == null) { - this.innerProperties = new PipelineJobProperties(); - } - this.innerProperties().withParameters(parameters); - 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobOperationStatusInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobOperationStatusInner.java deleted file mode 100644 index 4c5a88e8df8e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobOperationStatusInner.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Used for tracking the status of an operation on the pipeline job. */ -@Immutable -public final class PipelineJobOperationStatusInner { - /* - * The name of the pipeline job operation. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * The status of the pipeline job operation. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private String status; - - /* - * The error details for the pipeline job operation. - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private ManagementError error; - - /** - * Get the name property: The name of the pipeline job operation. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the status property: The status of the pipeline job operation. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Get the error property: The error details for the pipeline job operation. - * - * @return the error value. - */ - public ManagementError error() { - return this.error; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobProperties.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobProperties.java deleted file mode 100644 index ee55f35852ae..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobProperties.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.videoanalyzer.models.ParameterDefinition; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobError; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobState; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Pipeline job properties. */ -@Fluent -public final class PipelineJobProperties { - /* - * Reference to an existing pipeline topology. When activated, this - * pipeline job will process content according to the pipeline topology - * definition. - */ - @JsonProperty(value = "topologyName", required = true) - private String topologyName; - - /* - * An optional description for the pipeline. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Current state of the pipeline (read-only). - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private PipelineJobState state; - - /* - * The date-time by when this pipeline job will be automatically deleted - * from your account. - */ - @JsonProperty(value = "expiration", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime expiration; - - /* - * Details about the error, in case the pipeline job fails. - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private PipelineJobError error; - - /* - * List of the instance level parameter values for the user-defined - * topology parameters. A pipeline can only define or override parameters - * values for parameters which have been declared in the referenced - * topology. Topology parameters without a default value must be defined. - * Topology parameters with a default value can be optionally be - * overridden. - */ - @JsonProperty(value = "parameters") - private List parameters; - - /** - * Get the topologyName property: Reference to an existing pipeline topology. When activated, this pipeline job will - * process content according to the pipeline topology definition. - * - * @return the topologyName value. - */ - public String topologyName() { - return this.topologyName; - } - - /** - * Set the topologyName property: Reference to an existing pipeline topology. When activated, this pipeline job will - * process content according to the pipeline topology definition. - * - * @param topologyName the topologyName value to set. - * @return the PipelineJobProperties object itself. - */ - public PipelineJobProperties withTopologyName(String topologyName) { - this.topologyName = topologyName; - return this; - } - - /** - * Get the description property: An optional description for the pipeline. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: An optional description for the pipeline. - * - * @param description the description value to set. - * @return the PipelineJobProperties object itself. - */ - public PipelineJobProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the state property: Current state of the pipeline (read-only). - * - * @return the state value. - */ - public PipelineJobState state() { - return this.state; - } - - /** - * Get the expiration property: The date-time by when this pipeline job will be automatically deleted from your - * account. - * - * @return the expiration value. - */ - public OffsetDateTime expiration() { - return this.expiration; - } - - /** - * Get the error property: Details about the error, in case the pipeline job fails. - * - * @return the error value. - */ - public PipelineJobError error() { - return this.error; - } - - /** - * Get the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @return the parameters value. - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @param parameters the parameters value to set. - * @return the PipelineJobProperties object itself. - */ - public PipelineJobProperties withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (topologyName() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property topologyName in model PipelineJobProperties")); - } - if (error() != null) { - error().validate(); - } - if (parameters() != null) { - parameters().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PipelineJobProperties.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobPropertiesUpdate.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobPropertiesUpdate.java deleted file mode 100644 index 332708699a4d..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobPropertiesUpdate.java +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.videoanalyzer.models.ParameterDefinition; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobError; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobState; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Pipeline job properties. */ -@Fluent -public final class PipelineJobPropertiesUpdate { - /* - * Reference to an existing pipeline topology. When activated, this - * pipeline job will process content according to the pipeline topology - * definition. - */ - @JsonProperty(value = "topologyName") - private String topologyName; - - /* - * An optional description for the pipeline. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Current state of the pipeline (read-only). - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private PipelineJobState state; - - /* - * The date-time by when this pipeline job will be automatically deleted - * from your account. - */ - @JsonProperty(value = "expiration", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime expiration; - - /* - * Details about the error, in case the pipeline job fails. - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private PipelineJobError error; - - /* - * List of the instance level parameter values for the user-defined - * topology parameters. A pipeline can only define or override parameters - * values for parameters which have been declared in the referenced - * topology. Topology parameters without a default value must be defined. - * Topology parameters with a default value can be optionally be - * overridden. - */ - @JsonProperty(value = "parameters") - private List parameters; - - /** - * Get the topologyName property: Reference to an existing pipeline topology. When activated, this pipeline job will - * process content according to the pipeline topology definition. - * - * @return the topologyName value. - */ - public String topologyName() { - return this.topologyName; - } - - /** - * Set the topologyName property: Reference to an existing pipeline topology. When activated, this pipeline job will - * process content according to the pipeline topology definition. - * - * @param topologyName the topologyName value to set. - * @return the PipelineJobPropertiesUpdate object itself. - */ - public PipelineJobPropertiesUpdate withTopologyName(String topologyName) { - this.topologyName = topologyName; - return this; - } - - /** - * Get the description property: An optional description for the pipeline. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: An optional description for the pipeline. - * - * @param description the description value to set. - * @return the PipelineJobPropertiesUpdate object itself. - */ - public PipelineJobPropertiesUpdate withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the state property: Current state of the pipeline (read-only). - * - * @return the state value. - */ - public PipelineJobState state() { - return this.state; - } - - /** - * Get the expiration property: The date-time by when this pipeline job will be automatically deleted from your - * account. - * - * @return the expiration value. - */ - public OffsetDateTime expiration() { - return this.expiration; - } - - /** - * Get the error property: Details about the error, in case the pipeline job fails. - * - * @return the error value. - */ - public PipelineJobError error() { - return this.error; - } - - /** - * Get the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @return the parameters value. - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @param parameters the parameters value to set. - * @return the PipelineJobPropertiesUpdate object itself. - */ - public PipelineJobPropertiesUpdate withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (error() != null) { - error().validate(); - } - if (parameters() != null) { - parameters().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineTopologyInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineTopologyInner.java deleted file mode 100644 index 132668e69cef..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineTopologyInner.java +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.videoanalyzer.models.Kind; -import com.azure.resourcemanager.videoanalyzer.models.ParameterDeclaration; -import com.azure.resourcemanager.videoanalyzer.models.ProcessorNodeBase; -import com.azure.resourcemanager.videoanalyzer.models.SinkNodeBase; -import com.azure.resourcemanager.videoanalyzer.models.Sku; -import com.azure.resourcemanager.videoanalyzer.models.SourceNodeBase; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** - * Pipeline topology describes the processing steps to be applied when processing content for a particular outcome. The - * topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances - * which share the same processing characteristics. For instance, a pipeline topology which captures content from a RTSP - * camera and archives the content can be reused across many different cameras, as long as the same processing is to be - * applied across all the cameras. Individual instance properties can be defined through the use of user-defined - * parameters, which allow for a topology to be parameterized. This allows individual pipelines refer to different - * values, such as individual cameras' RTSP endpoints and credentials. Overall a topology is composed of the following: - * - *

- Parameters: list of user defined parameters that can be references across the topology nodes. - Sources: list of - * one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras. - - * Processors: list of nodes which perform data analysis or transformations. - Sinks: list of one or more data sinks - * which allow for data to be stored or exported to other destinations. - */ -@Fluent -public final class PipelineTopologyInner extends ProxyResource { - /* - * The resource properties. - */ - @JsonProperty(value = "properties") - private PipelineTopologyProperties innerProperties; - - /* - * Topology kind. - */ - @JsonProperty(value = "kind", required = true) - private Kind kind; - - /* - * Describes the properties of a SKU. - */ - @JsonProperty(value = "sku", required = true) - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: The resource properties. - * - * @return the innerProperties value. - */ - private PipelineTopologyProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the kind property: Topology kind. - * - * @return the kind value. - */ - public Kind kind() { - return this.kind; - } - - /** - * Set the kind property: Topology kind. - * - * @param kind the kind value to set. - * @return the PipelineTopologyInner object itself. - */ - public PipelineTopologyInner withKind(Kind kind) { - this.kind = kind; - return this; - } - - /** - * Get the sku property: Describes the properties of a SKU. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: Describes the properties of a SKU. - * - * @param sku the sku value to set. - * @return the PipelineTopologyInner object itself. - */ - public PipelineTopologyInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the description property: An optional description of the pipeline topology. It is recommended that the - * expected use of the topology to be described here. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: An optional description of the pipeline topology. It is recommended that the - * expected use of the topology to be described here. - * - * @param description the description value to set. - * @return the PipelineTopologyInner object itself. - */ - public PipelineTopologyInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new PipelineTopologyProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the parameters property: List of the topology parameter declarations. Parameters declared here can be - * referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can - * have optional default values and can later be defined in individual instances of the pipeline. - * - * @return the parameters value. - */ - public List parameters() { - return this.innerProperties() == null ? null : this.innerProperties().parameters(); - } - - /** - * Set the parameters property: List of the topology parameter declarations. Parameters declared here can be - * referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can - * have optional default values and can later be defined in individual instances of the pipeline. - * - * @param parameters the parameters value to set. - * @return the PipelineTopologyInner object itself. - */ - public PipelineTopologyInner withParameters(List parameters) { - if (this.innerProperties() == null) { - this.innerProperties = new PipelineTopologyProperties(); - } - this.innerProperties().withParameters(parameters); - return this; - } - - /** - * Get the sources property: List of the topology source nodes. Source nodes enable external data to be ingested by - * the pipeline. - * - * @return the sources value. - */ - public List sources() { - return this.innerProperties() == null ? null : this.innerProperties().sources(); - } - - /** - * Set the sources property: List of the topology source nodes. Source nodes enable external data to be ingested by - * the pipeline. - * - * @param sources the sources value to set. - * @return the PipelineTopologyInner object itself. - */ - public PipelineTopologyInner withSources(List sources) { - if (this.innerProperties() == null) { - this.innerProperties = new PipelineTopologyProperties(); - } - this.innerProperties().withSources(sources); - return this; - } - - /** - * Get the processors property: List of the topology processor nodes. Processor nodes enable pipeline data to be - * analyzed, processed or transformed. - * - * @return the processors value. - */ - public List processors() { - return this.innerProperties() == null ? null : this.innerProperties().processors(); - } - - /** - * Set the processors property: List of the topology processor nodes. Processor nodes enable pipeline data to be - * analyzed, processed or transformed. - * - * @param processors the processors value to set. - * @return the PipelineTopologyInner object itself. - */ - public PipelineTopologyInner withProcessors(List processors) { - if (this.innerProperties() == null) { - this.innerProperties = new PipelineTopologyProperties(); - } - this.innerProperties().withProcessors(processors); - return this; - } - - /** - * Get the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. - * - * @return the sinks value. - */ - public List sinks() { - return this.innerProperties() == null ? null : this.innerProperties().sinks(); - } - - /** - * Set the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. - * - * @param sinks the sinks value to set. - * @return the PipelineTopologyInner object itself. - */ - public PipelineTopologyInner withSinks(List sinks) { - if (this.innerProperties() == null) { - this.innerProperties = new PipelineTopologyProperties(); - } - this.innerProperties().withSinks(sinks); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (kind() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property kind in model PipelineTopologyInner")); - } - if (sku() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property sku in model PipelineTopologyInner")); - } else { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PipelineTopologyInner.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineTopologyProperties.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineTopologyProperties.java deleted file mode 100644 index f7818b01cd68..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineTopologyProperties.java +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.videoanalyzer.models.ParameterDeclaration; -import com.azure.resourcemanager.videoanalyzer.models.ProcessorNodeBase; -import com.azure.resourcemanager.videoanalyzer.models.SinkNodeBase; -import com.azure.resourcemanager.videoanalyzer.models.SourceNodeBase; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes the properties of a pipeline topology. */ -@Fluent -public final class PipelineTopologyProperties { - /* - * An optional description of the pipeline topology. It is recommended that - * the expected use of the topology to be described here. - */ - @JsonProperty(value = "description") - private String description; - - /* - * List of the topology parameter declarations. Parameters declared here - * can be referenced throughout the topology nodes through the use of - * "${PARAMETER_NAME}" string pattern. Parameters can have optional default - * values and can later be defined in individual instances of the pipeline. - */ - @JsonProperty(value = "parameters") - private List parameters; - - /* - * List of the topology source nodes. Source nodes enable external data to - * be ingested by the pipeline. - */ - @JsonProperty(value = "sources", required = true) - private List sources; - - /* - * List of the topology processor nodes. Processor nodes enable pipeline - * data to be analyzed, processed or transformed. - */ - @JsonProperty(value = "processors") - private List processors; - - /* - * List of the topology sink nodes. Sink nodes allow pipeline data to be - * stored or exported. - */ - @JsonProperty(value = "sinks", required = true) - private List sinks; - - /** - * Get the description property: An optional description of the pipeline topology. It is recommended that the - * expected use of the topology to be described here. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: An optional description of the pipeline topology. It is recommended that the - * expected use of the topology to be described here. - * - * @param description the description value to set. - * @return the PipelineTopologyProperties object itself. - */ - public PipelineTopologyProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the parameters property: List of the topology parameter declarations. Parameters declared here can be - * referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can - * have optional default values and can later be defined in individual instances of the pipeline. - * - * @return the parameters value. - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters property: List of the topology parameter declarations. Parameters declared here can be - * referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can - * have optional default values and can later be defined in individual instances of the pipeline. - * - * @param parameters the parameters value to set. - * @return the PipelineTopologyProperties object itself. - */ - public PipelineTopologyProperties withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the sources property: List of the topology source nodes. Source nodes enable external data to be ingested by - * the pipeline. - * - * @return the sources value. - */ - public List sources() { - return this.sources; - } - - /** - * Set the sources property: List of the topology source nodes. Source nodes enable external data to be ingested by - * the pipeline. - * - * @param sources the sources value to set. - * @return the PipelineTopologyProperties object itself. - */ - public PipelineTopologyProperties withSources(List sources) { - this.sources = sources; - return this; - } - - /** - * Get the processors property: List of the topology processor nodes. Processor nodes enable pipeline data to be - * analyzed, processed or transformed. - * - * @return the processors value. - */ - public List processors() { - return this.processors; - } - - /** - * Set the processors property: List of the topology processor nodes. Processor nodes enable pipeline data to be - * analyzed, processed or transformed. - * - * @param processors the processors value to set. - * @return the PipelineTopologyProperties object itself. - */ - public PipelineTopologyProperties withProcessors(List processors) { - this.processors = processors; - return this; - } - - /** - * Get the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. - * - * @return the sinks value. - */ - public List sinks() { - return this.sinks; - } - - /** - * Set the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. - * - * @param sinks the sinks value to set. - * @return the PipelineTopologyProperties object itself. - */ - public PipelineTopologyProperties withSinks(List sinks) { - this.sinks = sinks; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (parameters() != null) { - parameters().forEach(e -> e.validate()); - } - if (sources() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property sources in model PipelineTopologyProperties")); - } else { - sources().forEach(e -> e.validate()); - } - if (processors() != null) { - processors().forEach(e -> e.validate()); - } - if (sinks() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property sinks in model PipelineTopologyProperties")); - } else { - sinks().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PipelineTopologyProperties.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineTopologyPropertiesUpdate.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineTopologyPropertiesUpdate.java deleted file mode 100644 index 0ce1eac2f1d7..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineTopologyPropertiesUpdate.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.videoanalyzer.models.ParameterDeclaration; -import com.azure.resourcemanager.videoanalyzer.models.ProcessorNodeBase; -import com.azure.resourcemanager.videoanalyzer.models.SinkNodeBase; -import com.azure.resourcemanager.videoanalyzer.models.SourceNodeBase; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes the properties of a pipeline topology. */ -@Fluent -public final class PipelineTopologyPropertiesUpdate { - /* - * An optional description of the pipeline topology. It is recommended that - * the expected use of the topology to be described here. - */ - @JsonProperty(value = "description") - private String description; - - /* - * List of the topology parameter declarations. Parameters declared here - * can be referenced throughout the topology nodes through the use of - * "${PARAMETER_NAME}" string pattern. Parameters can have optional default - * values and can later be defined in individual instances of the pipeline. - */ - @JsonProperty(value = "parameters") - private List parameters; - - /* - * List of the topology source nodes. Source nodes enable external data to - * be ingested by the pipeline. - */ - @JsonProperty(value = "sources") - private List sources; - - /* - * List of the topology processor nodes. Processor nodes enable pipeline - * data to be analyzed, processed or transformed. - */ - @JsonProperty(value = "processors") - private List processors; - - /* - * List of the topology sink nodes. Sink nodes allow pipeline data to be - * stored or exported. - */ - @JsonProperty(value = "sinks") - private List sinks; - - /** - * Get the description property: An optional description of the pipeline topology. It is recommended that the - * expected use of the topology to be described here. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: An optional description of the pipeline topology. It is recommended that the - * expected use of the topology to be described here. - * - * @param description the description value to set. - * @return the PipelineTopologyPropertiesUpdate object itself. - */ - public PipelineTopologyPropertiesUpdate withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the parameters property: List of the topology parameter declarations. Parameters declared here can be - * referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can - * have optional default values and can later be defined in individual instances of the pipeline. - * - * @return the parameters value. - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters property: List of the topology parameter declarations. Parameters declared here can be - * referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can - * have optional default values and can later be defined in individual instances of the pipeline. - * - * @param parameters the parameters value to set. - * @return the PipelineTopologyPropertiesUpdate object itself. - */ - public PipelineTopologyPropertiesUpdate withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the sources property: List of the topology source nodes. Source nodes enable external data to be ingested by - * the pipeline. - * - * @return the sources value. - */ - public List sources() { - return this.sources; - } - - /** - * Set the sources property: List of the topology source nodes. Source nodes enable external data to be ingested by - * the pipeline. - * - * @param sources the sources value to set. - * @return the PipelineTopologyPropertiesUpdate object itself. - */ - public PipelineTopologyPropertiesUpdate withSources(List sources) { - this.sources = sources; - return this; - } - - /** - * Get the processors property: List of the topology processor nodes. Processor nodes enable pipeline data to be - * analyzed, processed or transformed. - * - * @return the processors value. - */ - public List processors() { - return this.processors; - } - - /** - * Set the processors property: List of the topology processor nodes. Processor nodes enable pipeline data to be - * analyzed, processed or transformed. - * - * @param processors the processors value to set. - * @return the PipelineTopologyPropertiesUpdate object itself. - */ - public PipelineTopologyPropertiesUpdate withProcessors(List processors) { - this.processors = processors; - return this; - } - - /** - * Get the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. - * - * @return the sinks value. - */ - public List sinks() { - return this.sinks; - } - - /** - * Set the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. - * - * @param sinks the sinks value to set. - * @return the PipelineTopologyPropertiesUpdate object itself. - */ - public PipelineTopologyPropertiesUpdate withSinks(List sinks) { - this.sinks = sinks; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (parameters() != null) { - parameters().forEach(e -> e.validate()); - } - if (sources() != null) { - sources().forEach(e -> e.validate()); - } - if (processors() != null) { - processors().forEach(e -> e.validate()); - } - if (sinks() != null) { - sinks().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionInner.java deleted file mode 100644 index dfed30bee06d..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionInner.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpoint; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkServiceConnectionState; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Private Endpoint Connection resource. */ -@Fluent -public final class PrivateEndpointConnectionInner extends ProxyResource { - /* - * Resource properties. - */ - @JsonProperty(value = "properties") - private PrivateEndpointConnectionProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private PrivateEndpointConnectionProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the privateEndpoint property: The resource of private end point. - * - * @return the privateEndpoint value. - */ - public PrivateEndpoint privateEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); - } - - /** - * Set the privateEndpoint property: The resource of private end point. - * - * @param privateEndpoint the privateEndpoint value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateEndpoint(privateEndpoint); - return this; - } - - /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); - } - - /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner - withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); - return this; - } - - /** - * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @return the provisioningState value. - */ - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionListResultInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionListResultInner.java deleted file mode 100644 index fdad08cada6b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionListResultInner.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of private endpoint connection associated with the specified storage account. */ -@Fluent -public final class PrivateEndpointConnectionListResultInner { - /* - * Array of private endpoint connections - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: Array of private endpoint connections. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of private endpoint connections. - * - * @param value the value value to set. - * @return the PrivateEndpointConnectionListResultInner object itself. - */ - public PrivateEndpointConnectionListResultInner 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionProperties.java deleted file mode 100644 index 9250b62ff000..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionProperties.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpoint; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkServiceConnectionState; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of the PrivateEndpointConnectProperties. */ -@Fluent -public final class PrivateEndpointConnectionProperties { - /* - * The resource of private end point. - */ - @JsonProperty(value = "privateEndpoint") - private PrivateEndpoint privateEndpoint; - - /* - * A collection of information about the state of the connection between - * service consumer and provider. - */ - @JsonProperty(value = "privateLinkServiceConnectionState", required = true) - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; - - /* - * The provisioning state of the private endpoint connection resource. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private PrivateEndpointConnectionProvisioningState provisioningState; - - /** - * Get the privateEndpoint property: The resource of private end point. - * - * @return the privateEndpoint value. - */ - public PrivateEndpoint privateEndpoint() { - return this.privateEndpoint; - } - - /** - * Set the privateEndpoint property: The resource of private end point. - * - * @param privateEndpoint the privateEndpoint value to set. - * @return the PrivateEndpointConnectionProperties object itself. - */ - public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.privateEndpoint = privateEndpoint; - return this; - } - - /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; - } - - /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. - * @return the PrivateEndpointConnectionProperties object itself. - */ - public PrivateEndpointConnectionProperties - withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; - return this; - } - - /** - * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @return the provisioningState value. - */ - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property privateLinkServiceConnectionState in model" - + " PrivateEndpointConnectionProperties")); - } else { - privateLinkServiceConnectionState().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceInner.java deleted file mode 100644 index 13cc805195ab..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceInner.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A private link resource. */ -@Fluent -public final class PrivateLinkResourceInner extends ProxyResource { - /* - * Resource properties. - */ - @JsonProperty(value = "properties") - private PrivateLinkResourceProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private PrivateLinkResourceProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - public String groupId() { - return this.innerProperties() == null ? null : this.innerProperties().groupId(); - } - - /** - * Get the requiredMembers property: The private link resource required member names. - * - * @return the requiredMembers value. - */ - public List requiredMembers() { - return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); - } - - /** - * Get the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @return the requiredZoneNames value. - */ - public List requiredZoneNames() { - return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); - } - - /** - * Set the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResourceInner object itself. - */ - public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateLinkResourceProperties(); - } - this.innerProperties().withRequiredZoneNames(requiredZoneNames); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceListResultInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceListResultInner.java deleted file mode 100644 index 62f6e56aad78..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceListResultInner.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of private link resources. */ -@Fluent -public final class PrivateLinkResourceListResultInner { - /* - * Array of private link resources - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: Array of private link resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of private link resources. - * - * @param value the value value to set. - * @return the PrivateLinkResourceListResultInner object itself. - */ - public PrivateLinkResourceListResultInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceProperties.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceProperties.java deleted file mode 100644 index b11019759a13..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceProperties.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Properties of a private link resource. */ -@Fluent -public final class PrivateLinkResourceProperties { - /* - * The private link resource group id. - */ - @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY) - private String groupId; - - /* - * The private link resource required member names. - */ - @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY) - private List requiredMembers; - - /* - * The private link resource Private link DNS zone name. - */ - @JsonProperty(value = "requiredZoneNames") - private List requiredZoneNames; - - /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - public String groupId() { - return this.groupId; - } - - /** - * Get the requiredMembers property: The private link resource required member names. - * - * @return the requiredMembers value. - */ - public List requiredMembers() { - return this.requiredMembers; - } - - /** - * Get the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @return the requiredZoneNames value. - */ - public List requiredZoneNames() { - return this.requiredZoneNames; - } - - /** - * Set the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResourceProperties object itself. - */ - public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) { - this.requiredZoneNames = requiredZoneNames; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerCollectionInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerCollectionInner.java deleted file mode 100644 index 19ffd24f1073..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerCollectionInner.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A collection of VideoAnalyzer items. */ -@Fluent -public final class VideoAnalyzerCollectionInner { - /* - * A collection of VideoAnalyzer items. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: A collection of VideoAnalyzer items. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A collection of VideoAnalyzer items. - * - * @param value the value value to set. - * @return the VideoAnalyzerCollectionInner object itself. - */ - public VideoAnalyzerCollectionInner 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerInner.java deleted file mode 100644 index 20a61c701c37..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerInner.java +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.resourcemanager.videoanalyzer.models.AccountEncryption; -import com.azure.resourcemanager.videoanalyzer.models.Endpoint; -import com.azure.resourcemanager.videoanalyzer.models.IotHub; -import com.azure.resourcemanager.videoanalyzer.models.NetworkAccessControl; -import com.azure.resourcemanager.videoanalyzer.models.ProvisioningState; -import com.azure.resourcemanager.videoanalyzer.models.PublicNetworkAccess; -import com.azure.resourcemanager.videoanalyzer.models.StorageAccount; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerIdentity; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** The Video Analyzer account. */ -@Fluent -public final class VideoAnalyzerInner extends Resource { - /* - * The resource properties. - */ - @JsonProperty(value = "properties") - private VideoAnalyzerProperties innerProperties; - - /* - * The identities associated to the Video Analyzer resource. - */ - @JsonProperty(value = "identity") - private VideoAnalyzerIdentity identity; - - /** - * Get the innerProperties property: The resource properties. - * - * @return the innerProperties value. - */ - private VideoAnalyzerProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the identity property: The identities associated to the Video Analyzer resource. - * - * @return the identity value. - */ - public VideoAnalyzerIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identities associated to the Video Analyzer resource. - * - * @param identity the identity value to set. - * @return the VideoAnalyzerInner object itself. - */ - public VideoAnalyzerInner withIdentity(VideoAnalyzerIdentity identity) { - this.identity = identity; - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoAnalyzerInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoAnalyzerInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the storageAccounts property: The storage accounts for this resource. - * - * @return the storageAccounts value. - */ - public List storageAccounts() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccounts(); - } - - /** - * Set the storageAccounts property: The storage accounts for this resource. - * - * @param storageAccounts the storageAccounts value to set. - * @return the VideoAnalyzerInner object itself. - */ - public VideoAnalyzerInner withStorageAccounts(List storageAccounts) { - if (this.innerProperties() == null) { - this.innerProperties = new VideoAnalyzerProperties(); - } - this.innerProperties().withStorageAccounts(storageAccounts); - return this; - } - - /** - * Get the endpoints property: The endpoints associated with this resource. - * - * @return the endpoints value. - */ - public List endpoints() { - return this.innerProperties() == null ? null : this.innerProperties().endpoints(); - } - - /** - * Get the encryption property: The account encryption properties. - * - * @return the encryption value. - */ - public AccountEncryption encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); - } - - /** - * Set the encryption property: The account encryption properties. - * - * @param encryption the encryption value to set. - * @return the VideoAnalyzerInner object itself. - */ - public VideoAnalyzerInner withEncryption(AccountEncryption encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new VideoAnalyzerProperties(); - } - this.innerProperties().withEncryption(encryption); - return this; - } - - /** - * Get the iotHubs property: The IoT Hubs for this resource. - * - * @return the iotHubs value. - */ - public List iotHubs() { - return this.innerProperties() == null ? null : this.innerProperties().iotHubs(); - } - - /** - * Set the iotHubs property: The IoT Hubs for this resource. - * - * @param iotHubs the iotHubs value to set. - * @return the VideoAnalyzerInner object itself. - */ - public VideoAnalyzerInner withIotHubs(List iotHubs) { - if (this.innerProperties() == null) { - this.innerProperties = new VideoAnalyzerProperties(); - } - this.innerProperties().withIotHubs(iotHubs); - return this; - } - - /** - * Get the publicNetworkAccess property: Whether or not public network access is allowed for resources under the - * Video Analyzer account. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); - } - - /** - * Set the publicNetworkAccess property: Whether or not public network access is allowed for resources under the - * Video Analyzer account. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the VideoAnalyzerInner object itself. - */ - public VideoAnalyzerInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new VideoAnalyzerProperties(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); - return this; - } - - /** - * Get the networkAccessControl property: Network access control for Video Analyzer. - * - * @return the networkAccessControl value. - */ - public NetworkAccessControl networkAccessControl() { - return this.innerProperties() == null ? null : this.innerProperties().networkAccessControl(); - } - - /** - * Set the networkAccessControl property: Network access control for Video Analyzer. - * - * @param networkAccessControl the networkAccessControl value to set. - * @return the VideoAnalyzerInner object itself. - */ - public VideoAnalyzerInner withNetworkAccessControl(NetworkAccessControl networkAccessControl) { - if (this.innerProperties() == null) { - this.innerProperties = new VideoAnalyzerProperties(); - } - this.innerProperties().withNetworkAccessControl(networkAccessControl); - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the Video Analyzer account. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the privateEndpointConnections property: Private Endpoint Connections created under Video Analyzer account. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (identity() != null) { - identity().validate(); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerOperationStatusInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerOperationStatusInner.java deleted file mode 100644 index ba99dc827873..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerOperationStatusInner.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Status of video analyzer operation. */ -@Fluent -public final class VideoAnalyzerOperationStatusInner { - /* - * Operation identifier. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * Operation resource ID. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Operation start time. - */ - @JsonProperty(value = "startTime") - private String startTime; - - /* - * Operation end time. - */ - @JsonProperty(value = "endTime") - private String endTime; - - /* - * Operation status. - */ - @JsonProperty(value = "status") - private String status; - - /* - * The error detail. - */ - @JsonProperty(value = "error") - private ManagementError error; - - /** - * Get the name property: Operation identifier. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Operation identifier. - * - * @param name the name value to set. - * @return the VideoAnalyzerOperationStatusInner object itself. - */ - public VideoAnalyzerOperationStatusInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the id property: Operation resource ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Operation resource ID. - * - * @param id the id value to set. - * @return the VideoAnalyzerOperationStatusInner object itself. - */ - public VideoAnalyzerOperationStatusInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the startTime property: Operation start time. - * - * @return the startTime value. - */ - public String startTime() { - return this.startTime; - } - - /** - * Set the startTime property: Operation start time. - * - * @param startTime the startTime value to set. - * @return the VideoAnalyzerOperationStatusInner object itself. - */ - public VideoAnalyzerOperationStatusInner withStartTime(String startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: Operation end time. - * - * @return the endTime value. - */ - public String endTime() { - return this.endTime; - } - - /** - * Set the endTime property: Operation end time. - * - * @param endTime the endTime value to set. - * @return the VideoAnalyzerOperationStatusInner object itself. - */ - public VideoAnalyzerOperationStatusInner withEndTime(String endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the status property: Operation status. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Set the status property: Operation status. - * - * @param status the status value to set. - * @return the VideoAnalyzerOperationStatusInner object itself. - */ - public VideoAnalyzerOperationStatusInner withStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the error property: The error detail. - * - * @return the error value. - */ - public ManagementError error() { - return this.error; - } - - /** - * Set the error property: The error detail. - * - * @param error the error value to set. - * @return the VideoAnalyzerOperationStatusInner object itself. - */ - public VideoAnalyzerOperationStatusInner withError(ManagementError error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property name in model VideoAnalyzerOperationStatusInner")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VideoAnalyzerOperationStatusInner.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerPrivateEndpointConnectionOperationStatusInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerPrivateEndpointConnectionOperationStatusInner.java deleted file mode 100644 index 8c85c014af21..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerPrivateEndpointConnectionOperationStatusInner.java +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Status of private endpoint connection operation. */ -@Fluent -public final class VideoAnalyzerPrivateEndpointConnectionOperationStatusInner { - /* - * Operation identifier. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * Operation resource ID. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Operation start time. - */ - @JsonProperty(value = "startTime") - private String startTime; - - /* - * Operation end time. - */ - @JsonProperty(value = "endTime") - private String endTime; - - /* - * Operation status. - */ - @JsonProperty(value = "status") - private String status; - - /* - * The error detail. - */ - @JsonProperty(value = "error") - private ManagementError error; - - /** - * Get the name property: Operation identifier. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Operation identifier. - * - * @param name the name value to set. - * @return the VideoAnalyzerPrivateEndpointConnectionOperationStatusInner object itself. - */ - public VideoAnalyzerPrivateEndpointConnectionOperationStatusInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the id property: Operation resource ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Operation resource ID. - * - * @param id the id value to set. - * @return the VideoAnalyzerPrivateEndpointConnectionOperationStatusInner object itself. - */ - public VideoAnalyzerPrivateEndpointConnectionOperationStatusInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the startTime property: Operation start time. - * - * @return the startTime value. - */ - public String startTime() { - return this.startTime; - } - - /** - * Set the startTime property: Operation start time. - * - * @param startTime the startTime value to set. - * @return the VideoAnalyzerPrivateEndpointConnectionOperationStatusInner object itself. - */ - public VideoAnalyzerPrivateEndpointConnectionOperationStatusInner withStartTime(String startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: Operation end time. - * - * @return the endTime value. - */ - public String endTime() { - return this.endTime; - } - - /** - * Set the endTime property: Operation end time. - * - * @param endTime the endTime value to set. - * @return the VideoAnalyzerPrivateEndpointConnectionOperationStatusInner object itself. - */ - public VideoAnalyzerPrivateEndpointConnectionOperationStatusInner withEndTime(String endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the status property: Operation status. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Set the status property: Operation status. - * - * @param status the status value to set. - * @return the VideoAnalyzerPrivateEndpointConnectionOperationStatusInner object itself. - */ - public VideoAnalyzerPrivateEndpointConnectionOperationStatusInner withStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the error property: The error detail. - * - * @return the error value. - */ - public ManagementError error() { - return this.error; - } - - /** - * Set the error property: The error detail. - * - * @param error the error value to set. - * @return the VideoAnalyzerPrivateEndpointConnectionOperationStatusInner object itself. - */ - public VideoAnalyzerPrivateEndpointConnectionOperationStatusInner withError(ManagementError error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException("Missing required property name in model" - + " VideoAnalyzerPrivateEndpointConnectionOperationStatusInner")); - } - } - - private static final ClientLogger LOGGER - = new ClientLogger(VideoAnalyzerPrivateEndpointConnectionOperationStatusInner.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerProperties.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerProperties.java deleted file mode 100644 index a214e47a90b2..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerProperties.java +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.videoanalyzer.models.AccountEncryption; -import com.azure.resourcemanager.videoanalyzer.models.Endpoint; -import com.azure.resourcemanager.videoanalyzer.models.IotHub; -import com.azure.resourcemanager.videoanalyzer.models.NetworkAccessControl; -import com.azure.resourcemanager.videoanalyzer.models.ProvisioningState; -import com.azure.resourcemanager.videoanalyzer.models.PublicNetworkAccess; -import com.azure.resourcemanager.videoanalyzer.models.StorageAccount; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The properties of the Video Analyzer account. */ -@Fluent -public final class VideoAnalyzerProperties { - /* - * The storage accounts for this resource. - */ - @JsonProperty(value = "storageAccounts", required = true) - private List storageAccounts; - - /* - * The endpoints associated with this resource. - */ - @JsonProperty(value = "endpoints", access = JsonProperty.Access.WRITE_ONLY) - private List endpoints; - - /* - * The account encryption properties. - */ - @JsonProperty(value = "encryption") - private AccountEncryption encryption; - - /* - * The IoT Hubs for this resource. - */ - @JsonProperty(value = "iotHubs") - private List iotHubs; - - /* - * Whether or not public network access is allowed for resources under the - * Video Analyzer account. - */ - @JsonProperty(value = "publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; - - /* - * Network access control for Video Analyzer. - */ - @JsonProperty(value = "networkAccessControl") - private NetworkAccessControl networkAccessControl; - - /* - * Provisioning state of the Video Analyzer account. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * Private Endpoint Connections created under Video Analyzer account. - */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) - private List privateEndpointConnections; - - /** - * Get the storageAccounts property: The storage accounts for this resource. - * - * @return the storageAccounts value. - */ - public List storageAccounts() { - return this.storageAccounts; - } - - /** - * Set the storageAccounts property: The storage accounts for this resource. - * - * @param storageAccounts the storageAccounts value to set. - * @return the VideoAnalyzerProperties object itself. - */ - public VideoAnalyzerProperties withStorageAccounts(List storageAccounts) { - this.storageAccounts = storageAccounts; - return this; - } - - /** - * Get the endpoints property: The endpoints associated with this resource. - * - * @return the endpoints value. - */ - public List endpoints() { - return this.endpoints; - } - - /** - * Get the encryption property: The account encryption properties. - * - * @return the encryption value. - */ - public AccountEncryption encryption() { - return this.encryption; - } - - /** - * Set the encryption property: The account encryption properties. - * - * @param encryption the encryption value to set. - * @return the VideoAnalyzerProperties object itself. - */ - public VideoAnalyzerProperties withEncryption(AccountEncryption encryption) { - this.encryption = encryption; - return this; - } - - /** - * Get the iotHubs property: The IoT Hubs for this resource. - * - * @return the iotHubs value. - */ - public List iotHubs() { - return this.iotHubs; - } - - /** - * Set the iotHubs property: The IoT Hubs for this resource. - * - * @param iotHubs the iotHubs value to set. - * @return the VideoAnalyzerProperties object itself. - */ - public VideoAnalyzerProperties withIotHubs(List iotHubs) { - this.iotHubs = iotHubs; - return this; - } - - /** - * Get the publicNetworkAccess property: Whether or not public network access is allowed for resources under the - * Video Analyzer account. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Whether or not public network access is allowed for resources under the - * Video Analyzer account. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the VideoAnalyzerProperties object itself. - */ - public VideoAnalyzerProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the networkAccessControl property: Network access control for Video Analyzer. - * - * @return the networkAccessControl value. - */ - public NetworkAccessControl networkAccessControl() { - return this.networkAccessControl; - } - - /** - * Set the networkAccessControl property: Network access control for Video Analyzer. - * - * @param networkAccessControl the networkAccessControl value to set. - * @return the VideoAnalyzerProperties object itself. - */ - public VideoAnalyzerProperties withNetworkAccessControl(NetworkAccessControl networkAccessControl) { - this.networkAccessControl = networkAccessControl; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the Video Analyzer account. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the privateEndpointConnections property: Private Endpoint Connections created under Video Analyzer account. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storageAccounts() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property storageAccounts in model VideoAnalyzerProperties")); - } else { - storageAccounts().forEach(e -> e.validate()); - } - if (endpoints() != null) { - endpoints().forEach(e -> e.validate()); - } - if (encryption() != null) { - encryption().validate(); - } - if (iotHubs() != null) { - iotHubs().forEach(e -> e.validate()); - } - if (networkAccessControl() != null) { - networkAccessControl().validate(); - } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VideoAnalyzerProperties.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerPropertiesUpdate.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerPropertiesUpdate.java deleted file mode 100644 index b1269f923941..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerPropertiesUpdate.java +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.videoanalyzer.models.AccountEncryption; -import com.azure.resourcemanager.videoanalyzer.models.Endpoint; -import com.azure.resourcemanager.videoanalyzer.models.IotHub; -import com.azure.resourcemanager.videoanalyzer.models.NetworkAccessControl; -import com.azure.resourcemanager.videoanalyzer.models.ProvisioningState; -import com.azure.resourcemanager.videoanalyzer.models.PublicNetworkAccess; -import com.azure.resourcemanager.videoanalyzer.models.StorageAccount; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The properties of the Video Analyzer account. */ -@Fluent -public final class VideoAnalyzerPropertiesUpdate { - /* - * The storage accounts for this resource. - */ - @JsonProperty(value = "storageAccounts") - private List storageAccounts; - - /* - * The endpoints associated with this resource. - */ - @JsonProperty(value = "endpoints", access = JsonProperty.Access.WRITE_ONLY) - private List endpoints; - - /* - * The account encryption properties. - */ - @JsonProperty(value = "encryption") - private AccountEncryption encryption; - - /* - * The IoT Hubs for this resource. - */ - @JsonProperty(value = "iotHubs") - private List iotHubs; - - /* - * Whether or not public network access is allowed for resources under the - * Video Analyzer account. - */ - @JsonProperty(value = "publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; - - /* - * Network access control for Video Analyzer. - */ - @JsonProperty(value = "networkAccessControl") - private NetworkAccessControl networkAccessControl; - - /* - * Provisioning state of the Video Analyzer account. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * Private Endpoint Connections created under Video Analyzer account. - */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) - private List privateEndpointConnections; - - /** - * Get the storageAccounts property: The storage accounts for this resource. - * - * @return the storageAccounts value. - */ - public List storageAccounts() { - return this.storageAccounts; - } - - /** - * Set the storageAccounts property: The storage accounts for this resource. - * - * @param storageAccounts the storageAccounts value to set. - * @return the VideoAnalyzerPropertiesUpdate object itself. - */ - public VideoAnalyzerPropertiesUpdate withStorageAccounts(List storageAccounts) { - this.storageAccounts = storageAccounts; - return this; - } - - /** - * Get the endpoints property: The endpoints associated with this resource. - * - * @return the endpoints value. - */ - public List endpoints() { - return this.endpoints; - } - - /** - * Get the encryption property: The account encryption properties. - * - * @return the encryption value. - */ - public AccountEncryption encryption() { - return this.encryption; - } - - /** - * Set the encryption property: The account encryption properties. - * - * @param encryption the encryption value to set. - * @return the VideoAnalyzerPropertiesUpdate object itself. - */ - public VideoAnalyzerPropertiesUpdate withEncryption(AccountEncryption encryption) { - this.encryption = encryption; - return this; - } - - /** - * Get the iotHubs property: The IoT Hubs for this resource. - * - * @return the iotHubs value. - */ - public List iotHubs() { - return this.iotHubs; - } - - /** - * Set the iotHubs property: The IoT Hubs for this resource. - * - * @param iotHubs the iotHubs value to set. - * @return the VideoAnalyzerPropertiesUpdate object itself. - */ - public VideoAnalyzerPropertiesUpdate withIotHubs(List iotHubs) { - this.iotHubs = iotHubs; - return this; - } - - /** - * Get the publicNetworkAccess property: Whether or not public network access is allowed for resources under the - * Video Analyzer account. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Whether or not public network access is allowed for resources under the - * Video Analyzer account. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the VideoAnalyzerPropertiesUpdate object itself. - */ - public VideoAnalyzerPropertiesUpdate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the networkAccessControl property: Network access control for Video Analyzer. - * - * @return the networkAccessControl value. - */ - public NetworkAccessControl networkAccessControl() { - return this.networkAccessControl; - } - - /** - * Set the networkAccessControl property: Network access control for Video Analyzer. - * - * @param networkAccessControl the networkAccessControl value to set. - * @return the VideoAnalyzerPropertiesUpdate object itself. - */ - public VideoAnalyzerPropertiesUpdate withNetworkAccessControl(NetworkAccessControl networkAccessControl) { - this.networkAccessControl = networkAccessControl; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the Video Analyzer account. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the privateEndpointConnections property: Private Endpoint Connections created under Video Analyzer account. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storageAccounts() != null) { - storageAccounts().forEach(e -> e.validate()); - } - if (endpoints() != null) { - endpoints().forEach(e -> e.validate()); - } - if (encryption() != null) { - encryption().validate(); - } - if (iotHubs() != null) { - iotHubs().forEach(e -> e.validate()); - } - if (networkAccessControl() != null) { - networkAccessControl().validate(); - } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoContentTokenInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoContentTokenInner.java deleted file mode 100644 index a2a6b913b59e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoContentTokenInner.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** "Video content token grants access to the video content URLs.". */ -@Immutable -public final class VideoContentTokenInner { - /* - * The content token expiration date in ISO8601 format (eg. - * 2021-01-01T00:00:00Z). - */ - @JsonProperty(value = "expirationDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime expirationDate; - - /* - * The content token value to be added to the video content URL as the - * value for the "token" query string parameter. The token is specific to a - * single video. - */ - @JsonProperty(value = "token", access = JsonProperty.Access.WRITE_ONLY) - private String token; - - /** - * Get the expirationDate property: The content token expiration date in ISO8601 format (eg. 2021-01-01T00:00:00Z). - * - * @return the expirationDate value. - */ - public OffsetDateTime expirationDate() { - return this.expirationDate; - } - - /** - * Get the token property: The content token value to be added to the video content URL as the value for the "token" - * query string parameter. The token is specific to a single video. - * - * @return the token value. - */ - public String token() { - return this.token; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoEntityInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoEntityInner.java deleted file mode 100644 index 7b5efadff41f..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoEntityInner.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.videoanalyzer.models.VideoArchival; -import com.azure.resourcemanager.videoanalyzer.models.VideoContentUrls; -import com.azure.resourcemanager.videoanalyzer.models.VideoFlags; -import com.azure.resourcemanager.videoanalyzer.models.VideoMediaInfo; -import com.azure.resourcemanager.videoanalyzer.models.VideoType; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Represents a video resource within Azure Video Analyzer. Videos can be ingested from RTSP cameras through live - * pipelines or can be created by exporting sequences from existing captured video through a pipeline job. Videos - * ingested through live pipelines can be streamed through Azure Video Analyzer Player Widget or compatible players. - * Exported videos can be downloaded as MP4 files. - */ -@Fluent -public final class VideoEntityInner extends ProxyResource { - /* - * The resource properties. - */ - @JsonProperty(value = "properties") - private VideoProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: The resource properties. - * - * @return the innerProperties value. - */ - private VideoProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the title property: Optional video title provided by the user. Value can be up to 256 characters long. - * - * @return the title value. - */ - public String title() { - return this.innerProperties() == null ? null : this.innerProperties().title(); - } - - /** - * Set the title property: Optional video title provided by the user. Value can be up to 256 characters long. - * - * @param title the title value to set. - * @return the VideoEntityInner object itself. - */ - public VideoEntityInner withTitle(String title) { - if (this.innerProperties() == null) { - this.innerProperties = new VideoProperties(); - } - this.innerProperties().withTitle(title); - return this; - } - - /** - * Get the description property: Optional video description provided by the user. Value can be up to 2048 characters - * long. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: Optional video description provided by the user. Value can be up to 2048 characters - * long. - * - * @param description the description value to set. - * @return the VideoEntityInner object itself. - */ - public VideoEntityInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new VideoProperties(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the type property: Video content type. Different content types are suitable for different applications and - * scenarios. - * - * @return the type value. - */ - public VideoType typePropertiesType() { - return this.innerProperties() == null ? null : this.innerProperties().type(); - } - - /** - * Get the flags property: Video flags contain information about the available video actions and its dynamic - * properties based on the current video state. - * - * @return the flags value. - */ - public VideoFlags flags() { - return this.innerProperties() == null ? null : this.innerProperties().flags(); - } - - /** - * Get the contentUrls property: Set of URLs to the video content. - * - * @return the contentUrls value. - */ - public VideoContentUrls contentUrls() { - return this.innerProperties() == null ? null : this.innerProperties().contentUrls(); - } - - /** - * Get the mediaInfo property: Contains information about the video and audio content. - * - * @return the mediaInfo value. - */ - public VideoMediaInfo mediaInfo() { - return this.innerProperties() == null ? null : this.innerProperties().mediaInfo(); - } - - /** - * Set the mediaInfo property: Contains information about the video and audio content. - * - * @param mediaInfo the mediaInfo value to set. - * @return the VideoEntityInner object itself. - */ - public VideoEntityInner withMediaInfo(VideoMediaInfo mediaInfo) { - if (this.innerProperties() == null) { - this.innerProperties = new VideoProperties(); - } - this.innerProperties().withMediaInfo(mediaInfo); - return this; - } - - /** - * Get the archival property: Video archival properties. - * - * @return the archival value. - */ - public VideoArchival archival() { - return this.innerProperties() == null ? null : this.innerProperties().archival(); - } - - /** - * Set the archival property: Video archival properties. - * - * @param archival the archival value to set. - * @return the VideoEntityInner object itself. - */ - public VideoEntityInner withArchival(VideoArchival archival) { - if (this.innerProperties() == null) { - this.innerProperties = new VideoProperties(); - } - this.innerProperties().withArchival(archival); - 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoProperties.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoProperties.java deleted file mode 100644 index 6213c9010f51..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoProperties.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.videoanalyzer.models.VideoArchival; -import com.azure.resourcemanager.videoanalyzer.models.VideoContentUrls; -import com.azure.resourcemanager.videoanalyzer.models.VideoFlags; -import com.azure.resourcemanager.videoanalyzer.models.VideoMediaInfo; -import com.azure.resourcemanager.videoanalyzer.models.VideoType; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Application level properties for the video resource. */ -@Fluent -public final class VideoProperties { - /* - * Optional video title provided by the user. Value can be up to 256 - * characters long. - */ - @JsonProperty(value = "title") - private String title; - - /* - * Optional video description provided by the user. Value can be up to 2048 - * characters long. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Video content type. Different content types are suitable for different - * applications and scenarios. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private VideoType type; - - /* - * Video flags contain information about the available video actions and - * its dynamic properties based on the current video state. - */ - @JsonProperty(value = "flags", access = JsonProperty.Access.WRITE_ONLY) - private VideoFlags flags; - - /* - * Set of URLs to the video content. - */ - @JsonProperty(value = "contentUrls", access = JsonProperty.Access.WRITE_ONLY) - private VideoContentUrls contentUrls; - - /* - * Contains information about the video and audio content. - */ - @JsonProperty(value = "mediaInfo") - private VideoMediaInfo mediaInfo; - - /* - * Video archival properties. - */ - @JsonProperty(value = "archival") - private VideoArchival archival; - - /** - * Get the title property: Optional video title provided by the user. Value can be up to 256 characters long. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: Optional video title provided by the user. Value can be up to 256 characters long. - * - * @param title the title value to set. - * @return the VideoProperties object itself. - */ - public VideoProperties withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description property: Optional video description provided by the user. Value can be up to 2048 characters - * long. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Optional video description provided by the user. Value can be up to 2048 characters - * long. - * - * @param description the description value to set. - * @return the VideoProperties object itself. - */ - public VideoProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the type property: Video content type. Different content types are suitable for different applications and - * scenarios. - * - * @return the type value. - */ - public VideoType type() { - return this.type; - } - - /** - * Get the flags property: Video flags contain information about the available video actions and its dynamic - * properties based on the current video state. - * - * @return the flags value. - */ - public VideoFlags flags() { - return this.flags; - } - - /** - * Get the contentUrls property: Set of URLs to the video content. - * - * @return the contentUrls value. - */ - public VideoContentUrls contentUrls() { - return this.contentUrls; - } - - /** - * Get the mediaInfo property: Contains information about the video and audio content. - * - * @return the mediaInfo value. - */ - public VideoMediaInfo mediaInfo() { - return this.mediaInfo; - } - - /** - * Set the mediaInfo property: Contains information about the video and audio content. - * - * @param mediaInfo the mediaInfo value to set. - * @return the VideoProperties object itself. - */ - public VideoProperties withMediaInfo(VideoMediaInfo mediaInfo) { - this.mediaInfo = mediaInfo; - return this; - } - - /** - * Get the archival property: Video archival properties. - * - * @return the archival value. - */ - public VideoArchival archival() { - return this.archival; - } - - /** - * Set the archival property: Video archival properties. - * - * @param archival the archival value to set. - * @return the VideoProperties object itself. - */ - public VideoProperties withArchival(VideoArchival archival) { - this.archival = archival; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (flags() != null) { - flags().validate(); - } - if (contentUrls() != null) { - contentUrls().validate(); - } - if (mediaInfo() != null) { - mediaInfo().validate(); - } - if (archival() != null) { - archival().validate(); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/package-info.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/package-info.java deleted file mode 100644 index e085f7641738..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the inner data models for VideoAnalyzerManagementClient. Azure Video Analyzer provides a platform - * for you to build intelligent video applications that span the edge and the cloud. - */ -package com.azure.resourcemanager.videoanalyzer.fluent.models; diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/package-info.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/package-info.java deleted file mode 100644 index 225ecfa98e44..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the service clients for VideoAnalyzerManagementClient. Azure Video Analyzer provides a platform - * for you to build intelligent video applications that span the edge and the cloud. - */ -package com.azure.resourcemanager.videoanalyzer.fluent; diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPoliciesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPoliciesClientImpl.java deleted file mode 100644 index 8f0057161646..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPoliciesClientImpl.java +++ /dev/null @@ -1,925 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.videoanalyzer.fluent.AccessPoliciesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.AccessPolicyEntityInner; -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicyEntityCollection; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in AccessPoliciesClient. */ -public final class AccessPoliciesClientImpl implements AccessPoliciesClient { - /** The proxy service used to perform REST calls. */ - private final AccessPoliciesService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of AccessPoliciesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AccessPoliciesClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service - = RestProxy.create(AccessPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientAccessPolicies to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface AccessPoliciesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/accessPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("accessPolicyName") String accessPolicyName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("accessPolicyName") String accessPolicyName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AccessPolicyEntityInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("accessPolicyName") String accessPolicyName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/accessPolicies/{accessPolicyName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("accessPolicyName") String accessPolicyName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AccessPolicyEntityInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Retrieves all existing access policy resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccessPolicyEntity items along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String accountName, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), top, 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())); - } - - /** - * Retrieves all existing access policy resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccessPolicyEntity items along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String accountName, Integer top, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), top, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Retrieves all existing access policy resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccessPolicyEntity items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Retrieves all existing access policy resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccessPolicyEntity items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName) { - final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Retrieves all existing access policy resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccessPolicyEntity items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, Integer top, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, top, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Retrieves all existing access policy resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccessPolicyEntity items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName) { - final Integer top = null; - return new PagedIterable<>(listAsync(resourceGroupName, accountName, top)); - } - - /** - * Retrieves all existing access policy resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccessPolicyEntity items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, Integer top, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, top, context)); - } - - /** - * Retrieves an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String accessPolicyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (accessPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, accessPolicyName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieves an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String accessPolicyName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (accessPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - accessPolicyName, this.client.getApiVersion(), accept, context); - } - - /** - * Retrieves an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, - String accessPolicyName) { - return getWithResponseAsync(resourceGroupName, accountName, accessPolicyName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Retrieves an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AccessPolicyEntityInner get(String resourceGroupName, String accountName, String accessPolicyName) { - return getAsync(resourceGroupName, accountName, accessPolicyName).block(); - } - - /** - * Retrieves an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources - * along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, - String accessPolicyName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, accessPolicyName, context).block(); - } - - /** - * Creates a new access policy resource or updates an existing one with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String accessPolicyName, AccessPolicyEntityInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (accessPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessPolicyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, accessPolicyName, this.client.getApiVersion(), parameters, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a new access policy resource or updates an existing one with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String accessPolicyName, AccessPolicyEntityInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (accessPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessPolicyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, accessPolicyName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Creates a new access policy resource or updates an existing one with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, - String accessPolicyName, AccessPolicyEntityInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, accessPolicyName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates a new access policy resource or updates an existing one with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AccessPolicyEntityInner createOrUpdate(String resourceGroupName, String accountName, String accessPolicyName, - AccessPolicyEntityInner parameters) { - return createOrUpdateAsync(resourceGroupName, accountName, accessPolicyName, parameters).block(); - } - - /** - * Creates a new access policy resource or updates an existing one with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources - * along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String accountName, - String accessPolicyName, AccessPolicyEntityInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, accessPolicyName, parameters, context) - .block(); - } - - /** - * Deletes an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String accessPolicyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (accessPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, accessPolicyName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String accessPolicyName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (accessPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessPolicyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, accessPolicyName, this.client.getApiVersion(), accept, context); - } - - /** - * Deletes an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String accessPolicyName) { - return deleteWithResponseAsync(resourceGroupName, accountName, accessPolicyName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String accessPolicyName) { - deleteAsync(resourceGroupName, accountName, accessPolicyName).block(); - } - - /** - * Deletes an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String accountName, String accessPolicyName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, accountName, accessPolicyName, context).block(); - } - - /** - * Updates individual properties of an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String accountName, String accessPolicyName, AccessPolicyEntityInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (accessPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessPolicyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, accessPolicyName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates individual properties of an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String accountName, String accessPolicyName, AccessPolicyEntityInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (accessPolicyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter accessPolicyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, accessPolicyName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Updates individual properties of an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, - String accessPolicyName, AccessPolicyEntityInner parameters) { - return updateWithResponseAsync(resourceGroupName, accountName, accessPolicyName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Updates individual properties of an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AccessPolicyEntityInner update(String resourceGroupName, String accountName, String accessPolicyName, - AccessPolicyEntityInner parameters) { - return updateAsync(resourceGroupName, accountName, accessPolicyName, parameters).block(); - } - - /** - * Updates individual properties of an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources - * along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String accountName, - String accessPolicyName, AccessPolicyEntityInner parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, accountName, accessPolicyName, parameters, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccessPolicyEntity items along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccessPolicyEntity items along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPoliciesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPoliciesImpl.java deleted file mode 100644 index 3e4ddfd13765..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPoliciesImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.AccessPoliciesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.AccessPolicyEntityInner; -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicies; -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicyEntity; - -public final class AccessPoliciesImpl implements AccessPolicies { - private static final ClientLogger LOGGER = new ClientLogger(AccessPoliciesImpl.class); - - private final AccessPoliciesClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public AccessPoliciesImpl(AccessPoliciesClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new AccessPolicyEntityImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, Integer top, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, accountName, top, context); - return Utils.mapPage(inner, inner1 -> new AccessPolicyEntityImpl(inner1, this.manager())); - } - - public AccessPolicyEntity get(String resourceGroupName, String accountName, String accessPolicyName) { - AccessPolicyEntityInner inner = this.serviceClient().get(resourceGroupName, accountName, accessPolicyName); - if (inner != null) { - return new AccessPolicyEntityImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String accountName, - String accessPolicyName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, accessPolicyName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new AccessPolicyEntityImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String accessPolicyName) { - this.serviceClient().delete(resourceGroupName, accountName, accessPolicyName); - } - - public Response deleteWithResponse(String resourceGroupName, String accountName, String accessPolicyName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, accessPolicyName, context); - } - - public AccessPolicyEntity 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String accessPolicyName = Utils.getValueFromIdByName(id, "accessPolicies"); - if (accessPolicyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accessPolicies'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, accessPolicyName, 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String accessPolicyName = Utils.getValueFromIdByName(id, "accessPolicies"); - if (accessPolicyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accessPolicies'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, accessPolicyName, 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String accessPolicyName = Utils.getValueFromIdByName(id, "accessPolicies"); - if (accessPolicyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accessPolicies'.", id))); - } - this.deleteWithResponse(resourceGroupName, accountName, accessPolicyName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String accessPolicyName = Utils.getValueFromIdByName(id, "accessPolicies"); - if (accessPolicyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'accessPolicies'.", id))); - } - return this.deleteWithResponse(resourceGroupName, accountName, accessPolicyName, context); - } - - private AccessPoliciesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } - - public AccessPolicyEntityImpl define(String name) { - return new AccessPolicyEntityImpl(name, this.manager()); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPolicyEntityImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPolicyEntityImpl.java deleted file mode 100644 index 7ece773d6b4a..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPolicyEntityImpl.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.AccessPolicyEntityInner; -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicyEntity; -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicyRole; -import com.azure.resourcemanager.videoanalyzer.models.AuthenticationBase; - -public final class AccessPolicyEntityImpl - implements AccessPolicyEntity, AccessPolicyEntity.Definition, AccessPolicyEntity.Update { - private AccessPolicyEntityInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public AccessPolicyRole role() { - return this.innerModel().role(); - } - - public AuthenticationBase authentication() { - return this.innerModel().authentication(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public AccessPolicyEntityInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String accessPolicyName; - - public AccessPolicyEntityImpl withExistingVideoAnalyzer(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public AccessPolicyEntity create() { - this.innerObject = serviceManager.serviceClient() - .getAccessPolicies() - .createOrUpdateWithResponse(resourceGroupName, accountName, accessPolicyName, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public AccessPolicyEntity create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getAccessPolicies() - .createOrUpdateWithResponse(resourceGroupName, accountName, accessPolicyName, this.innerModel(), context) - .getValue(); - return this; - } - - AccessPolicyEntityImpl(String name, com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = new AccessPolicyEntityInner(); - this.serviceManager = serviceManager; - this.accessPolicyName = name; - } - - public AccessPolicyEntityImpl update() { - return this; - } - - public AccessPolicyEntity apply() { - this.innerObject = serviceManager.serviceClient() - .getAccessPolicies() - .updateWithResponse(resourceGroupName, accountName, accessPolicyName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public AccessPolicyEntity apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getAccessPolicies() - .updateWithResponse(resourceGroupName, accountName, accessPolicyName, this.innerModel(), context) - .getValue(); - return this; - } - - AccessPolicyEntityImpl(AccessPolicyEntityInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "videoAnalyzers"); - this.accessPolicyName = Utils.getValueFromIdByName(innerObject.id(), "accessPolicies"); - } - - public AccessPolicyEntity refresh() { - this.innerObject = serviceManager.serviceClient() - .getAccessPolicies() - .getWithResponse(resourceGroupName, accountName, accessPolicyName, Context.NONE) - .getValue(); - return this; - } - - public AccessPolicyEntity refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getAccessPolicies() - .getWithResponse(resourceGroupName, accountName, accessPolicyName, context) - .getValue(); - return this; - } - - public AccessPolicyEntityImpl withRole(AccessPolicyRole role) { - this.innerModel().withRole(role); - return this; - } - - public AccessPolicyEntityImpl withAuthentication(AuthenticationBase authentication) { - this.innerModel().withAuthentication(authentication); - return this; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/CheckNameAvailabilityResponseImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/CheckNameAvailabilityResponseImpl.java deleted file mode 100644 index e1b6a94430c4..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/CheckNameAvailabilityResponseImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.resourcemanager.videoanalyzer.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.videoanalyzer.models.CheckNameAvailabilityReason; -import com.azure.resourcemanager.videoanalyzer.models.CheckNameAvailabilityResponse; - -public final class CheckNameAvailabilityResponseImpl implements CheckNameAvailabilityResponse { - private CheckNameAvailabilityResponseInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - CheckNameAvailabilityResponseImpl(CheckNameAvailabilityResponseInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Boolean nameAvailable() { - return this.innerModel().nameAvailable(); - } - - public CheckNameAvailabilityReason reason() { - return this.innerModel().reason(); - } - - public String message() { - return this.innerModel().message(); - } - - public CheckNameAvailabilityResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModuleEntityImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModuleEntityImpl.java deleted file mode 100644 index e7c9ed4a1c74..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModuleEntityImpl.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.EdgeModuleEntityInner; -import com.azure.resourcemanager.videoanalyzer.models.EdgeModuleEntity; -import com.azure.resourcemanager.videoanalyzer.models.EdgeModuleProvisioningToken; -import com.azure.resourcemanager.videoanalyzer.models.ListProvisioningTokenInput; -import java.util.UUID; - -public final class EdgeModuleEntityImpl - implements EdgeModuleEntity, EdgeModuleEntity.Definition, EdgeModuleEntity.Update { - private EdgeModuleEntityInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public UUID edgeModuleId() { - return this.innerModel().edgeModuleId(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public EdgeModuleEntityInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String edgeModuleName; - - public EdgeModuleEntityImpl withExistingVideoAnalyzer(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public EdgeModuleEntity create() { - this.innerObject = serviceManager.serviceClient() - .getEdgeModules() - .createOrUpdateWithResponse(resourceGroupName, accountName, edgeModuleName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public EdgeModuleEntity create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeModules() - .createOrUpdateWithResponse(resourceGroupName, accountName, edgeModuleName, this.innerModel(), context) - .getValue(); - return this; - } - - EdgeModuleEntityImpl(String name, com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = new EdgeModuleEntityInner(); - this.serviceManager = serviceManager; - this.edgeModuleName = name; - } - - public EdgeModuleEntityImpl update() { - return this; - } - - public EdgeModuleEntity apply() { - this.innerObject = serviceManager.serviceClient() - .getEdgeModules() - .createOrUpdateWithResponse(resourceGroupName, accountName, edgeModuleName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public EdgeModuleEntity apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeModules() - .createOrUpdateWithResponse(resourceGroupName, accountName, edgeModuleName, this.innerModel(), context) - .getValue(); - return this; - } - - EdgeModuleEntityImpl(EdgeModuleEntityInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "videoAnalyzers"); - this.edgeModuleName = Utils.getValueFromIdByName(innerObject.id(), "edgeModules"); - } - - public EdgeModuleEntity refresh() { - this.innerObject = serviceManager.serviceClient() - .getEdgeModules() - .getWithResponse(resourceGroupName, accountName, edgeModuleName, Context.NONE) - .getValue(); - return this; - } - - public EdgeModuleEntity refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getEdgeModules() - .getWithResponse(resourceGroupName, accountName, edgeModuleName, context) - .getValue(); - return this; - } - - public EdgeModuleProvisioningToken listProvisioningToken(ListProvisioningTokenInput parameters) { - return serviceManager.edgeModules() - .listProvisioningToken(resourceGroupName, accountName, edgeModuleName, parameters); - } - - public Response - listProvisioningTokenWithResponse(ListProvisioningTokenInput parameters, Context context) { - return serviceManager.edgeModules() - .listProvisioningTokenWithResponse(resourceGroupName, accountName, edgeModuleName, parameters, context); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModuleProvisioningTokenImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModuleProvisioningTokenImpl.java deleted file mode 100644 index 3aede9f95ddb..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModuleProvisioningTokenImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.resourcemanager.videoanalyzer.fluent.models.EdgeModuleProvisioningTokenInner; -import com.azure.resourcemanager.videoanalyzer.models.EdgeModuleProvisioningToken; -import java.time.OffsetDateTime; - -public final class EdgeModuleProvisioningTokenImpl implements EdgeModuleProvisioningToken { - private EdgeModuleProvisioningTokenInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - EdgeModuleProvisioningTokenImpl(EdgeModuleProvisioningTokenInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public OffsetDateTime expirationDate() { - return this.innerModel().expirationDate(); - } - - public String token() { - return this.innerModel().token(); - } - - public EdgeModuleProvisioningTokenInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModulesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModulesClientImpl.java deleted file mode 100644 index 08948c2a6c16..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModulesClientImpl.java +++ /dev/null @@ -1,971 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.videoanalyzer.fluent.EdgeModulesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.EdgeModuleEntityInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.EdgeModuleProvisioningTokenInner; -import com.azure.resourcemanager.videoanalyzer.models.EdgeModuleEntityCollection; -import com.azure.resourcemanager.videoanalyzer.models.ListProvisioningTokenInput; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in EdgeModulesClient. */ -public final class EdgeModulesClientImpl implements EdgeModulesClient { - /** The proxy service used to perform REST calls. */ - private final EdgeModulesService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of EdgeModulesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EdgeModulesClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service - = RestProxy.create(EdgeModulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientEdgeModules to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface EdgeModulesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/edgeModules") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("edgeModuleName") String edgeModuleName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("edgeModuleName") String edgeModuleName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EdgeModuleEntityInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("edgeModuleName") String edgeModuleName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/edgeModules/{edgeModuleName}/listProvisioningToken") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listProvisioningToken(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("edgeModuleName") String edgeModuleName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ListProvisioningTokenInput parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List all existing edge module resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of EdgeModuleEntity items along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String accountName, - Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), top, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all existing edge module resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of EdgeModuleEntity items along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String accountName, - Integer top, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), top, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List all existing edge module resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of EdgeModuleEntity items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List all existing edge module resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of EdgeModuleEntity items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName) { - final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List all existing edge module resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of EdgeModuleEntity items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, Integer top, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, top, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List all existing edge module resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of EdgeModuleEntity items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName) { - final Integer top = null; - return new PagedIterable<>(listAsync(resourceGroupName, accountName, top)); - } - - /** - * List all existing edge module resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of EdgeModuleEntity items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, Integer top, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, top, context)); - } - - /** - * Retrieves an existing edge module resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String edgeModuleName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (edgeModuleName == null) { - return Mono.error(new IllegalArgumentException("Parameter edgeModuleName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, edgeModuleName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieves an existing edge module resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String edgeModuleName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (edgeModuleName == null) { - return Mono.error(new IllegalArgumentException("Parameter edgeModuleName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - edgeModuleName, this.client.getApiVersion(), accept, context); - } - - /** - * Retrieves an existing edge module resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String edgeModuleName) { - return getWithResponseAsync(resourceGroupName, accountName, edgeModuleName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Retrieves an existing edge module resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeModuleEntityInner get(String resourceGroupName, String accountName, String edgeModuleName) { - return getAsync(resourceGroupName, accountName, edgeModuleName).block(); - } - - /** - * Retrieves an existing edge module resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, - String edgeModuleName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, edgeModuleName, context).block(); - } - - /** - * Creates a new edge module or updates an existing one. An edge module resource enables a single instance of an - * Azure Video Analyzer IoT edge module to interact with the Video Analyzer Account. This is used for authorization - * and also to make sure that the particular edge module instance only has access to the data it requires from the - * Azure Video Analyzer service. A new edge module resource should be created for every new instance of an Azure - * Video Analyzer edge module deployed to you Azure IoT edge environment. Edge module resources can be deleted if - * the specific module is not in use anymore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String edgeModuleName, EdgeModuleEntityInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (edgeModuleName == null) { - return Mono.error(new IllegalArgumentException("Parameter edgeModuleName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, edgeModuleName, this.client.getApiVersion(), parameters, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a new edge module or updates an existing one. An edge module resource enables a single instance of an - * Azure Video Analyzer IoT edge module to interact with the Video Analyzer Account. This is used for authorization - * and also to make sure that the particular edge module instance only has access to the data it requires from the - * Azure Video Analyzer service. A new edge module resource should be created for every new instance of an Azure - * Video Analyzer edge module deployed to you Azure IoT edge environment. Edge module resources can be deleted if - * the specific module is not in use anymore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String edgeModuleName, EdgeModuleEntityInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (edgeModuleName == null) { - return Mono.error(new IllegalArgumentException("Parameter edgeModuleName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, edgeModuleName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Creates a new edge module or updates an existing one. An edge module resource enables a single instance of an - * Azure Video Analyzer IoT edge module to interact with the Video Analyzer Account. This is used for authorization - * and also to make sure that the particular edge module instance only has access to the data it requires from the - * Azure Video Analyzer service. A new edge module resource should be created for every new instance of an Azure - * Video Analyzer edge module deployed to you Azure IoT edge environment. Edge module resources can be deleted if - * the specific module is not in use anymore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, - String edgeModuleName, EdgeModuleEntityInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, edgeModuleName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates a new edge module or updates an existing one. An edge module resource enables a single instance of an - * Azure Video Analyzer IoT edge module to interact with the Video Analyzer Account. This is used for authorization - * and also to make sure that the particular edge module instance only has access to the data it requires from the - * Azure Video Analyzer service. A new edge module resource should be created for every new instance of an Azure - * Video Analyzer edge module deployed to you Azure IoT edge environment. Edge module resources can be deleted if - * the specific module is not in use anymore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeModuleEntityInner createOrUpdate(String resourceGroupName, String accountName, String edgeModuleName, - EdgeModuleEntityInner parameters) { - return createOrUpdateAsync(resourceGroupName, accountName, edgeModuleName, parameters).block(); - } - - /** - * Creates a new edge module or updates an existing one. An edge module resource enables a single instance of an - * Azure Video Analyzer IoT edge module to interact with the Video Analyzer Account. This is used for authorization - * and also to make sure that the particular edge module instance only has access to the data it requires from the - * Azure Video Analyzer service. A new edge module resource should be created for every new instance of an Azure - * Video Analyzer edge module deployed to you Azure IoT edge environment. Edge module resources can be deleted if - * the specific module is not in use anymore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String accountName, - String edgeModuleName, EdgeModuleEntityInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, edgeModuleName, parameters, context) - .block(); - } - - /** - * Deletes an existing edge module resource. Deleting the edge module resource will prevent an Azure Video Analyzer - * IoT edge module which was previously initiated with the module provisioning token from communicating with the - * cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String edgeModuleName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (edgeModuleName == null) { - return Mono.error(new IllegalArgumentException("Parameter edgeModuleName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, edgeModuleName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes an existing edge module resource. Deleting the edge module resource will prevent an Azure Video Analyzer - * IoT edge module which was previously initiated with the module provisioning token from communicating with the - * cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String edgeModuleName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (edgeModuleName == null) { - return Mono.error(new IllegalArgumentException("Parameter edgeModuleName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, edgeModuleName, this.client.getApiVersion(), accept, context); - } - - /** - * Deletes an existing edge module resource. Deleting the edge module resource will prevent an Azure Video Analyzer - * IoT edge module which was previously initiated with the module provisioning token from communicating with the - * cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String edgeModuleName) { - return deleteWithResponseAsync(resourceGroupName, accountName, edgeModuleName).flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes an existing edge module resource. Deleting the edge module resource will prevent an Azure Video Analyzer - * IoT edge module which was previously initiated with the module provisioning token from communicating with the - * cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String edgeModuleName) { - deleteAsync(resourceGroupName, accountName, edgeModuleName).block(); - } - - /** - * Deletes an existing edge module resource. Deleting the edge module resource will prevent an Azure Video Analyzer - * IoT edge module which was previously initiated with the module provisioning token from communicating with the - * cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String accountName, String edgeModuleName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, accountName, edgeModuleName, context).block(); - } - - /** - * Creates a new provisioning token. A provisioning token allows for a single instance of Azure Video analyzer IoT - * edge module to be initialized and authorized to the cloud account. The provisioning token itself is short lived - * and it is only used for the initial handshake between IoT edge module and the cloud. After the initial handshake, - * the IoT edge module will agree on a set of authentication keys which will be auto-rotated as long as the module - * is able to periodically connect to the cloud. A new provisioning token can be generated for the same IoT edge - * module in case the module state lost or reset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provisioning token properties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listProvisioningTokenWithResponseAsync( - String resourceGroupName, String accountName, String edgeModuleName, ListProvisioningTokenInput 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (edgeModuleName == null) { - return Mono.error(new IllegalArgumentException("Parameter edgeModuleName 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.listProvisioningToken(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, accountName, edgeModuleName, - this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a new provisioning token. A provisioning token allows for a single instance of Azure Video analyzer IoT - * edge module to be initialized and authorized to the cloud account. The provisioning token itself is short lived - * and it is only used for the initial handshake between IoT edge module and the cloud. After the initial handshake, - * the IoT edge module will agree on a set of authentication keys which will be auto-rotated as long as the module - * is able to periodically connect to the cloud. A new provisioning token can be generated for the same IoT edge - * module in case the module state lost or reset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provisioning token properties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listProvisioningTokenWithResponseAsync( - String resourceGroupName, String accountName, String edgeModuleName, ListProvisioningTokenInput 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (edgeModuleName == null) { - return Mono.error(new IllegalArgumentException("Parameter edgeModuleName 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.listProvisioningToken(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, edgeModuleName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Creates a new provisioning token. A provisioning token allows for a single instance of Azure Video analyzer IoT - * edge module to be initialized and authorized to the cloud account. The provisioning token itself is short lived - * and it is only used for the initial handshake between IoT edge module and the cloud. After the initial handshake, - * the IoT edge module will agree on a set of authentication keys which will be auto-rotated as long as the module - * is able to periodically connect to the cloud. A new provisioning token can be generated for the same IoT edge - * module in case the module state lost or reset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provisioning token properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listProvisioningTokenAsync(String resourceGroupName, - String accountName, String edgeModuleName, ListProvisioningTokenInput parameters) { - return listProvisioningTokenWithResponseAsync(resourceGroupName, accountName, edgeModuleName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates a new provisioning token. A provisioning token allows for a single instance of Azure Video analyzer IoT - * edge module to be initialized and authorized to the cloud account. The provisioning token itself is short lived - * and it is only used for the initial handshake between IoT edge module and the cloud. After the initial handshake, - * the IoT edge module will agree on a set of authentication keys which will be auto-rotated as long as the module - * is able to periodically connect to the cloud. A new provisioning token can be generated for the same IoT edge - * module in case the module state lost or reset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provisioning token properties. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EdgeModuleProvisioningTokenInner listProvisioningToken(String resourceGroupName, String accountName, - String edgeModuleName, ListProvisioningTokenInput parameters) { - return listProvisioningTokenAsync(resourceGroupName, accountName, edgeModuleName, parameters).block(); - } - - /** - * Creates a new provisioning token. A provisioning token allows for a single instance of Azure Video analyzer IoT - * edge module to be initialized and authorized to the cloud account. The provisioning token itself is short lived - * and it is only used for the initial handshake between IoT edge module and the cloud. After the initial handshake, - * the IoT edge module will agree on a set of authentication keys which will be auto-rotated as long as the module - * is able to periodically connect to the cloud. A new provisioning token can be generated for the same IoT edge - * module in case the module state lost or reset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provisioning token properties along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listProvisioningTokenWithResponse(String resourceGroupName, - String accountName, String edgeModuleName, ListProvisioningTokenInput parameters, Context context) { - return listProvisioningTokenWithResponseAsync(resourceGroupName, accountName, edgeModuleName, parameters, - context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of EdgeModuleEntity items along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of EdgeModuleEntity items along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModulesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModulesImpl.java deleted file mode 100644 index 148ef0abca36..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModulesImpl.java +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.EdgeModulesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.EdgeModuleEntityInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.EdgeModuleProvisioningTokenInner; -import com.azure.resourcemanager.videoanalyzer.models.EdgeModuleEntity; -import com.azure.resourcemanager.videoanalyzer.models.EdgeModuleProvisioningToken; -import com.azure.resourcemanager.videoanalyzer.models.EdgeModules; -import com.azure.resourcemanager.videoanalyzer.models.ListProvisioningTokenInput; - -public final class EdgeModulesImpl implements EdgeModules { - private static final ClientLogger LOGGER = new ClientLogger(EdgeModulesImpl.class); - - private final EdgeModulesClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public EdgeModulesImpl(EdgeModulesClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new EdgeModuleEntityImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, Integer top, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, accountName, top, context); - return Utils.mapPage(inner, inner1 -> new EdgeModuleEntityImpl(inner1, this.manager())); - } - - public EdgeModuleEntity get(String resourceGroupName, String accountName, String edgeModuleName) { - EdgeModuleEntityInner inner = this.serviceClient().get(resourceGroupName, accountName, edgeModuleName); - if (inner != null) { - return new EdgeModuleEntityImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String accountName, - String edgeModuleName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, edgeModuleName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EdgeModuleEntityImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String edgeModuleName) { - this.serviceClient().delete(resourceGroupName, accountName, edgeModuleName); - } - - public Response deleteWithResponse(String resourceGroupName, String accountName, String edgeModuleName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, edgeModuleName, context); - } - - public EdgeModuleProvisioningToken listProvisioningToken(String resourceGroupName, String accountName, - String edgeModuleName, ListProvisioningTokenInput parameters) { - EdgeModuleProvisioningTokenInner inner - = this.serviceClient().listProvisioningToken(resourceGroupName, accountName, edgeModuleName, parameters); - if (inner != null) { - return new EdgeModuleProvisioningTokenImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listProvisioningTokenWithResponse(String resourceGroupName, - String accountName, String edgeModuleName, ListProvisioningTokenInput parameters, Context context) { - Response inner = this.serviceClient() - .listProvisioningTokenWithResponse(resourceGroupName, accountName, edgeModuleName, parameters, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EdgeModuleProvisioningTokenImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EdgeModuleEntity 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String edgeModuleName = Utils.getValueFromIdByName(id, "edgeModules"); - if (edgeModuleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeModules'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, edgeModuleName, 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String edgeModuleName = Utils.getValueFromIdByName(id, "edgeModules"); - if (edgeModuleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeModules'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, edgeModuleName, 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String edgeModuleName = Utils.getValueFromIdByName(id, "edgeModules"); - if (edgeModuleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeModules'.", id))); - } - this.deleteWithResponse(resourceGroupName, accountName, edgeModuleName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String edgeModuleName = Utils.getValueFromIdByName(id, "edgeModules"); - if (edgeModuleName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'edgeModules'.", id))); - } - return this.deleteWithResponse(resourceGroupName, accountName, edgeModuleName, context); - } - - private EdgeModulesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } - - public EdgeModuleEntityImpl define(String name) { - return new EdgeModuleEntityImpl(name, this.manager()); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineImpl.java deleted file mode 100644 index 93eb688660f8..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineImpl.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineInner; -import com.azure.resourcemanager.videoanalyzer.models.LivePipeline; -import com.azure.resourcemanager.videoanalyzer.models.LivePipelineState; -import com.azure.resourcemanager.videoanalyzer.models.LivePipelineUpdate; -import com.azure.resourcemanager.videoanalyzer.models.ParameterDefinition; -import java.util.Collections; -import java.util.List; - -public final class LivePipelineImpl implements LivePipeline, LivePipeline.Definition, LivePipeline.Update { - private LivePipelineInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String topologyName() { - return this.innerModel().topologyName(); - } - - public String description() { - return this.innerModel().description(); - } - - public int bitrateKbps() { - return this.innerModel().bitrateKbps(); - } - - public LivePipelineState state() { - return this.innerModel().state(); - } - - public List parameters() { - List inner = this.innerModel().parameters(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public LivePipelineInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String livePipelineName; - - private LivePipelineUpdate updateParameters; - - public LivePipelineImpl withExistingVideoAnalyzer(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public LivePipeline create() { - this.innerObject = serviceManager.serviceClient() - .getLivePipelines() - .createOrUpdateWithResponse(resourceGroupName, accountName, livePipelineName, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public LivePipeline create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getLivePipelines() - .createOrUpdateWithResponse(resourceGroupName, accountName, livePipelineName, this.innerModel(), context) - .getValue(); - return this; - } - - LivePipelineImpl(String name, com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = new LivePipelineInner(); - this.serviceManager = serviceManager; - this.livePipelineName = name; - } - - public LivePipelineImpl update() { - this.updateParameters = new LivePipelineUpdate(); - return this; - } - - public LivePipeline apply() { - this.innerObject = serviceManager.serviceClient() - .getLivePipelines() - .updateWithResponse(resourceGroupName, accountName, livePipelineName, updateParameters, Context.NONE) - .getValue(); - return this; - } - - public LivePipeline apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getLivePipelines() - .updateWithResponse(resourceGroupName, accountName, livePipelineName, updateParameters, context) - .getValue(); - return this; - } - - LivePipelineImpl(LivePipelineInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "videoAnalyzers"); - this.livePipelineName = Utils.getValueFromIdByName(innerObject.id(), "livePipelines"); - } - - public LivePipeline refresh() { - this.innerObject = serviceManager.serviceClient() - .getLivePipelines() - .getWithResponse(resourceGroupName, accountName, livePipelineName, Context.NONE) - .getValue(); - return this; - } - - public LivePipeline refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getLivePipelines() - .getWithResponse(resourceGroupName, accountName, livePipelineName, context) - .getValue(); - return this; - } - - public void activate() { - serviceManager.livePipelines().activate(resourceGroupName, accountName, livePipelineName); - } - - public void activate(Context context) { - serviceManager.livePipelines().activate(resourceGroupName, accountName, livePipelineName, context); - } - - public void deactivate() { - serviceManager.livePipelines().deactivate(resourceGroupName, accountName, livePipelineName); - } - - public void deactivate(Context context) { - serviceManager.livePipelines().deactivate(resourceGroupName, accountName, livePipelineName, context); - } - - public LivePipelineImpl withTopologyName(String topologyName) { - if (isInCreateMode()) { - this.innerModel().withTopologyName(topologyName); - return this; - } else { - this.updateParameters.withTopologyName(topologyName); - return this; - } - } - - public LivePipelineImpl withDescription(String description) { - if (isInCreateMode()) { - this.innerModel().withDescription(description); - return this; - } else { - this.updateParameters.withDescription(description); - return this; - } - } - - public LivePipelineImpl withBitrateKbps(int bitrateKbps) { - this.innerModel().withBitrateKbps(bitrateKbps); - return this; - } - - public LivePipelineImpl withParameters(List parameters) { - if (isInCreateMode()) { - this.innerModel().withParameters(parameters); - return this; - } else { - this.updateParameters.withParameters(parameters); - return this; - } - } - - public LivePipelineImpl withBitrateKbps(Integer bitrateKbps) { - this.updateParameters.withBitrateKbps(bitrateKbps); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusImpl.java deleted file mode 100644 index f25116b7aa84..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.management.exception.ManagementError; -import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineOperationStatusInner; -import com.azure.resourcemanager.videoanalyzer.models.LivePipelineOperationStatus; - -public final class LivePipelineOperationStatusImpl implements LivePipelineOperationStatus { - private LivePipelineOperationStatusInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - LivePipelineOperationStatusImpl(LivePipelineOperationStatusInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public String status() { - return this.innerModel().status(); - } - - public ManagementError error() { - return this.innerModel().error(); - } - - public LivePipelineOperationStatusInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusesClientImpl.java deleted file mode 100644 index b445de11c38e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusesClientImpl.java +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.videoanalyzer.fluent.LivePipelineOperationStatusesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineOperationStatusInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in LivePipelineOperationStatusesClient. */ -public final class LivePipelineOperationStatusesClientImpl implements LivePipelineOperationStatusesClient { - /** The proxy service used to perform REST calls. */ - private final LivePipelineOperationStatusesService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of LivePipelineOperationStatusesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - LivePipelineOperationStatusesClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service = RestProxy.create(LivePipelineOperationStatusesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientLivePipelineOperationStatuses to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface LivePipelineOperationStatusesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/operationStatuses/{operationId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("livePipelineName") String livePipelineName, @PathParam("operationId") String operationId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the operation status of a live pipeline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param operationId The operation ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status of a live pipeline along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String accountName, String livePipelineName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (livePipelineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, livePipelineName, operationId, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the operation status of a live pipeline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param operationId The operation ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status of a live pipeline along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String accountName, String livePipelineName, String operationId, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (livePipelineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - livePipelineName, operationId, this.client.getApiVersion(), accept, context); - } - - /** - * Get the operation status of a live pipeline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param operationId The operation ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status of a live pipeline on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, - String livePipelineName, String operationId) { - return getWithResponseAsync(resourceGroupName, accountName, livePipelineName, operationId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the operation status of a live pipeline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param operationId The operation ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status of a live pipeline. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LivePipelineOperationStatusInner get(String resourceGroupName, String accountName, String livePipelineName, - String operationId) { - return getAsync(resourceGroupName, accountName, livePipelineName, operationId).block(); - } - - /** - * Get the operation status of a live pipeline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param operationId The operation ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status of a live pipeline along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, - String livePipelineName, String operationId, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, livePipelineName, operationId, context).block(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusesImpl.java deleted file mode 100644 index 0a502a836f24..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusesImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.LivePipelineOperationStatusesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineOperationStatusInner; -import com.azure.resourcemanager.videoanalyzer.models.LivePipelineOperationStatus; -import com.azure.resourcemanager.videoanalyzer.models.LivePipelineOperationStatuses; - -public final class LivePipelineOperationStatusesImpl implements LivePipelineOperationStatuses { - private static final ClientLogger LOGGER = new ClientLogger(LivePipelineOperationStatusesImpl.class); - - private final LivePipelineOperationStatusesClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public LivePipelineOperationStatusesImpl(LivePipelineOperationStatusesClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public LivePipelineOperationStatus get(String resourceGroupName, String accountName, String livePipelineName, - String operationId) { - LivePipelineOperationStatusInner inner - = this.serviceClient().get(resourceGroupName, accountName, livePipelineName, operationId); - if (inner != null) { - return new LivePipelineOperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String accountName, - String livePipelineName, String operationId, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, accountName, livePipelineName, operationId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new LivePipelineOperationStatusImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private LivePipelineOperationStatusesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelinesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelinesClientImpl.java deleted file mode 100644 index c0424b5c6911..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelinesClientImpl.java +++ /dev/null @@ -1,1427 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.videoanalyzer.fluent.LivePipelinesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineInner; -import com.azure.resourcemanager.videoanalyzer.models.LivePipelineCollection; -import com.azure.resourcemanager.videoanalyzer.models.LivePipelineUpdate; -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 LivePipelinesClient. */ -public final class LivePipelinesClientImpl implements LivePipelinesClient { - /** The proxy service used to perform REST calls. */ - private final LivePipelinesService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of LivePipelinesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - LivePipelinesClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service - = RestProxy.create(LivePipelinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientLivePipelines to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface LivePipelinesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/livePipelines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("livePipelineName") String livePipelineName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("livePipelineName") String livePipelineName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") LivePipelineInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("livePipelineName") String livePipelineName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("livePipelineName") String livePipelineName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") LivePipelineUpdate parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/activate") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> activate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("livePipelineName") String livePipelineName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/deactivate") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deactivate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("livePipelineName") String livePipelineName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Retrieves a list of live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of LivePipeline items along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String accountName, - String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), filter, top, 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())); - } - - /** - * Retrieves a list of live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of LivePipeline items along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String accountName, - String filter, Integer top, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), filter, top, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Retrieves a list of live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of LivePipeline items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, String filter, - Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, filter, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Retrieves a list of live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of LivePipeline items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName) { - final String filter = null; - final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, filter, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Retrieves a list of live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of LivePipeline items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, String filter, - Integer top, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, filter, top, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Retrieves a list of live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of LivePipeline items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName) { - final String filter = null; - final Integer top = null; - return new PagedIterable<>(listAsync(resourceGroupName, accountName, filter, top)); - } - - /** - * Retrieves a list of live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of LivePipeline items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, String filter, - Integer top, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, filter, top, context)); - } - - /** - * Retrieves a specific live pipeline by name. If a live pipeline with that name has been previously created, the - * call will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String livePipelineName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (livePipelineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, livePipelineName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieves a specific live pipeline by name. If a live pipeline with that name has been previously created, the - * call will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String livePipelineName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (livePipelineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - livePipelineName, this.client.getApiVersion(), accept, context); - } - - /** - * Retrieves a specific live pipeline by name. If a live pipeline with that name has been previously created, the - * call will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String livePipelineName) { - return getWithResponseAsync(resourceGroupName, accountName, livePipelineName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Retrieves a specific live pipeline by name. If a live pipeline with that name has been previously created, the - * call will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LivePipelineInner get(String resourceGroupName, String accountName, String livePipelineName) { - return getAsync(resourceGroupName, accountName, livePipelineName).block(); - } - - /** - * Retrieves a specific live pipeline by name. If a live pipeline with that name has been previously created, the - * call will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, - String livePipelineName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, livePipelineName, context).block(); - } - - /** - * Creates a new live pipeline or updates an existing one, with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String livePipelineName, LivePipelineInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (livePipelineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, livePipelineName, this.client.getApiVersion(), parameters, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a new live pipeline or updates an existing one, with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String livePipelineName, LivePipelineInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (livePipelineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, livePipelineName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Creates a new live pipeline or updates an existing one, with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, - String livePipelineName, LivePipelineInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, livePipelineName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates a new live pipeline or updates an existing one, with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LivePipelineInner createOrUpdate(String resourceGroupName, String accountName, String livePipelineName, - LivePipelineInner parameters) { - return createOrUpdateAsync(resourceGroupName, accountName, livePipelineName, parameters).block(); - } - - /** - * Creates a new live pipeline or updates an existing one, with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String accountName, - String livePipelineName, LivePipelineInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, livePipelineName, parameters, context) - .block(); - } - - /** - * Deletes a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String livePipelineName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (livePipelineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, livePipelineName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String livePipelineName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (livePipelineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, livePipelineName, this.client.getApiVersion(), accept, context); - } - - /** - * Deletes a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String livePipelineName) { - return deleteWithResponseAsync(resourceGroupName, accountName, livePipelineName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String livePipelineName) { - deleteAsync(resourceGroupName, accountName, livePipelineName).block(); - } - - /** - * Deletes a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String accountName, String livePipelineName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, accountName, livePipelineName, context).block(); - } - - /** - * Updates an existing live pipeline with the given name. Properties that can be updated include: description, - * bitrateKbps, and parameter definitions. Only the description can be updated while the live pipeline is active. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String accountName, - String livePipelineName, LivePipelineUpdate 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (livePipelineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, livePipelineName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates an existing live pipeline with the given name. Properties that can be updated include: description, - * bitrateKbps, and parameter definitions. Only the description can be updated while the live pipeline is active. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String accountName, - String livePipelineName, LivePipelineUpdate 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (livePipelineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, livePipelineName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Updates an existing live pipeline with the given name. Properties that can be updated include: description, - * bitrateKbps, and parameter definitions. Only the description can be updated while the live pipeline is active. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, String livePipelineName, - LivePipelineUpdate parameters) { - return updateWithResponseAsync(resourceGroupName, accountName, livePipelineName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Updates an existing live pipeline with the given name. Properties that can be updated include: description, - * bitrateKbps, and parameter definitions. Only the description can be updated while the live pipeline is active. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LivePipelineInner update(String resourceGroupName, String accountName, String livePipelineName, - LivePipelineUpdate parameters) { - return updateAsync(resourceGroupName, accountName, livePipelineName, parameters).block(); - } - - /** - * Updates an existing live pipeline with the given name. Properties that can be updated include: description, - * bitrateKbps, and parameter definitions. Only the description can be updated while the live pipeline is active. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String accountName, - String livePipelineName, LivePipelineUpdate parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, accountName, livePipelineName, parameters, context).block(); - } - - /** - * Activates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> activateWithResponseAsync(String resourceGroupName, String accountName, - String livePipelineName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (livePipelineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.activate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, livePipelineName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Activates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> activateWithResponseAsync(String resourceGroupName, String accountName, - String livePipelineName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (livePipelineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.activate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, livePipelineName, this.client.getApiVersion(), accept, context); - } - - /** - * Activates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginActivateAsync(String resourceGroupName, String accountName, - String livePipelineName) { - Mono>> mono - = activateWithResponseAsync(resourceGroupName, accountName, livePipelineName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Activates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginActivateAsync(String resourceGroupName, String accountName, - String livePipelineName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = activateWithResponseAsync(resourceGroupName, accountName, livePipelineName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Activates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginActivate(String resourceGroupName, String accountName, - String livePipelineName) { - return beginActivateAsync(resourceGroupName, accountName, livePipelineName).getSyncPoller(); - } - - /** - * Activates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginActivate(String resourceGroupName, String accountName, - String livePipelineName, Context context) { - return beginActivateAsync(resourceGroupName, accountName, livePipelineName, context).getSyncPoller(); - } - - /** - * Activates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono activateAsync(String resourceGroupName, String accountName, String livePipelineName) { - return beginActivateAsync(resourceGroupName, accountName, livePipelineName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Activates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono activateAsync(String resourceGroupName, String accountName, String livePipelineName, - Context context) { - return beginActivateAsync(resourceGroupName, accountName, livePipelineName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Activates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void activate(String resourceGroupName, String accountName, String livePipelineName) { - activateAsync(resourceGroupName, accountName, livePipelineName).block(); - } - - /** - * Activates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void activate(String resourceGroupName, String accountName, String livePipelineName, Context context) { - activateAsync(resourceGroupName, accountName, livePipelineName, context).block(); - } - - /** - * Deactivates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deactivateWithResponseAsync(String resourceGroupName, String accountName, - String livePipelineName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (livePipelineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.deactivate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, livePipelineName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deactivates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deactivateWithResponseAsync(String resourceGroupName, String accountName, - String livePipelineName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (livePipelineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.deactivate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, livePipelineName, this.client.getApiVersion(), accept, context); - } - - /** - * Deactivates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeactivateAsync(String resourceGroupName, String accountName, - String livePipelineName) { - Mono>> mono - = deactivateWithResponseAsync(resourceGroupName, accountName, livePipelineName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deactivates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeactivateAsync(String resourceGroupName, String accountName, - String livePipelineName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deactivateWithResponseAsync(resourceGroupName, accountName, livePipelineName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deactivates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeactivate(String resourceGroupName, String accountName, - String livePipelineName) { - return beginDeactivateAsync(resourceGroupName, accountName, livePipelineName).getSyncPoller(); - } - - /** - * Deactivates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeactivate(String resourceGroupName, String accountName, - String livePipelineName, Context context) { - return beginDeactivateAsync(resourceGroupName, accountName, livePipelineName, context).getSyncPoller(); - } - - /** - * Deactivates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deactivateAsync(String resourceGroupName, String accountName, String livePipelineName) { - return beginDeactivateAsync(resourceGroupName, accountName, livePipelineName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deactivates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deactivateAsync(String resourceGroupName, String accountName, String livePipelineName, - Context context) { - return beginDeactivateAsync(resourceGroupName, accountName, livePipelineName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deactivates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deactivate(String resourceGroupName, String accountName, String livePipelineName) { - deactivateAsync(resourceGroupName, accountName, livePipelineName).block(); - } - - /** - * Deactivates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deactivate(String resourceGroupName, String accountName, String livePipelineName, Context context) { - deactivateAsync(resourceGroupName, accountName, livePipelineName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of LivePipeline items along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of LivePipeline items along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelinesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelinesImpl.java deleted file mode 100644 index f28deeb2b66a..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelinesImpl.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.LivePipelinesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineInner; -import com.azure.resourcemanager.videoanalyzer.models.LivePipeline; -import com.azure.resourcemanager.videoanalyzer.models.LivePipelines; - -public final class LivePipelinesImpl implements LivePipelines { - private static final ClientLogger LOGGER = new ClientLogger(LivePipelinesImpl.class); - - private final LivePipelinesClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public LivePipelinesImpl(LivePipelinesClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new LivePipelineImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, String filter, Integer top, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, accountName, filter, top, context); - return Utils.mapPage(inner, inner1 -> new LivePipelineImpl(inner1, this.manager())); - } - - public LivePipeline get(String resourceGroupName, String accountName, String livePipelineName) { - LivePipelineInner inner = this.serviceClient().get(resourceGroupName, accountName, livePipelineName); - if (inner != null) { - return new LivePipelineImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String accountName, String livePipelineName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, livePipelineName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new LivePipelineImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String livePipelineName) { - this.serviceClient().delete(resourceGroupName, accountName, livePipelineName); - } - - public Response deleteWithResponse(String resourceGroupName, String accountName, String livePipelineName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, livePipelineName, context); - } - - public void activate(String resourceGroupName, String accountName, String livePipelineName) { - this.serviceClient().activate(resourceGroupName, accountName, livePipelineName); - } - - public void activate(String resourceGroupName, String accountName, String livePipelineName, Context context) { - this.serviceClient().activate(resourceGroupName, accountName, livePipelineName, context); - } - - public void deactivate(String resourceGroupName, String accountName, String livePipelineName) { - this.serviceClient().deactivate(resourceGroupName, accountName, livePipelineName); - } - - public void deactivate(String resourceGroupName, String accountName, String livePipelineName, Context context) { - this.serviceClient().deactivate(resourceGroupName, accountName, livePipelineName, context); - } - - public LivePipeline 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String livePipelineName = Utils.getValueFromIdByName(id, "livePipelines"); - if (livePipelineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'livePipelines'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, livePipelineName, 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String livePipelineName = Utils.getValueFromIdByName(id, "livePipelines"); - if (livePipelineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'livePipelines'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, livePipelineName, 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String livePipelineName = Utils.getValueFromIdByName(id, "livePipelines"); - if (livePipelineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'livePipelines'.", id))); - } - this.deleteWithResponse(resourceGroupName, accountName, livePipelineName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String livePipelineName = Utils.getValueFromIdByName(id, "livePipelines"); - if (livePipelineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'livePipelines'.", id))); - } - return this.deleteWithResponse(resourceGroupName, accountName, livePipelineName, context); - } - - private LivePipelinesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } - - public LivePipelineImpl define(String name) { - return new LivePipelineImpl(name, this.manager()); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LocationsClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LocationsClientImpl.java deleted file mode 100644 index e842187df941..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LocationsClientImpl.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.videoanalyzer.fluent.LocationsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.videoanalyzer.models.CheckNameAvailabilityRequest; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in LocationsClient. */ -public final class LocationsClientImpl implements LocationsClient { - /** The proxy service used to perform REST calls. */ - private final LocationsService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of LocationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - LocationsClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service - = RestProxy.create(LocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientLocations to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface LocationsService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/checkNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CheckNameAvailabilityRequest parameters, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Checks whether the Video Analyzer resource name is available. - * - * @param locationName Location Name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - checkNameAvailabilityWithResponseAsync(String locationName, CheckNameAvailabilityRequest 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName 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.checkNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(), - locationName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Checks whether the Video Analyzer resource name is available. - * - * @param locationName Location Name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String locationName, CheckNameAvailabilityRequest 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName 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.checkNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(), locationName, - this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Checks whether the Video Analyzer resource name is available. - * - * @param locationName Location Name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync(String locationName, - CheckNameAvailabilityRequest parameters) { - return checkNameAvailabilityWithResponseAsync(locationName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Checks whether the Video Analyzer resource name is available. - * - * @param locationName Location Name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CheckNameAvailabilityResponseInner checkNameAvailability(String locationName, - CheckNameAvailabilityRequest parameters) { - return checkNameAvailabilityAsync(locationName, parameters).block(); - } - - /** - * Checks whether the Video Analyzer resource name is available. - * - * @param locationName Location Name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse(String locationName, - CheckNameAvailabilityRequest parameters, Context context) { - return checkNameAvailabilityWithResponseAsync(locationName, parameters, context).block(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LocationsImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LocationsImpl.java deleted file mode 100644 index 94160d1ed6bb..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LocationsImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.LocationsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.videoanalyzer.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.videoanalyzer.models.CheckNameAvailabilityResponse; -import com.azure.resourcemanager.videoanalyzer.models.Locations; - -public final class LocationsImpl implements Locations { - private static final ClientLogger LOGGER = new ClientLogger(LocationsImpl.class); - - private final LocationsClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public LocationsImpl(LocationsClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public CheckNameAvailabilityResponse checkNameAvailability(String locationName, - CheckNameAvailabilityRequest parameters) { - CheckNameAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(locationName, parameters); - if (inner != null) { - return new CheckNameAvailabilityResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response checkNameAvailabilityWithResponse(String locationName, - CheckNameAvailabilityRequest parameters, Context context) { - Response inner - = this.serviceClient().checkNameAvailabilityWithResponse(locationName, parameters, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CheckNameAvailabilityResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private LocationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationCollectionImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationCollectionImpl.java deleted file mode 100644 index 918c75d526c8..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationCollectionImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.resourcemanager.videoanalyzer.fluent.models.OperationCollectionInner; -import com.azure.resourcemanager.videoanalyzer.models.Operation; -import com.azure.resourcemanager.videoanalyzer.models.OperationCollection; -import java.util.Collections; -import java.util.List; - -public final class OperationCollectionImpl implements OperationCollection { - private OperationCollectionInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - OperationCollectionImpl(OperationCollectionInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager 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 OperationCollectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationResultsClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationResultsClientImpl.java deleted file mode 100644 index 2761fe887918..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationResultsClientImpl.java +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.videoanalyzer.fluent.OperationResultsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OperationResultsClient. */ -public final class OperationResultsClientImpl implements OperationResultsClient { - /** The proxy service used to perform REST calls. */ - private final OperationResultsService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of OperationResultsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationResultsClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service - = RestProxy.create(OperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientOperationResults to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface OperationResultsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/privateEndpointConnections/{name}/operationResults/{operationId}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("name") String name, @PathParam("operationId") String operationId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get private endpoint connection operation result. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection operation result along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String accountName, String name, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, name, operationId, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get private endpoint connection operation result. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection operation result along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String accountName, String name, String operationId, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - name, operationId, this.client.getApiVersion(), accept, context); - } - - /** - * Get private endpoint connection operation result. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection operation result on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String name, - String operationId) { - return getWithResponseAsync(resourceGroupName, accountName, name, operationId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get private endpoint connection operation result. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection operation result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get(String resourceGroupName, String accountName, String name, - String operationId) { - return getAsync(resourceGroupName, accountName, name, operationId).block(); - } - - /** - * Get private endpoint connection operation result. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection operation result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, - String name, String operationId, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, name, operationId, context).block(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationResultsImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationResultsImpl.java deleted file mode 100644 index 84f46bab0157..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationResultsImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.OperationResultsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.videoanalyzer.models.OperationResults; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnection; - -public final class OperationResultsImpl implements OperationResults { - private static final ClientLogger LOGGER = new ClientLogger(OperationResultsImpl.class); - - private final OperationResultsClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public OperationResultsImpl(OperationResultsClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PrivateEndpointConnection get(String resourceGroupName, String accountName, String name, - String operationId) { - PrivateEndpointConnectionInner inner - = this.serviceClient().get(resourceGroupName, accountName, name, operationId); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String accountName, - String name, String operationId, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, name, operationId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private OperationResultsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationStatusesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationStatusesClientImpl.java deleted file mode 100644 index 785868ef5b40..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationStatusesClientImpl.java +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.videoanalyzer.fluent.OperationStatusesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerPrivateEndpointConnectionOperationStatusInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OperationStatusesClient. */ -public final class OperationStatusesClientImpl implements OperationStatusesClient { - /** The proxy service used to perform REST calls. */ - private final OperationStatusesService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of OperationStatusesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationStatusesClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service - = RestProxy.create(OperationStatusesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientOperationStatuses to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface OperationStatusesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/privateEndpointConnections/{name}/operationStatuses/{operationId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("name") String name, @PathParam("operationId") String operationId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get private endpoint connection operation status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection operation status along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getWithResponseAsync(String resourceGroupName, String accountName, String name, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, name, operationId, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get private endpoint connection operation status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection operation status along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, String name, String operationId, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - name, operationId, this.client.getApiVersion(), accept, context); - } - - /** - * Get private endpoint connection operation status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection operation status on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, - String accountName, String name, String operationId) { - return getWithResponseAsync(resourceGroupName, accountName, name, operationId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get private endpoint connection operation status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection operation status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VideoAnalyzerPrivateEndpointConnectionOperationStatusInner get(String resourceGroupName, String accountName, - String name, String operationId) { - return getAsync(resourceGroupName, accountName, name, operationId).block(); - } - - /** - * Get private endpoint connection operation status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection operation status along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String accountName, String name, String operationId, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, name, operationId, context).block(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationStatusesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationStatusesImpl.java deleted file mode 100644 index f22543e922dc..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationStatusesImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.OperationStatusesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerPrivateEndpointConnectionOperationStatusInner; -import com.azure.resourcemanager.videoanalyzer.models.OperationStatuses; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerPrivateEndpointConnectionOperationStatus; - -public final class OperationStatusesImpl implements OperationStatuses { - private static final ClientLogger LOGGER = new ClientLogger(OperationStatusesImpl.class); - - private final OperationStatusesClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public OperationStatusesImpl(OperationStatusesClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public VideoAnalyzerPrivateEndpointConnectionOperationStatus get(String resourceGroupName, String accountName, - String name, String operationId) { - VideoAnalyzerPrivateEndpointConnectionOperationStatusInner inner - = this.serviceClient().get(resourceGroupName, accountName, name, operationId); - if (inner != null) { - return new VideoAnalyzerPrivateEndpointConnectionOperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, - String accountName, String name, String operationId, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, name, operationId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VideoAnalyzerPrivateEndpointConnectionOperationStatusImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private OperationStatusesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationsClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationsClientImpl.java deleted file mode 100644 index d19551e1414a..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.resourcemanager.videoanalyzer.fluent.OperationsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.OperationCollectionInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ - private final OperationsService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.Media/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all the Media 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 a collection of Operation items along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all the Media 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 a collection of Operation items along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); - } - - /** - * Lists all the Media 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 a collection of Operation items on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync() { - return listWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Lists all the Media 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 a collection of Operation items. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationCollectionInner list() { - return listAsync().block(); - } - - /** - * Lists all the Media 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 a collection of Operation items along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(Context context) { - return listWithResponseAsync(context).block(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationsImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationsImpl.java deleted file mode 100644 index 55460ad67675..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationsImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.OperationsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.OperationCollectionInner; -import com.azure.resourcemanager.videoanalyzer.models.OperationCollection; -import com.azure.resourcemanager.videoanalyzer.models.Operations; - -public final class OperationsImpl implements Operations { - private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public OperationCollection list() { - OperationCollectionInner inner = this.serviceClient().list(); - if (inner != null) { - return new OperationCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse(Context context) { - Response inner = this.serviceClient().listWithResponse(context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OperationCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobImpl.java deleted file mode 100644 index ada1ed8abdae..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobImpl.java +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobInner; -import com.azure.resourcemanager.videoanalyzer.models.ParameterDefinition; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJob; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobError; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobState; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobUpdate; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class PipelineJobImpl implements PipelineJob, PipelineJob.Definition, PipelineJob.Update { - private PipelineJobInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String topologyName() { - return this.innerModel().topologyName(); - } - - public String description() { - return this.innerModel().description(); - } - - public PipelineJobState state() { - return this.innerModel().state(); - } - - public OffsetDateTime expiration() { - return this.innerModel().expiration(); - } - - public PipelineJobError error() { - return this.innerModel().error(); - } - - public List parameters() { - List inner = this.innerModel().parameters(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public PipelineJobInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String pipelineJobName; - - private PipelineJobUpdate updateParameters; - - public PipelineJobImpl withExistingVideoAnalyzer(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public PipelineJob create() { - this.innerObject = serviceManager.serviceClient() - .getPipelineJobs() - .createOrUpdateWithResponse(resourceGroupName, accountName, pipelineJobName, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public PipelineJob create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPipelineJobs() - .createOrUpdateWithResponse(resourceGroupName, accountName, pipelineJobName, this.innerModel(), context) - .getValue(); - return this; - } - - PipelineJobImpl(String name, com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = new PipelineJobInner(); - this.serviceManager = serviceManager; - this.pipelineJobName = name; - } - - public PipelineJobImpl update() { - this.updateParameters = new PipelineJobUpdate(); - return this; - } - - public PipelineJob apply() { - this.innerObject = serviceManager.serviceClient() - .getPipelineJobs() - .updateWithResponse(resourceGroupName, accountName, pipelineJobName, updateParameters, Context.NONE) - .getValue(); - return this; - } - - public PipelineJob apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPipelineJobs() - .updateWithResponse(resourceGroupName, accountName, pipelineJobName, updateParameters, context) - .getValue(); - return this; - } - - PipelineJobImpl(PipelineJobInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "videoAnalyzers"); - this.pipelineJobName = Utils.getValueFromIdByName(innerObject.id(), "pipelineJobs"); - } - - public PipelineJob refresh() { - this.innerObject = serviceManager.serviceClient() - .getPipelineJobs() - .getWithResponse(resourceGroupName, accountName, pipelineJobName, Context.NONE) - .getValue(); - return this; - } - - public PipelineJob refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPipelineJobs() - .getWithResponse(resourceGroupName, accountName, pipelineJobName, context) - .getValue(); - return this; - } - - public void cancel() { - serviceManager.pipelineJobs().cancel(resourceGroupName, accountName, pipelineJobName); - } - - public void cancel(Context context) { - serviceManager.pipelineJobs().cancel(resourceGroupName, accountName, pipelineJobName, context); - } - - public PipelineJobImpl withTopologyName(String topologyName) { - if (isInCreateMode()) { - this.innerModel().withTopologyName(topologyName); - return this; - } else { - this.updateParameters.withTopologyName(topologyName); - return this; - } - } - - public PipelineJobImpl withDescription(String description) { - if (isInCreateMode()) { - this.innerModel().withDescription(description); - return this; - } else { - this.updateParameters.withDescription(description); - return this; - } - } - - public PipelineJobImpl withParameters(List parameters) { - if (isInCreateMode()) { - this.innerModel().withParameters(parameters); - return this; - } else { - this.updateParameters.withParameters(parameters); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusImpl.java deleted file mode 100644 index 6fb5e1f9d603..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.management.exception.ManagementError; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobOperationStatusInner; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobOperationStatus; - -public final class PipelineJobOperationStatusImpl implements PipelineJobOperationStatus { - private PipelineJobOperationStatusInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - PipelineJobOperationStatusImpl(PipelineJobOperationStatusInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public String status() { - return this.innerModel().status(); - } - - public ManagementError error() { - return this.innerModel().error(); - } - - public PipelineJobOperationStatusInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusesClientImpl.java deleted file mode 100644 index e9c8b47eaede..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusesClientImpl.java +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.videoanalyzer.fluent.PipelineJobOperationStatusesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobOperationStatusInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in PipelineJobOperationStatusesClient. */ -public final class PipelineJobOperationStatusesClientImpl implements PipelineJobOperationStatusesClient { - /** The proxy service used to perform REST calls. */ - private final PipelineJobOperationStatusesService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of PipelineJobOperationStatusesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PipelineJobOperationStatusesClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service = RestProxy.create(PipelineJobOperationStatusesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientPipelineJobOperationStatuses to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface PipelineJobOperationStatusesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/operationStatuses/{operationId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("pipelineJobName") String pipelineJobName, @PathParam("operationId") String operationId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the operation status of a pipeline job with the given operationId. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param operationId The operation ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status of a pipeline job with the given operationId along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String accountName, String pipelineJobName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineJobName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, pipelineJobName, operationId, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the operation status of a pipeline job with the given operationId. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param operationId The operation ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status of a pipeline job with the given operationId along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String accountName, String pipelineJobName, String operationId, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineJobName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - pipelineJobName, operationId, this.client.getApiVersion(), accept, context); - } - - /** - * Get the operation status of a pipeline job with the given operationId. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param operationId The operation ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status of a pipeline job with the given operationId on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, - String pipelineJobName, String operationId) { - return getWithResponseAsync(resourceGroupName, accountName, pipelineJobName, operationId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the operation status of a pipeline job with the given operationId. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param operationId The operation ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status of a pipeline job with the given operationId. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PipelineJobOperationStatusInner get(String resourceGroupName, String accountName, String pipelineJobName, - String operationId) { - return getAsync(resourceGroupName, accountName, pipelineJobName, operationId).block(); - } - - /** - * Get the operation status of a pipeline job with the given operationId. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param operationId The operation ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status of a pipeline job with the given operationId along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, - String pipelineJobName, String operationId, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, pipelineJobName, operationId, context).block(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusesImpl.java deleted file mode 100644 index 93c98cbc1ec7..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusesImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.PipelineJobOperationStatusesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobOperationStatusInner; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobOperationStatus; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobOperationStatuses; - -public final class PipelineJobOperationStatusesImpl implements PipelineJobOperationStatuses { - private static final ClientLogger LOGGER = new ClientLogger(PipelineJobOperationStatusesImpl.class); - - private final PipelineJobOperationStatusesClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public PipelineJobOperationStatusesImpl(PipelineJobOperationStatusesClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PipelineJobOperationStatus get(String resourceGroupName, String accountName, String pipelineJobName, - String operationId) { - PipelineJobOperationStatusInner inner - = this.serviceClient().get(resourceGroupName, accountName, pipelineJobName, operationId); - if (inner != null) { - return new PipelineJobOperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String accountName, - String pipelineJobName, String operationId, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, accountName, pipelineJobName, operationId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PipelineJobOperationStatusImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private PipelineJobOperationStatusesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobsClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobsClientImpl.java deleted file mode 100644 index 42a2b7964abd..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobsClientImpl.java +++ /dev/null @@ -1,1181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.videoanalyzer.fluent.PipelineJobsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobInner; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobCollection; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobUpdate; -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 PipelineJobsClient. */ -public final class PipelineJobsClientImpl implements PipelineJobsClient { - /** The proxy service used to perform REST calls. */ - private final PipelineJobsService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of PipelineJobsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PipelineJobsClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service - = RestProxy.create(PipelineJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientPipelineJobs to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface PipelineJobsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/pipelineJobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("pipelineJobName") String pipelineJobName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("pipelineJobName") String pipelineJobName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PipelineJobInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("pipelineJobName") String pipelineJobName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("pipelineJobName") String pipelineJobName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PipelineJobUpdate parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/cancel") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> cancel(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("pipelineJobName") String pipelineJobName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Retrieves a list of all live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineJob items along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String accountName, - String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), filter, top, 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())); - } - - /** - * Retrieves a list of all live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineJob items along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String accountName, - String filter, Integer top, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), filter, top, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Retrieves a list of all live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineJob items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, String filter, - Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, filter, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Retrieves a list of all live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineJob items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName) { - final String filter = null; - final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, filter, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Retrieves a list of all live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineJob items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, String filter, - Integer top, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, filter, top, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Retrieves a list of all live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineJob items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName) { - final String filter = null; - final Integer top = null; - return new PagedIterable<>(listAsync(resourceGroupName, accountName, filter, top)); - } - - /** - * Retrieves a list of all live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineJob items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, String filter, - Integer top, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, filter, top, context)); - } - - /** - * Retrieves a specific pipeline job by name. If a pipeline job with that name has been previously created, the call - * will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String pipelineJobName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineJobName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, pipelineJobName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieves a specific pipeline job by name. If a pipeline job with that name has been previously created, the call - * will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String pipelineJobName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineJobName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - pipelineJobName, this.client.getApiVersion(), accept, context); - } - - /** - * Retrieves a specific pipeline job by name. If a pipeline job with that name has been previously created, the call - * will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String pipelineJobName) { - return getWithResponseAsync(resourceGroupName, accountName, pipelineJobName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Retrieves a specific pipeline job by name. If a pipeline job with that name has been previously created, the call - * will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PipelineJobInner get(String resourceGroupName, String accountName, String pipelineJobName) { - return getAsync(resourceGroupName, accountName, pipelineJobName).block(); - } - - /** - * Retrieves a specific pipeline job by name. If a pipeline job with that name has been previously created, the call - * will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, - String pipelineJobName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, pipelineJobName, context).block(); - } - - /** - * Creates a new pipeline job or updates an existing one, with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String pipelineJobName, PipelineJobInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineJobName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, pipelineJobName, this.client.getApiVersion(), parameters, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a new pipeline job or updates an existing one, with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String pipelineJobName, PipelineJobInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineJobName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, pipelineJobName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Creates a new pipeline job or updates an existing one, with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, - String pipelineJobName, PipelineJobInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, pipelineJobName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates a new pipeline job or updates an existing one, with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PipelineJobInner createOrUpdate(String resourceGroupName, String accountName, String pipelineJobName, - PipelineJobInner parameters) { - return createOrUpdateAsync(resourceGroupName, accountName, pipelineJobName, parameters).block(); - } - - /** - * Creates a new pipeline job or updates an existing one, with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String accountName, - String pipelineJobName, PipelineJobInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, pipelineJobName, parameters, context) - .block(); - } - - /** - * Deletes a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String pipelineJobName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineJobName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, pipelineJobName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String pipelineJobName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineJobName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, pipelineJobName, this.client.getApiVersion(), accept, context); - } - - /** - * Deletes a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String pipelineJobName) { - return deleteWithResponseAsync(resourceGroupName, accountName, pipelineJobName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String pipelineJobName) { - deleteAsync(resourceGroupName, accountName, pipelineJobName).block(); - } - - /** - * Deletes a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String accountName, String pipelineJobName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, accountName, pipelineJobName, context).block(); - } - - /** - * Updates an existing pipeline job with the given name. Properties that can be updated include: description. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String accountName, - String pipelineJobName, PipelineJobUpdate 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineJobName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, pipelineJobName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates an existing pipeline job with the given name. Properties that can be updated include: description. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String accountName, - String pipelineJobName, PipelineJobUpdate 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineJobName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, pipelineJobName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Updates an existing pipeline job with the given name. Properties that can be updated include: description. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, String pipelineJobName, - PipelineJobUpdate parameters) { - return updateWithResponseAsync(resourceGroupName, accountName, pipelineJobName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Updates an existing pipeline job with the given name. Properties that can be updated include: description. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PipelineJobInner update(String resourceGroupName, String accountName, String pipelineJobName, - PipelineJobUpdate parameters) { - return updateAsync(resourceGroupName, accountName, pipelineJobName, parameters).block(); - } - - /** - * Updates an existing pipeline job with the given name. Properties that can be updated include: description. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String accountName, - String pipelineJobName, PipelineJobUpdate parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, accountName, pipelineJobName, parameters, context).block(); - } - - /** - * Cancels a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> cancelWithResponseAsync(String resourceGroupName, String accountName, - String pipelineJobName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineJobName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, pipelineJobName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Cancels a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> cancelWithResponseAsync(String resourceGroupName, String accountName, - String pipelineJobName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineJobName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.cancel(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, pipelineJobName, this.client.getApiVersion(), accept, context); - } - - /** - * Cancels a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCancelAsync(String resourceGroupName, String accountName, - String pipelineJobName) { - Mono>> mono - = cancelWithResponseAsync(resourceGroupName, accountName, pipelineJobName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Cancels a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCancelAsync(String resourceGroupName, String accountName, - String pipelineJobName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = cancelWithResponseAsync(resourceGroupName, accountName, pipelineJobName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Cancels a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCancel(String resourceGroupName, String accountName, - String pipelineJobName) { - return beginCancelAsync(resourceGroupName, accountName, pipelineJobName).getSyncPoller(); - } - - /** - * Cancels a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCancel(String resourceGroupName, String accountName, - String pipelineJobName, Context context) { - return beginCancelAsync(resourceGroupName, accountName, pipelineJobName, context).getSyncPoller(); - } - - /** - * Cancels a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelAsync(String resourceGroupName, String accountName, String pipelineJobName) { - return beginCancelAsync(resourceGroupName, accountName, pipelineJobName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Cancels a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelAsync(String resourceGroupName, String accountName, String pipelineJobName, - Context context) { - return beginCancelAsync(resourceGroupName, accountName, pipelineJobName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Cancels a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void cancel(String resourceGroupName, String accountName, String pipelineJobName) { - cancelAsync(resourceGroupName, accountName, pipelineJobName).block(); - } - - /** - * Cancels a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void cancel(String resourceGroupName, String accountName, String pipelineJobName, Context context) { - cancelAsync(resourceGroupName, accountName, pipelineJobName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineJob items along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineJob items along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobsImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobsImpl.java deleted file mode 100644 index 01cc58657e8d..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobsImpl.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.PipelineJobsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobInner; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJob; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJobs; - -public final class PipelineJobsImpl implements PipelineJobs { - private static final ClientLogger LOGGER = new ClientLogger(PipelineJobsImpl.class); - - private final PipelineJobsClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public PipelineJobsImpl(PipelineJobsClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new PipelineJobImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, String filter, Integer top, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, accountName, filter, top, context); - return Utils.mapPage(inner, inner1 -> new PipelineJobImpl(inner1, this.manager())); - } - - public PipelineJob get(String resourceGroupName, String accountName, String pipelineJobName) { - PipelineJobInner inner = this.serviceClient().get(resourceGroupName, accountName, pipelineJobName); - if (inner != null) { - return new PipelineJobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String accountName, String pipelineJobName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, pipelineJobName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PipelineJobImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String pipelineJobName) { - this.serviceClient().delete(resourceGroupName, accountName, pipelineJobName); - } - - public Response deleteWithResponse(String resourceGroupName, String accountName, String pipelineJobName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, pipelineJobName, context); - } - - public void cancel(String resourceGroupName, String accountName, String pipelineJobName) { - this.serviceClient().cancel(resourceGroupName, accountName, pipelineJobName); - } - - public void cancel(String resourceGroupName, String accountName, String pipelineJobName, Context context) { - this.serviceClient().cancel(resourceGroupName, accountName, pipelineJobName, context); - } - - public PipelineJob 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String pipelineJobName = Utils.getValueFromIdByName(id, "pipelineJobs"); - if (pipelineJobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'pipelineJobs'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, pipelineJobName, 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String pipelineJobName = Utils.getValueFromIdByName(id, "pipelineJobs"); - if (pipelineJobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'pipelineJobs'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, pipelineJobName, 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String pipelineJobName = Utils.getValueFromIdByName(id, "pipelineJobs"); - if (pipelineJobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'pipelineJobs'.", id))); - } - this.deleteWithResponse(resourceGroupName, accountName, pipelineJobName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String pipelineJobName = Utils.getValueFromIdByName(id, "pipelineJobs"); - if (pipelineJobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'pipelineJobs'.", id))); - } - return this.deleteWithResponse(resourceGroupName, accountName, pipelineJobName, context); - } - - private PipelineJobsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } - - public PipelineJobImpl define(String name) { - return new PipelineJobImpl(name, this.manager()); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologiesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologiesClientImpl.java deleted file mode 100644 index 10f5a8a16c6e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologiesClientImpl.java +++ /dev/null @@ -1,982 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.videoanalyzer.fluent.PipelineTopologiesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineTopologyInner; -import com.azure.resourcemanager.videoanalyzer.models.PipelineTopologyCollection; -import com.azure.resourcemanager.videoanalyzer.models.PipelineTopologyUpdate; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in PipelineTopologiesClient. */ -public final class PipelineTopologiesClientImpl implements PipelineTopologiesClient { - /** The proxy service used to perform REST calls. */ - private final PipelineTopologiesService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of PipelineTopologiesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PipelineTopologiesClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service = RestProxy.create(PipelineTopologiesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientPipelineTopologies to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface PipelineTopologiesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/pipelineTopologies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$top") Integer top, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("pipelineTopologyName") String pipelineTopologyName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("pipelineTopologyName") String pipelineTopologyName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PipelineTopologyInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("pipelineTopologyName") String pipelineTopologyName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("pipelineTopologyName") String pipelineTopologyName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PipelineTopologyUpdate parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Retrieves a list of pipeline topologies that have been added to the account, if any, along with their JSON - * representation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineTopology items along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String accountName, - String filter, Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), filter, top, 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())); - } - - /** - * Retrieves a list of pipeline topologies that have been added to the account, if any, along with their JSON - * representation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineTopology items along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String accountName, - String filter, Integer top, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), filter, top, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Retrieves a list of pipeline topologies that have been added to the account, if any, along with their JSON - * representation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineTopology items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, String filter, - Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, filter, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Retrieves a list of pipeline topologies that have been added to the account, if any, along with their JSON - * representation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineTopology items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName) { - final String filter = null; - final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, filter, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Retrieves a list of pipeline topologies that have been added to the account, if any, along with their JSON - * representation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineTopology items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, String filter, - Integer top, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, filter, top, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Retrieves a list of pipeline topologies that have been added to the account, if any, along with their JSON - * representation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineTopology items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName) { - final String filter = null; - final Integer top = null; - return new PagedIterable<>(listAsync(resourceGroupName, accountName, filter, top)); - } - - /** - * Retrieves a list of pipeline topologies that have been added to the account, if any, along with their JSON - * representation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineTopology items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, String filter, - Integer top, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, filter, top, context)); - } - - /** - * Retrieves a specific pipeline topology by name. If a topology with that name has been previously created, the - * call will return the JSON representation of that topology. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String pipelineTopologyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineTopologyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineTopologyName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, pipelineTopologyName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieves a specific pipeline topology by name. If a topology with that name has been previously created, the - * call will return the JSON representation of that topology. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String pipelineTopologyName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineTopologyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineTopologyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - pipelineTopologyName, this.client.getApiVersion(), accept, context); - } - - /** - * Retrieves a specific pipeline topology by name. If a topology with that name has been previously created, the - * call will return the JSON representation of that topology. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, - String pipelineTopologyName) { - return getWithResponseAsync(resourceGroupName, accountName, pipelineTopologyName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Retrieves a specific pipeline topology by name. If a topology with that name has been previously created, the - * call will return the JSON representation of that topology. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PipelineTopologyInner get(String resourceGroupName, String accountName, String pipelineTopologyName) { - return getAsync(resourceGroupName, accountName, pipelineTopologyName).block(); - } - - /** - * Retrieves a specific pipeline topology by name. If a topology with that name has been previously created, the - * call will return the JSON representation of that topology. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, - String pipelineTopologyName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, pipelineTopologyName, context).block(); - } - - /** - * Creates a new pipeline topology or updates an existing one, with the given name. A pipeline topology describes - * the processing steps to be applied when processing content for a particular outcome. The topology should be - * defined according to the scenario to be achieved and can be reused across many pipeline instances which share the - * same processing characteristics. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String pipelineTopologyName, PipelineTopologyInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineTopologyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineTopologyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, pipelineTopologyName, this.client.getApiVersion(), parameters, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a new pipeline topology or updates an existing one, with the given name. A pipeline topology describes - * the processing steps to be applied when processing content for a particular outcome. The topology should be - * defined according to the scenario to be achieved and can be reused across many pipeline instances which share the - * same processing characteristics. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String pipelineTopologyName, PipelineTopologyInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineTopologyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineTopologyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, pipelineTopologyName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Creates a new pipeline topology or updates an existing one, with the given name. A pipeline topology describes - * the processing steps to be applied when processing content for a particular outcome. The topology should be - * defined according to the scenario to be achieved and can be reused across many pipeline instances which share the - * same processing characteristics. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, - String pipelineTopologyName, PipelineTopologyInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, pipelineTopologyName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates a new pipeline topology or updates an existing one, with the given name. A pipeline topology describes - * the processing steps to be applied when processing content for a particular outcome. The topology should be - * defined according to the scenario to be achieved and can be reused across many pipeline instances which share the - * same processing characteristics. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PipelineTopologyInner createOrUpdate(String resourceGroupName, String accountName, - String pipelineTopologyName, PipelineTopologyInner parameters) { - return createOrUpdateAsync(resourceGroupName, accountName, pipelineTopologyName, parameters).block(); - } - - /** - * Creates a new pipeline topology or updates an existing one, with the given name. A pipeline topology describes - * the processing steps to be applied when processing content for a particular outcome. The topology should be - * defined according to the scenario to be achieved and can be reused across many pipeline instances which share the - * same processing characteristics. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String accountName, - String pipelineTopologyName, PipelineTopologyInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, pipelineTopologyName, parameters, - context).block(); - } - - /** - * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology - * have been stopped and deleted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String pipelineTopologyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineTopologyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineTopologyName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, pipelineTopologyName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology - * have been stopped and deleted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String pipelineTopologyName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineTopologyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineTopologyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, pipelineTopologyName, this.client.getApiVersion(), accept, context); - } - - /** - * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology - * have been stopped and deleted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String pipelineTopologyName) { - return deleteWithResponseAsync(resourceGroupName, accountName, pipelineTopologyName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology - * have been stopped and deleted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String pipelineTopologyName) { - deleteAsync(resourceGroupName, accountName, pipelineTopologyName).block(); - } - - /** - * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology - * have been stopped and deleted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String accountName, String pipelineTopologyName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, accountName, pipelineTopologyName, context).block(); - } - - /** - * Updates an existing pipeline topology with the given name. If the associated live pipelines or pipeline jobs are - * in active or processing state, respectively, then only the description can be updated. Else, the properties that - * can be updated include: description, parameter declarations, sources, processors, and sinks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String accountName, - String pipelineTopologyName, PipelineTopologyUpdate 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineTopologyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineTopologyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, pipelineTopologyName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates an existing pipeline topology with the given name. If the associated live pipelines or pipeline jobs are - * in active or processing state, respectively, then only the description can be updated. Else, the properties that - * can be updated include: description, parameter declarations, sources, processors, and sinks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String accountName, - String pipelineTopologyName, PipelineTopologyUpdate 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (pipelineTopologyName == null) { - return Mono - .error(new IllegalArgumentException("Parameter pipelineTopologyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, pipelineTopologyName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Updates an existing pipeline topology with the given name. If the associated live pipelines or pipeline jobs are - * in active or processing state, respectively, then only the description can be updated. Else, the properties that - * can be updated include: description, parameter declarations, sources, processors, and sinks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, - String pipelineTopologyName, PipelineTopologyUpdate parameters) { - return updateWithResponseAsync(resourceGroupName, accountName, pipelineTopologyName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Updates an existing pipeline topology with the given name. If the associated live pipelines or pipeline jobs are - * in active or processing state, respectively, then only the description can be updated. Else, the properties that - * can be updated include: description, parameter declarations, sources, processors, and sinks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PipelineTopologyInner update(String resourceGroupName, String accountName, String pipelineTopologyName, - PipelineTopologyUpdate parameters) { - return updateAsync(resourceGroupName, accountName, pipelineTopologyName, parameters).block(); - } - - /** - * Updates an existing pipeline topology with the given name. If the associated live pipelines or pipeline jobs are - * in active or processing state, respectively, then only the description can be updated. Else, the properties that - * can be updated include: description, parameter declarations, sources, processors, and sinks. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String accountName, - String pipelineTopologyName, PipelineTopologyUpdate parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, accountName, pipelineTopologyName, parameters, context) - .block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineTopology items along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineTopology items along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologiesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologiesImpl.java deleted file mode 100644 index dfea01e3a38d..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologiesImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.PipelineTopologiesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineTopologyInner; -import com.azure.resourcemanager.videoanalyzer.models.PipelineTopologies; -import com.azure.resourcemanager.videoanalyzer.models.PipelineTopology; - -public final class PipelineTopologiesImpl implements PipelineTopologies { - private static final ClientLogger LOGGER = new ClientLogger(PipelineTopologiesImpl.class); - - private final PipelineTopologiesClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public PipelineTopologiesImpl(PipelineTopologiesClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new PipelineTopologyImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, String filter, - Integer top, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, accountName, filter, top, context); - return Utils.mapPage(inner, inner1 -> new PipelineTopologyImpl(inner1, this.manager())); - } - - public PipelineTopology get(String resourceGroupName, String accountName, String pipelineTopologyName) { - PipelineTopologyInner inner = this.serviceClient().get(resourceGroupName, accountName, pipelineTopologyName); - if (inner != null) { - return new PipelineTopologyImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String accountName, - String pipelineTopologyName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, pipelineTopologyName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PipelineTopologyImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String pipelineTopologyName) { - this.serviceClient().delete(resourceGroupName, accountName, pipelineTopologyName); - } - - public Response deleteWithResponse(String resourceGroupName, String accountName, String pipelineTopologyName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, pipelineTopologyName, context); - } - - public PipelineTopology 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String pipelineTopologyName = Utils.getValueFromIdByName(id, "pipelineTopologies"); - if (pipelineTopologyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'pipelineTopologies'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, pipelineTopologyName, 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String pipelineTopologyName = Utils.getValueFromIdByName(id, "pipelineTopologies"); - if (pipelineTopologyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'pipelineTopologies'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, pipelineTopologyName, 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String pipelineTopologyName = Utils.getValueFromIdByName(id, "pipelineTopologies"); - if (pipelineTopologyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'pipelineTopologies'.", id))); - } - this.deleteWithResponse(resourceGroupName, accountName, pipelineTopologyName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String pipelineTopologyName = Utils.getValueFromIdByName(id, "pipelineTopologies"); - if (pipelineTopologyName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'pipelineTopologies'.", id))); - } - return this.deleteWithResponse(resourceGroupName, accountName, pipelineTopologyName, context); - } - - private PipelineTopologiesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } - - public PipelineTopologyImpl define(String name) { - return new PipelineTopologyImpl(name, this.manager()); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologyImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologyImpl.java deleted file mode 100644 index e0e67ada6832..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologyImpl.java +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineTopologyInner; -import com.azure.resourcemanager.videoanalyzer.models.Kind; -import com.azure.resourcemanager.videoanalyzer.models.ParameterDeclaration; -import com.azure.resourcemanager.videoanalyzer.models.PipelineTopology; -import com.azure.resourcemanager.videoanalyzer.models.PipelineTopologyUpdate; -import com.azure.resourcemanager.videoanalyzer.models.ProcessorNodeBase; -import com.azure.resourcemanager.videoanalyzer.models.SinkNodeBase; -import com.azure.resourcemanager.videoanalyzer.models.Sku; -import com.azure.resourcemanager.videoanalyzer.models.SourceNodeBase; -import java.util.Collections; -import java.util.List; - -public final class PipelineTopologyImpl - implements PipelineTopology, PipelineTopology.Definition, PipelineTopology.Update { - private PipelineTopologyInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public Kind kind() { - return this.innerModel().kind(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String description() { - return this.innerModel().description(); - } - - public List parameters() { - List inner = this.innerModel().parameters(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List sources() { - List inner = this.innerModel().sources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List processors() { - List inner = this.innerModel().processors(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List sinks() { - List inner = this.innerModel().sinks(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public PipelineTopologyInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String pipelineTopologyName; - - private PipelineTopologyUpdate updateParameters; - - public PipelineTopologyImpl withExistingVideoAnalyzer(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public PipelineTopology create() { - this.innerObject = serviceManager.serviceClient() - .getPipelineTopologies() - .createOrUpdateWithResponse(resourceGroupName, accountName, pipelineTopologyName, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public PipelineTopology create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPipelineTopologies() - .createOrUpdateWithResponse(resourceGroupName, accountName, pipelineTopologyName, this.innerModel(), - context) - .getValue(); - return this; - } - - PipelineTopologyImpl(String name, com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = new PipelineTopologyInner(); - this.serviceManager = serviceManager; - this.pipelineTopologyName = name; - } - - public PipelineTopologyImpl update() { - this.updateParameters = new PipelineTopologyUpdate(); - return this; - } - - public PipelineTopology apply() { - this.innerObject = serviceManager.serviceClient() - .getPipelineTopologies() - .updateWithResponse(resourceGroupName, accountName, pipelineTopologyName, updateParameters, Context.NONE) - .getValue(); - return this; - } - - public PipelineTopology apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPipelineTopologies() - .updateWithResponse(resourceGroupName, accountName, pipelineTopologyName, updateParameters, context) - .getValue(); - return this; - } - - PipelineTopologyImpl(PipelineTopologyInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "videoAnalyzers"); - this.pipelineTopologyName = Utils.getValueFromIdByName(innerObject.id(), "pipelineTopologies"); - } - - public PipelineTopology refresh() { - this.innerObject = serviceManager.serviceClient() - .getPipelineTopologies() - .getWithResponse(resourceGroupName, accountName, pipelineTopologyName, Context.NONE) - .getValue(); - return this; - } - - public PipelineTopology refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPipelineTopologies() - .getWithResponse(resourceGroupName, accountName, pipelineTopologyName, context) - .getValue(); - return this; - } - - public PipelineTopologyImpl withKind(Kind kind) { - if (isInCreateMode()) { - this.innerModel().withKind(kind); - return this; - } else { - this.updateParameters.withKind(kind); - return this; - } - } - - public PipelineTopologyImpl withSku(Sku sku) { - if (isInCreateMode()) { - this.innerModel().withSku(sku); - return this; - } else { - this.updateParameters.withSku(sku); - return this; - } - } - - public PipelineTopologyImpl withDescription(String description) { - if (isInCreateMode()) { - this.innerModel().withDescription(description); - return this; - } else { - this.updateParameters.withDescription(description); - return this; - } - } - - public PipelineTopologyImpl withParameters(List parameters) { - if (isInCreateMode()) { - this.innerModel().withParameters(parameters); - return this; - } else { - this.updateParameters.withParameters(parameters); - return this; - } - } - - public PipelineTopologyImpl withSources(List sources) { - if (isInCreateMode()) { - this.innerModel().withSources(sources); - return this; - } else { - this.updateParameters.withSources(sources); - return this; - } - } - - public PipelineTopologyImpl withProcessors(List processors) { - if (isInCreateMode()) { - this.innerModel().withProcessors(processors); - return this; - } else { - this.updateParameters.withProcessors(processors); - return this; - } - } - - public PipelineTopologyImpl withSinks(List sinks) { - if (isInCreateMode()) { - this.innerModel().withSinks(sinks); - return this; - } else { - this.updateParameters.withSinks(sinks); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionImpl.java deleted file mode 100644 index 30e2cc07bcd5..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionImpl.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpoint; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnection; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkServiceConnectionState; - -public final class PrivateEndpointConnectionImpl - implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update { - private PrivateEndpointConnectionInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public PrivateEndpoint privateEndpoint() { - return this.innerModel().privateEndpoint(); - } - - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.innerModel().privateLinkServiceConnectionState(); - } - - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public PrivateEndpointConnectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String name; - - public PrivateEndpointConnectionImpl withExistingVideoAnalyzer(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public PrivateEndpointConnection create() { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .createOrUpdateWithResponse(resourceGroupName, accountName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public PrivateEndpointConnection create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .createOrUpdateWithResponse(resourceGroupName, accountName, name, this.innerModel(), context) - .getValue(); - return this; - } - - PrivateEndpointConnectionImpl(String name, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = new PrivateEndpointConnectionInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public PrivateEndpointConnectionImpl update() { - return this; - } - - public PrivateEndpointConnection apply() { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .createOrUpdateWithResponse(resourceGroupName, accountName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public PrivateEndpointConnection apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .createOrUpdateWithResponse(resourceGroupName, accountName, name, this.innerModel(), context) - .getValue(); - return this; - } - - PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "videoAnalyzers"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); - } - - public PrivateEndpointConnection refresh() { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .getWithResponse(resourceGroupName, accountName, name, Context.NONE) - .getValue(); - return this; - } - - public PrivateEndpointConnection refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getPrivateEndpointConnections() - .getWithResponse(resourceGroupName, accountName, name, context) - .getValue(); - return this; - } - - public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.innerModel().withPrivateEndpoint(privateEndpoint); - return this; - } - - public PrivateEndpointConnectionImpl - withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.innerModel().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); - return this; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionListResultImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionListResultImpl.java deleted file mode 100644 index d49acb1a942b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionListResultImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionListResultInner; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnection; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnectionListResult; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class PrivateEndpointConnectionListResultImpl implements PrivateEndpointConnectionListResult { - private PrivateEndpointConnectionListResultInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - PrivateEndpointConnectionListResultImpl(PrivateEndpointConnectionListResultInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner.stream() - .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public PrivateEndpointConnectionListResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionsClientImpl.java deleted file mode 100644 index 63124ea98dbe..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionsClientImpl.java +++ /dev/null @@ -1,626 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.videoanalyzer.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionListResultInner; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnectionsCreateOrUpdateResponse; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ -public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - /** The proxy service used to perform REST calls. */ - private final PrivateEndpointConnectionsService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of PrivateEndpointConnectionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PrivateEndpointConnectionsClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientPrivateEndpointConnections to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface PrivateEndpointConnectionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/privateEndpointConnections") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/privateEndpointConnections/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/privateEndpointConnections/{name}") - @ExpectedResponses({ 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PrivateEndpointConnectionInner parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/privateEndpointConnections/{name}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get all private endpoint connections under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under video analyzer account along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, - String accountName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all private endpoint connections under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under video analyzer account along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, - String accountName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), accept, context); - } - - /** - * Get all private endpoint connections under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under video analyzer account on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String resourceGroupName, String accountName) { - return listWithResponseAsync(resourceGroupName, accountName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get all private endpoint connections under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under video analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionListResultInner list(String resourceGroupName, String accountName) { - return listAsync(resourceGroupName, accountName).block(); - } - - /** - * Get all private endpoint connections under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under video analyzer account along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String resourceGroupName, - String accountName, Context context) { - return listWithResponseAsync(resourceGroupName, accountName, context).block(); - } - - /** - * Get private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection under video analyzer account along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String accountName, String name) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection under video analyzer account along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String accountName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection under video analyzer account on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String name) { - return getWithResponseAsync(resourceGroupName, accountName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection under video analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get(String resourceGroupName, String accountName, String name) { - return getAsync(resourceGroupName, accountName, name).block(); - } - - /** - * Get private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection under video analyzer account along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, - String name, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, name, context).block(); - } - - /** - * Update private endpoint connection state under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateWithResponseAsync( - String resourceGroupName, String accountName, String name, PrivateEndpointConnectionInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, name, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update private endpoint connection state under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateWithResponseAsync( - String resourceGroupName, String accountName, String name, PrivateEndpointConnectionInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, name, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Update private endpoint connection state under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, - String name, PrivateEndpointConnectionInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, name, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update private endpoint connection state under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String accountName, String name, - PrivateEndpointConnectionInner parameters) { - return createOrUpdateAsync(resourceGroupName, accountName, name, parameters).block(); - } - - /** - * Update private endpoint connection state under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionsCreateOrUpdateResponse createOrUpdateWithResponse(String resourceGroupName, - String accountName, String name, PrivateEndpointConnectionInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, name, parameters, context).block(); - } - - /** - * Delete private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, String name) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, String name, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String name) { - return deleteWithResponseAsync(resourceGroupName, accountName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String name) { - deleteAsync(resourceGroupName, accountName, name).block(); - } - - /** - * Delete private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String accountName, String name, - Context context) { - return deleteWithResponseAsync(resourceGroupName, accountName, name, context).block(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionsImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionsImpl.java deleted file mode 100644 index 8792610958ca..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionsImpl.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionListResultInner; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnection; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnectionListResult; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnections; - -public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class); - - private final PrivateEndpointConnectionsClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PrivateEndpointConnectionListResult list(String resourceGroupName, String accountName) { - PrivateEndpointConnectionListResultInner inner = this.serviceClient().list(resourceGroupName, accountName); - if (inner != null) { - return new PrivateEndpointConnectionListResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse(String resourceGroupName, String accountName, - Context context) { - Response inner - = this.serviceClient().listWithResponse(resourceGroupName, accountName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateEndpointConnectionListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PrivateEndpointConnection get(String resourceGroupName, String accountName, String name) { - PrivateEndpointConnectionInner inner = this.serviceClient().get(resourceGroupName, accountName, name); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String accountName, - String name, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String name) { - this.serviceClient().delete(resourceGroupName, accountName, name); - } - - public Response deleteWithResponse(String resourceGroupName, String accountName, String name, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, name, context); - } - - public PrivateEndpointConnection getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String name = Utils.getValueFromIdByName(id, "privateEndpointConnections"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, name, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String name = Utils.getValueFromIdByName(id, "privateEndpointConnections"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String name = Utils.getValueFromIdByName(id, "privateEndpointConnections"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - this.deleteWithResponse(resourceGroupName, accountName, name, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String name = Utils.getValueFromIdByName(id, "privateEndpointConnections"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - return this.deleteWithResponse(resourceGroupName, accountName, name, context); - } - - private PrivateEndpointConnectionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } - - public PrivateEndpointConnectionImpl define(String name) { - return new PrivateEndpointConnectionImpl(name, this.manager()); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourceImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourceImpl.java deleted file mode 100644 index ffe47ccf8090..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourceImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkResource; -import java.util.Collections; -import java.util.List; - -public final class PrivateLinkResourceImpl implements PrivateLinkResource { - private PrivateLinkResourceInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - PrivateLinkResourceImpl(PrivateLinkResourceInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String groupId() { - return this.innerModel().groupId(); - } - - public List requiredMembers() { - List inner = this.innerModel().requiredMembers(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List requiredZoneNames() { - List inner = this.innerModel().requiredZoneNames(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public PrivateLinkResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourceListResultImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourceListResultImpl.java deleted file mode 100644 index ee5198faa934..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourceListResultImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkResource; -import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkResourceListResult; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class PrivateLinkResourceListResultImpl implements PrivateLinkResourceListResult { - private PrivateLinkResourceListResultInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - PrivateLinkResourceListResultImpl(PrivateLinkResourceListResultInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner.stream() - .map(inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public PrivateLinkResourceListResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourcesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourcesClientImpl.java deleted file mode 100644 index 2a89272e57ec..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourcesClientImpl.java +++ /dev/null @@ -1,324 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.videoanalyzer.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceListResultInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ -public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { - /** The proxy service used to perform REST calls. */ - private final PrivateLinkResourcesService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of PrivateLinkResourcesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PrivateLinkResourcesClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service = RestProxy.create(PrivateLinkResourcesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientPrivateLinkResources to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface PrivateLinkResourcesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/privateLinkResources") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/privateLinkResources/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get list of group IDs for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs for video analyzer account along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, - String accountName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get list of group IDs for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs for video analyzer account along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, - String accountName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), accept, context); - } - - /** - * Get list of group IDs for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs for video analyzer account on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String resourceGroupName, String accountName) { - return listWithResponseAsync(resourceGroupName, accountName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get list of group IDs for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs for video analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceListResultInner list(String resourceGroupName, String accountName) { - return listAsync(resourceGroupName, accountName).block(); - } - - /** - * Get list of group IDs for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs for video analyzer account along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String resourceGroupName, String accountName, - Context context) { - return listWithResponseAsync(resourceGroupName, accountName, context).block(); - } - - /** - * Get group ID for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Name of the private link resource (Group ID). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return group ID for video analyzer account along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String name) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get group ID for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Name of the private link resource (Group ID). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return group ID for video analyzer account along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get group ID for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Name of the private link resource (Group ID). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return group ID for video analyzer account on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String name) { - return getWithResponseAsync(resourceGroupName, accountName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get group ID for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Name of the private link resource (Group ID). - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return group ID for video analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceInner get(String resourceGroupName, String accountName, String name) { - return getAsync(resourceGroupName, accountName, name).block(); - } - - /** - * Get group ID for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Name of the private link resource (Group ID). - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return group ID for video analyzer account along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, accountName, name, context).block(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourcesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourcesImpl.java deleted file mode 100644 index 3e06fb89ba6f..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourcesImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkResource; -import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkResourceListResult; -import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkResources; - -public final class PrivateLinkResourcesImpl implements PrivateLinkResources { - private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesImpl.class); - - private final PrivateLinkResourcesClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PrivateLinkResourceListResult list(String resourceGroupName, String accountName) { - PrivateLinkResourceListResultInner inner = this.serviceClient().list(resourceGroupName, accountName); - if (inner != null) { - return new PrivateLinkResourceListResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse(String resourceGroupName, String accountName, - Context context) { - Response inner - = this.serviceClient().listWithResponse(resourceGroupName, accountName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateLinkResourceListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PrivateLinkResource get(String resourceGroupName, String accountName, String name) { - PrivateLinkResourceInner inner = this.serviceClient().get(resourceGroupName, accountName, name); - if (inner != null) { - return new PrivateLinkResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String accountName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateLinkResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private PrivateLinkResourcesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/Utils.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/Utils.java deleted file mode 100644 index 67bf435326d3..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/Utils.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerCollectionImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerCollectionImpl.java deleted file mode 100644 index 4235d41d6b6e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerCollectionImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerCollectionInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzer; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerCollection; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class VideoAnalyzerCollectionImpl implements VideoAnalyzerCollection { - private VideoAnalyzerCollectionInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - VideoAnalyzerCollectionImpl(VideoAnalyzerCollectionInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner.stream() - .map(inner1 -> new VideoAnalyzerImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public VideoAnalyzerCollectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerImpl.java deleted file mode 100644 index 8ba7878863a9..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerImpl.java +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; -import com.azure.resourcemanager.videoanalyzer.models.AccountEncryption; -import com.azure.resourcemanager.videoanalyzer.models.Endpoint; -import com.azure.resourcemanager.videoanalyzer.models.IotHub; -import com.azure.resourcemanager.videoanalyzer.models.NetworkAccessControl; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnection; -import com.azure.resourcemanager.videoanalyzer.models.ProvisioningState; -import com.azure.resourcemanager.videoanalyzer.models.PublicNetworkAccess; -import com.azure.resourcemanager.videoanalyzer.models.StorageAccount; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzer; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerIdentity; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerUpdate; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -public final class VideoAnalyzerImpl implements VideoAnalyzer, VideoAnalyzer.Definition, VideoAnalyzer.Update { - private VideoAnalyzerInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager 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 VideoAnalyzerIdentity identity() { - return this.innerModel().identity(); - } - - public List storageAccounts() { - List inner = this.innerModel().storageAccounts(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List endpoints() { - List inner = this.innerModel().endpoints(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public AccountEncryption encryption() { - return this.innerModel().encryption(); - } - - public List iotHubs() { - List inner = this.innerModel().iotHubs(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public PublicNetworkAccess publicNetworkAccess() { - return this.innerModel().publicNetworkAccess(); - } - - public NetworkAccessControl networkAccessControl() { - return this.innerModel().networkAccessControl(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public List privateEndpointConnections() { - List inner = this.innerModel().privateEndpointConnections(); - if (inner != null) { - return Collections.unmodifiableList(inner.stream() - .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public VideoAnalyzerInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private VideoAnalyzerUpdate updateParameters; - - public VideoAnalyzerImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public VideoAnalyzer create() { - this.innerObject = serviceManager.serviceClient() - .getVideoAnalyzers() - .createOrUpdate(resourceGroupName, accountName, this.innerModel(), Context.NONE); - return this; - } - - public VideoAnalyzer create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getVideoAnalyzers() - .createOrUpdate(resourceGroupName, accountName, this.innerModel(), context); - return this; - } - - VideoAnalyzerImpl(String name, com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = new VideoAnalyzerInner(); - this.serviceManager = serviceManager; - this.accountName = name; - } - - public VideoAnalyzerImpl update() { - this.updateParameters = new VideoAnalyzerUpdate(); - return this; - } - - public VideoAnalyzer apply() { - this.innerObject = serviceManager.serviceClient() - .getVideoAnalyzers() - .update(resourceGroupName, accountName, updateParameters, Context.NONE); - return this; - } - - public VideoAnalyzer apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getVideoAnalyzers() - .update(resourceGroupName, accountName, updateParameters, context); - return this; - } - - VideoAnalyzerImpl(VideoAnalyzerInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "videoAnalyzers"); - } - - public VideoAnalyzer refresh() { - this.innerObject = serviceManager.serviceClient() - .getVideoAnalyzers() - .getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE) - .getValue(); - return this; - } - - public VideoAnalyzer refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getVideoAnalyzers() - .getByResourceGroupWithResponse(resourceGroupName, accountName, context) - .getValue(); - return this; - } - - public VideoAnalyzerImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public VideoAnalyzerImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public VideoAnalyzerImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateParameters.withTags(tags); - return this; - } - } - - public VideoAnalyzerImpl withIdentity(VideoAnalyzerIdentity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateParameters.withIdentity(identity); - return this; - } - } - - public VideoAnalyzerImpl withStorageAccounts(List storageAccounts) { - if (isInCreateMode()) { - this.innerModel().withStorageAccounts(storageAccounts); - return this; - } else { - this.updateParameters.withStorageAccounts(storageAccounts); - return this; - } - } - - public VideoAnalyzerImpl withEncryption(AccountEncryption encryption) { - if (isInCreateMode()) { - this.innerModel().withEncryption(encryption); - return this; - } else { - this.updateParameters.withEncryption(encryption); - return this; - } - } - - public VideoAnalyzerImpl withIotHubs(List iotHubs) { - if (isInCreateMode()) { - this.innerModel().withIotHubs(iotHubs); - return this; - } else { - this.updateParameters.withIotHubs(iotHubs); - return this; - } - } - - public VideoAnalyzerImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - if (isInCreateMode()) { - this.innerModel().withPublicNetworkAccess(publicNetworkAccess); - return this; - } else { - this.updateParameters.withPublicNetworkAccess(publicNetworkAccess); - return this; - } - } - - public VideoAnalyzerImpl withNetworkAccessControl(NetworkAccessControl networkAccessControl) { - if (isInCreateMode()) { - this.innerModel().withNetworkAccessControl(networkAccessControl); - return this; - } else { - this.updateParameters.withNetworkAccessControl(networkAccessControl); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerManagementClientBuilder.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerManagementClientBuilder.java deleted file mode 100644 index 992ae5d1f75e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerManagementClientBuilder.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** A builder for creating a new instance of the VideoAnalyzerManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = { VideoAnalyzerManagementClientImpl.class }) -public final class VideoAnalyzerManagementClientBuilder { - /* - * The ID of the target subscription. - */ - private String subscriptionId; - - /** - * Sets The ID of the target subscription. - * - * @param subscriptionId the subscriptionId value. - * @return the VideoAnalyzerManagementClientBuilder. - */ - public VideoAnalyzerManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the VideoAnalyzerManagementClientBuilder. - */ - public VideoAnalyzerManagementClientBuilder 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 VideoAnalyzerManagementClientBuilder. - */ - public VideoAnalyzerManagementClientBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the VideoAnalyzerManagementClientBuilder. - */ - public VideoAnalyzerManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the VideoAnalyzerManagementClientBuilder. - */ - public VideoAnalyzerManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the VideoAnalyzerManagementClientBuilder. - */ - public VideoAnalyzerManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of VideoAnalyzerManagementClientImpl with the provided parameters. - * - * @return an instance of VideoAnalyzerManagementClientImpl. - */ - public VideoAnalyzerManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } - VideoAnalyzerManagementClientImpl client = new VideoAnalyzerManagementClientImpl(pipeline, serializerAdapter, - defaultPollInterval, environment, subscriptionId, endpoint); - return client; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerManagementClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerManagementClientImpl.java deleted file mode 100644 index d53a6b1a314a..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerManagementClientImpl.java +++ /dev/null @@ -1,495 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.videoanalyzer.fluent.AccessPoliciesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.EdgeModulesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.LivePipelineOperationStatusesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.LivePipelinesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.LocationsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.OperationResultsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.OperationStatusesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.OperationsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.PipelineJobOperationStatusesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.PipelineJobsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.PipelineTopologiesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzerManagementClient; -import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzerOperationResultsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzerOperationStatusesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzersClient; -import com.azure.resourcemanager.videoanalyzer.fluent.VideosClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** Initializes a new instance of the VideoAnalyzerManagementClientImpl type. */ -@ServiceClient(builder = VideoAnalyzerManagementClientBuilder.class) -public final class VideoAnalyzerManagementClientImpl implements VideoAnalyzerManagementClient { - /** The ID of the target subscription. */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** server parameter. */ - private final String endpoint; - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** Api Version. */ - private final String apiVersion; - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** The HTTP pipeline to send requests through. */ - private final HttpPipeline httpPipeline; - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - public HttpPipeline getHttpPipeline() { - return this.httpPipeline; - } - - /** The serializer to serialize an object into a string. */ - private final SerializerAdapter serializerAdapter; - - /** - * Gets The serializer to serialize an object into a string. - * - * @return the serializerAdapter value. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** The default poll interval for long-running operation. */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** The EdgeModulesClient object to access its operations. */ - private final EdgeModulesClient edgeModules; - - /** - * Gets the EdgeModulesClient object to access its operations. - * - * @return the EdgeModulesClient object. - */ - public EdgeModulesClient getEdgeModules() { - return this.edgeModules; - } - - /** The PipelineTopologiesClient object to access its operations. */ - private final PipelineTopologiesClient pipelineTopologies; - - /** - * Gets the PipelineTopologiesClient object to access its operations. - * - * @return the PipelineTopologiesClient object. - */ - public PipelineTopologiesClient getPipelineTopologies() { - return this.pipelineTopologies; - } - - /** The LivePipelinesClient object to access its operations. */ - private final LivePipelinesClient livePipelines; - - /** - * Gets the LivePipelinesClient object to access its operations. - * - * @return the LivePipelinesClient object. - */ - public LivePipelinesClient getLivePipelines() { - return this.livePipelines; - } - - /** The PipelineJobsClient object to access its operations. */ - private final PipelineJobsClient pipelineJobs; - - /** - * Gets the PipelineJobsClient object to access its operations. - * - * @return the PipelineJobsClient object. - */ - public PipelineJobsClient getPipelineJobs() { - return this.pipelineJobs; - } - - /** The LivePipelineOperationStatusesClient object to access its operations. */ - private final LivePipelineOperationStatusesClient livePipelineOperationStatuses; - - /** - * Gets the LivePipelineOperationStatusesClient object to access its operations. - * - * @return the LivePipelineOperationStatusesClient object. - */ - public LivePipelineOperationStatusesClient getLivePipelineOperationStatuses() { - return this.livePipelineOperationStatuses; - } - - /** The PipelineJobOperationStatusesClient object to access its operations. */ - private final PipelineJobOperationStatusesClient pipelineJobOperationStatuses; - - /** - * Gets the PipelineJobOperationStatusesClient object to access its operations. - * - * @return the PipelineJobOperationStatusesClient object. - */ - public PipelineJobOperationStatusesClient getPipelineJobOperationStatuses() { - return this.pipelineJobOperationStatuses; - } - - /** The OperationsClient object to access its operations. */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** The VideoAnalyzersClient object to access its operations. */ - private final VideoAnalyzersClient videoAnalyzers; - - /** - * Gets the VideoAnalyzersClient object to access its operations. - * - * @return the VideoAnalyzersClient object. - */ - public VideoAnalyzersClient getVideoAnalyzers() { - return this.videoAnalyzers; - } - - /** The PrivateLinkResourcesClient object to access its operations. */ - private final PrivateLinkResourcesClient privateLinkResources; - - /** - * Gets the PrivateLinkResourcesClient object to access its operations. - * - * @return the PrivateLinkResourcesClient object. - */ - public PrivateLinkResourcesClient getPrivateLinkResources() { - return this.privateLinkResources; - } - - /** The PrivateEndpointConnectionsClient object to access its operations. */ - private final PrivateEndpointConnectionsClient privateEndpointConnections; - - /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. - * - * @return the PrivateEndpointConnectionsClient object. - */ - public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** The OperationStatusesClient object to access its operations. */ - private final OperationStatusesClient operationStatuses; - - /** - * Gets the OperationStatusesClient object to access its operations. - * - * @return the OperationStatusesClient object. - */ - public OperationStatusesClient getOperationStatuses() { - return this.operationStatuses; - } - - /** The OperationResultsClient object to access its operations. */ - private final OperationResultsClient operationResults; - - /** - * Gets the OperationResultsClient object to access its operations. - * - * @return the OperationResultsClient object. - */ - public OperationResultsClient getOperationResults() { - return this.operationResults; - } - - /** The VideoAnalyzerOperationStatusesClient object to access its operations. */ - private final VideoAnalyzerOperationStatusesClient videoAnalyzerOperationStatuses; - - /** - * Gets the VideoAnalyzerOperationStatusesClient object to access its operations. - * - * @return the VideoAnalyzerOperationStatusesClient object. - */ - public VideoAnalyzerOperationStatusesClient getVideoAnalyzerOperationStatuses() { - return this.videoAnalyzerOperationStatuses; - } - - /** The VideoAnalyzerOperationResultsClient object to access its operations. */ - private final VideoAnalyzerOperationResultsClient videoAnalyzerOperationResults; - - /** - * Gets the VideoAnalyzerOperationResultsClient object to access its operations. - * - * @return the VideoAnalyzerOperationResultsClient object. - */ - public VideoAnalyzerOperationResultsClient getVideoAnalyzerOperationResults() { - return this.videoAnalyzerOperationResults; - } - - /** The LocationsClient object to access its operations. */ - private final LocationsClient locations; - - /** - * Gets the LocationsClient object to access its operations. - * - * @return the LocationsClient object. - */ - public LocationsClient getLocations() { - return this.locations; - } - - /** The VideosClient object to access its operations. */ - private final VideosClient videos; - - /** - * Gets the VideosClient object to access its operations. - * - * @return the VideosClient object. - */ - public VideosClient getVideos() { - return this.videos; - } - - /** The AccessPoliciesClient object to access its operations. */ - private final AccessPoliciesClient accessPolicies; - - /** - * Gets the AccessPoliciesClient object to access its operations. - * - * @return the AccessPoliciesClient object. - */ - public AccessPoliciesClient getAccessPolicies() { - return this.accessPolicies; - } - - /** - * Initializes an instance of VideoAnalyzerManagementClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param defaultPollInterval The default poll interval for long-running operation. - * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. - * @param endpoint server parameter. - */ - VideoAnalyzerManagementClientImpl(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 = "2021-11-01-preview"; - this.edgeModules = new EdgeModulesClientImpl(this); - this.pipelineTopologies = new PipelineTopologiesClientImpl(this); - this.livePipelines = new LivePipelinesClientImpl(this); - this.pipelineJobs = new PipelineJobsClientImpl(this); - this.livePipelineOperationStatuses = new LivePipelineOperationStatusesClientImpl(this); - this.pipelineJobOperationStatuses = new PipelineJobOperationStatusesClientImpl(this); - this.operations = new OperationsClientImpl(this); - this.videoAnalyzers = new VideoAnalyzersClientImpl(this); - this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); - this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); - this.operationStatuses = new OperationStatusesClientImpl(this); - this.operationResults = new OperationResultsClientImpl(this); - this.videoAnalyzerOperationStatuses = new VideoAnalyzerOperationStatusesClientImpl(this); - this.videoAnalyzerOperationResults = new VideoAnalyzerOperationResultsClientImpl(this); - this.locations = new LocationsClientImpl(this); - this.videos = new VideosClientImpl(this); - this.accessPolicies = new AccessPoliciesClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - return CoreUtils.mergeContexts(this.getContext(), context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult(Mono>> activationResponse, - HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { - return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, activationResponse, context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), - lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = this.getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - LOGGER.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(s); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VideoAnalyzerManagementClientImpl.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationResultsClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationResultsClientImpl.java deleted file mode 100644 index 125563ebaf77..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationResultsClientImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzerOperationResultsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in VideoAnalyzerOperationResultsClient. */ -public final class VideoAnalyzerOperationResultsClientImpl implements VideoAnalyzerOperationResultsClient { - /** The proxy service used to perform REST calls. */ - private final VideoAnalyzerOperationResultsService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of VideoAnalyzerOperationResultsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - VideoAnalyzerOperationResultsClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service = RestProxy.create(VideoAnalyzerOperationResultsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientVideoAnalyzerOperationResults to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface VideoAnalyzerOperationResultsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}" - + "/videoAnalyzerOperationResults/{operationId}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, - @PathParam("operationId") String operationId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get video analyzer operation result. - * - * @param locationName Location name. - * @param operationId Operation Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video analyzer operation result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String locationName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - locationName, operationId, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get video analyzer operation result. - * - * @param locationName Location name. - * @param operationId Operation Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video analyzer operation result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String locationName, String operationId, - 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), locationName, operationId, - this.client.getApiVersion(), accept, context); - } - - /** - * Get video analyzer operation result. - * - * @param locationName Location name. - * @param operationId Operation Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video analyzer operation result on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String locationName, String operationId) { - return getWithResponseAsync(locationName, operationId).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get video analyzer operation result. - * - * @param locationName Location name. - * @param operationId Operation Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video analyzer operation result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VideoAnalyzerInner get(String locationName, String operationId) { - return getAsync(locationName, operationId).block(); - } - - /** - * Get video analyzer operation result. - * - * @param locationName Location name. - * @param operationId Operation Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video analyzer operation result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String locationName, String operationId, Context context) { - return getWithResponseAsync(locationName, operationId, context).block(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationResultsImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationResultsImpl.java deleted file mode 100644 index 06c0810fb858..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationResultsImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.VideoAnalyzerOperationResultsClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzer; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerOperationResults; - -public final class VideoAnalyzerOperationResultsImpl implements VideoAnalyzerOperationResults { - private static final ClientLogger LOGGER = new ClientLogger(VideoAnalyzerOperationResultsImpl.class); - - private final VideoAnalyzerOperationResultsClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public VideoAnalyzerOperationResultsImpl(VideoAnalyzerOperationResultsClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public VideoAnalyzer get(String locationName, String operationId) { - VideoAnalyzerInner inner = this.serviceClient().get(locationName, operationId); - if (inner != null) { - return new VideoAnalyzerImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String locationName, String operationId, Context context) { - Response inner = this.serviceClient().getWithResponse(locationName, operationId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VideoAnalyzerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private VideoAnalyzerOperationResultsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusImpl.java deleted file mode 100644 index 7d7689679a1f..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.management.exception.ManagementError; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerOperationStatusInner; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerOperationStatus; - -public final class VideoAnalyzerOperationStatusImpl implements VideoAnalyzerOperationStatus { - private VideoAnalyzerOperationStatusInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - VideoAnalyzerOperationStatusImpl(VideoAnalyzerOperationStatusInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public String id() { - return this.innerModel().id(); - } - - public String startTime() { - return this.innerModel().startTime(); - } - - public String endTime() { - return this.innerModel().endTime(); - } - - public String status() { - return this.innerModel().status(); - } - - public ManagementError error() { - return this.innerModel().error(); - } - - public VideoAnalyzerOperationStatusInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusesClientImpl.java deleted file mode 100644 index 2f9156f408a3..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusesClientImpl.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzerOperationStatusesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerOperationStatusInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in VideoAnalyzerOperationStatusesClient. */ -public final class VideoAnalyzerOperationStatusesClientImpl implements VideoAnalyzerOperationStatusesClient { - /** The proxy service used to perform REST calls. */ - private final VideoAnalyzerOperationStatusesService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of VideoAnalyzerOperationStatusesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - VideoAnalyzerOperationStatusesClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service = RestProxy.create(VideoAnalyzerOperationStatusesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientVideoAnalyzerOperationStatuses to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface VideoAnalyzerOperationStatusesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}" - + "/videoAnalyzerOperationStatuses/{operationId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, - @PathParam("operationId") String operationId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get video analyzer operation status. - * - * @param locationName Location name. - * @param operationId Operation Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video analyzer operation status along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String locationName, - String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - locationName, operationId, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get video analyzer operation status. - * - * @param locationName Location name. - * @param operationId Operation Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video analyzer operation status along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String locationName, - String operationId, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), locationName, operationId, - this.client.getApiVersion(), accept, context); - } - - /** - * Get video analyzer operation status. - * - * @param locationName Location name. - * @param operationId Operation Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video analyzer operation status on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String locationName, String operationId) { - return getWithResponseAsync(locationName, operationId).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get video analyzer operation status. - * - * @param locationName Location name. - * @param operationId Operation Id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video analyzer operation status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VideoAnalyzerOperationStatusInner get(String locationName, String operationId) { - return getAsync(locationName, operationId).block(); - } - - /** - * Get video analyzer operation status. - * - * @param locationName Location name. - * @param operationId Operation Id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video analyzer operation status along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String locationName, String operationId, - Context context) { - return getWithResponseAsync(locationName, operationId, context).block(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusesImpl.java deleted file mode 100644 index 632ee4073a29..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusesImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.VideoAnalyzerOperationStatusesClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerOperationStatusInner; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerOperationStatus; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerOperationStatuses; - -public final class VideoAnalyzerOperationStatusesImpl implements VideoAnalyzerOperationStatuses { - private static final ClientLogger LOGGER = new ClientLogger(VideoAnalyzerOperationStatusesImpl.class); - - private final VideoAnalyzerOperationStatusesClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public VideoAnalyzerOperationStatusesImpl(VideoAnalyzerOperationStatusesClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public VideoAnalyzerOperationStatus get(String locationName, String operationId) { - VideoAnalyzerOperationStatusInner inner = this.serviceClient().get(locationName, operationId); - if (inner != null) { - return new VideoAnalyzerOperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String locationName, String operationId, - Context context) { - Response inner - = this.serviceClient().getWithResponse(locationName, operationId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VideoAnalyzerOperationStatusImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private VideoAnalyzerOperationStatusesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerPrivateEndpointConnectionOperationStatusImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerPrivateEndpointConnectionOperationStatusImpl.java deleted file mode 100644 index 31612b99f641..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerPrivateEndpointConnectionOperationStatusImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.management.exception.ManagementError; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerPrivateEndpointConnectionOperationStatusInner; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerPrivateEndpointConnectionOperationStatus; - -public final class VideoAnalyzerPrivateEndpointConnectionOperationStatusImpl - implements VideoAnalyzerPrivateEndpointConnectionOperationStatus { - private VideoAnalyzerPrivateEndpointConnectionOperationStatusInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - VideoAnalyzerPrivateEndpointConnectionOperationStatusImpl( - VideoAnalyzerPrivateEndpointConnectionOperationStatusInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public String id() { - return this.innerModel().id(); - } - - public String startTime() { - return this.innerModel().startTime(); - } - - public String endTime() { - return this.innerModel().endTime(); - } - - public String status() { - return this.innerModel().status(); - } - - public ManagementError error() { - return this.innerModel().error(); - } - - public VideoAnalyzerPrivateEndpointConnectionOperationStatusInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzersClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzersClientImpl.java deleted file mode 100644 index 24b1f6bfff4e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzersClientImpl.java +++ /dev/null @@ -1,1011 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzersClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerCollectionInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerUpdate; -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 VideoAnalyzersClient. */ -public final class VideoAnalyzersClientImpl implements VideoAnalyzersClient { - /** The proxy service used to perform REST calls. */ - private final VideoAnalyzersService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of VideoAnalyzersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - VideoAnalyzersClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service - = RestProxy.create(VideoAnalyzersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientVideoAnalyzers to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface VideoAnalyzersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") VideoAnalyzerInner parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") VideoAnalyzerUpdate parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Media/videoAnalyzers") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscription(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists the Video Analyzer accounts in the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoAnalyzer items along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.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.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists the Video Analyzer accounts in the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoAnalyzer items along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, - 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.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context); - } - - /** - * Lists the Video Analyzer accounts in the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoAnalyzer items on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String resourceGroupName) { - return listWithResponseAsync(resourceGroupName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Lists the Video Analyzer accounts in the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoAnalyzer items. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VideoAnalyzerCollectionInner list(String resourceGroupName) { - return listAsync(resourceGroupName).block(); - } - - /** - * Lists the Video Analyzer accounts in the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoAnalyzer items along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String resourceGroupName, Context context) { - return listWithResponseAsync(resourceGroupName, context).block(); - } - - /** - * Get the details of the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified Video Analyzer account along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String accountName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the details of the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified Video Analyzer account along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String accountName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the details of the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified Video Analyzer account on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, accountName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the details of the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VideoAnalyzerInner getByResourceGroup(String resourceGroupName, String accountName) { - return getByResourceGroupAsync(resourceGroupName, accountName).block(); - } - - /** - * Get the details of the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified Video Analyzer account along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, accountName, context).block(); - } - - /** - * Create or update an instance of a Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Video Analyzer account along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, VideoAnalyzerInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update an instance of a Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Video Analyzer account along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, VideoAnalyzerInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Create or update an instance of a Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VideoAnalyzerInner> - beginCreateOrUpdateAsync(String resourceGroupName, String accountName, VideoAnalyzerInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, accountName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VideoAnalyzerInner.class, VideoAnalyzerInner.class, this.client.getContext()); - } - - /** - * Create or update an instance of a Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VideoAnalyzerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String accountName, VideoAnalyzerInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, accountName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VideoAnalyzerInner.class, VideoAnalyzerInner.class, context); - } - - /** - * Create or update an instance of a Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VideoAnalyzerInner> beginCreateOrUpdate(String resourceGroupName, - String accountName, VideoAnalyzerInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, parameters).getSyncPoller(); - } - - /** - * Create or update an instance of a Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VideoAnalyzerInner> beginCreateOrUpdate(String resourceGroupName, - String accountName, VideoAnalyzerInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, parameters, context).getSyncPoller(); - } - - /** - * Create or update an instance of a Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Video Analyzer account on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, - VideoAnalyzerInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update an instance of a Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Video Analyzer account on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, - VideoAnalyzerInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update an instance of a Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VideoAnalyzerInner createOrUpdate(String resourceGroupName, String accountName, - VideoAnalyzerInner parameters) { - return createOrUpdateAsync(resourceGroupName, accountName, parameters).block(); - } - - /** - * Create or update an instance of a Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VideoAnalyzerInner createOrUpdate(String resourceGroupName, String accountName, - VideoAnalyzerInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, accountName, parameters, context).block(); - } - - /** - * Delete the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName) { - return deleteWithResponseAsync(resourceGroupName, accountName).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName) { - deleteAsync(resourceGroupName, accountName).block(); - } - - /** - * Delete the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String accountName, Context context) { - return deleteWithResponseAsync(resourceGroupName, accountName, context).block(); - } - - /** - * Updates an existing instance of Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Video Analyzer account along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, - VideoAnalyzerUpdate 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates an existing instance of Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Video Analyzer account along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, - VideoAnalyzerUpdate 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Updates an existing instance of Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VideoAnalyzerInner> beginUpdateAsync(String resourceGroupName, - String accountName, VideoAnalyzerUpdate parameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, accountName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VideoAnalyzerInner.class, VideoAnalyzerInner.class, this.client.getContext()); - } - - /** - * Updates an existing instance of Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VideoAnalyzerInner> beginUpdateAsync(String resourceGroupName, - String accountName, VideoAnalyzerUpdate parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, accountName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - VideoAnalyzerInner.class, VideoAnalyzerInner.class, context); - } - - /** - * Updates an existing instance of Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VideoAnalyzerInner> beginUpdate(String resourceGroupName, - String accountName, VideoAnalyzerUpdate parameters) { - return beginUpdateAsync(resourceGroupName, accountName, parameters).getSyncPoller(); - } - - /** - * Updates an existing instance of Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VideoAnalyzerInner> beginUpdate(String resourceGroupName, - String accountName, VideoAnalyzerUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, accountName, parameters, context).getSyncPoller(); - } - - /** - * Updates an existing instance of Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Video Analyzer account on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, - VideoAnalyzerUpdate parameters) { - return beginUpdateAsync(resourceGroupName, accountName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates an existing instance of Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Video Analyzer account on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, - VideoAnalyzerUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, accountName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates an existing instance of Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VideoAnalyzerInner update(String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters) { - return updateAsync(resourceGroupName, accountName, parameters).block(); - } - - /** - * Updates an existing instance of Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VideoAnalyzerInner update(String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters, - Context context) { - return updateAsync(resourceGroupName, accountName, parameters, context).block(); - } - - /** - * List all Video Analyzer accounts 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 a collection of VideoAnalyzer items along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required 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.listBySubscription(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all Video Analyzer accounts in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoAnalyzer items along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionWithResponseAsync(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.listBySubscription(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context); - } - - /** - * List all Video Analyzer accounts 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 a collection of VideoAnalyzer items on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listBySubscriptionAsync() { - return listBySubscriptionWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List all Video Analyzer accounts 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 a collection of VideoAnalyzer items. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VideoAnalyzerCollectionInner listBySubscription() { - return listBySubscriptionAsync().block(); - } - - /** - * List all Video Analyzer accounts in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoAnalyzer items along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listBySubscriptionWithResponse(Context context) { - return listBySubscriptionWithResponseAsync(context).block(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzersImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzersImpl.java deleted file mode 100644 index ce76e16349a8..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzersImpl.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.VideoAnalyzersClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerCollectionInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzer; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerCollection; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzers; - -public final class VideoAnalyzersImpl implements VideoAnalyzers { - private static final ClientLogger LOGGER = new ClientLogger(VideoAnalyzersImpl.class); - - private final VideoAnalyzersClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public VideoAnalyzersImpl(VideoAnalyzersClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public VideoAnalyzerCollection list(String resourceGroupName) { - VideoAnalyzerCollectionInner inner = this.serviceClient().list(resourceGroupName); - if (inner != null) { - return new VideoAnalyzerCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listWithResponse(String resourceGroupName, Context context) { - Response inner - = this.serviceClient().listWithResponse(resourceGroupName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VideoAnalyzerCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public VideoAnalyzer getByResourceGroup(String resourceGroupName, String accountName) { - VideoAnalyzerInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, accountName); - if (inner != null) { - return new VideoAnalyzerImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, accountName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VideoAnalyzerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String accountName) { - this.serviceClient().delete(resourceGroupName, accountName); - } - - public Response deleteWithResponse(String resourceGroupName, String accountName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, context); - } - - public VideoAnalyzerCollection listBySubscription() { - VideoAnalyzerCollectionInner inner = this.serviceClient().listBySubscription(); - if (inner != null) { - return new VideoAnalyzerCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listBySubscriptionWithResponse(Context context) { - Response inner = this.serviceClient().listBySubscriptionWithResponse(context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VideoAnalyzerCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public VideoAnalyzer 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, accountName, 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, accountName, 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - this.deleteWithResponse(resourceGroupName, accountName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - return this.deleteWithResponse(resourceGroupName, accountName, context); - } - - private VideoAnalyzersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } - - public VideoAnalyzerImpl define(String name) { - return new VideoAnalyzerImpl(name, this.manager()); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoContentTokenImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoContentTokenImpl.java deleted file mode 100644 index cd8cdecac010..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoContentTokenImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoContentTokenInner; -import com.azure.resourcemanager.videoanalyzer.models.VideoContentToken; -import java.time.OffsetDateTime; - -public final class VideoContentTokenImpl implements VideoContentToken { - private VideoContentTokenInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - VideoContentTokenImpl(VideoContentTokenInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public OffsetDateTime expirationDate() { - return this.innerModel().expirationDate(); - } - - public String token() { - return this.innerModel().token(); - } - - public VideoContentTokenInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoEntityImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoEntityImpl.java deleted file mode 100644 index f786af7f8b5b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoEntityImpl.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoEntityInner; -import com.azure.resourcemanager.videoanalyzer.models.VideoArchival; -import com.azure.resourcemanager.videoanalyzer.models.VideoContentToken; -import com.azure.resourcemanager.videoanalyzer.models.VideoContentUrls; -import com.azure.resourcemanager.videoanalyzer.models.VideoEntity; -import com.azure.resourcemanager.videoanalyzer.models.VideoFlags; -import com.azure.resourcemanager.videoanalyzer.models.VideoMediaInfo; -import com.azure.resourcemanager.videoanalyzer.models.VideoType; - -public final class VideoEntityImpl implements VideoEntity, VideoEntity.Definition, VideoEntity.Update { - private VideoEntityInner innerObject; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String title() { - return this.innerModel().title(); - } - - public String description() { - return this.innerModel().description(); - } - - public VideoType typePropertiesType() { - return this.innerModel().typePropertiesType(); - } - - public VideoFlags flags() { - return this.innerModel().flags(); - } - - public VideoContentUrls contentUrls() { - return this.innerModel().contentUrls(); - } - - public VideoMediaInfo mediaInfo() { - return this.innerModel().mediaInfo(); - } - - public VideoArchival archival() { - return this.innerModel().archival(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public VideoEntityInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String videoName; - - public VideoEntityImpl withExistingVideoAnalyzer(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public VideoEntity create() { - this.innerObject = serviceManager.serviceClient() - .getVideos() - .createOrUpdateWithResponse(resourceGroupName, accountName, videoName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public VideoEntity create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getVideos() - .createOrUpdateWithResponse(resourceGroupName, accountName, videoName, this.innerModel(), context) - .getValue(); - return this; - } - - VideoEntityImpl(String name, com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = new VideoEntityInner(); - this.serviceManager = serviceManager; - this.videoName = name; - } - - public VideoEntityImpl update() { - return this; - } - - public VideoEntity apply() { - this.innerObject = serviceManager.serviceClient() - .getVideos() - .updateWithResponse(resourceGroupName, accountName, videoName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public VideoEntity apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getVideos() - .updateWithResponse(resourceGroupName, accountName, videoName, this.innerModel(), context) - .getValue(); - return this; - } - - VideoEntityImpl(VideoEntityInner innerObject, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "videoAnalyzers"); - this.videoName = Utils.getValueFromIdByName(innerObject.id(), "videos"); - } - - public VideoEntity refresh() { - this.innerObject = serviceManager.serviceClient() - .getVideos() - .getWithResponse(resourceGroupName, accountName, videoName, Context.NONE) - .getValue(); - return this; - } - - public VideoEntity refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getVideos() - .getWithResponse(resourceGroupName, accountName, videoName, context) - .getValue(); - return this; - } - - public VideoContentToken listContentToken() { - return serviceManager.videos().listContentToken(resourceGroupName, accountName, videoName); - } - - public Response listContentTokenWithResponse(Context context) { - return serviceManager.videos().listContentTokenWithResponse(resourceGroupName, accountName, videoName, context); - } - - public VideoEntityImpl withTitle(String title) { - this.innerModel().withTitle(title); - return this; - } - - public VideoEntityImpl withDescription(String description) { - this.innerModel().withDescription(description); - return this; - } - - public VideoEntityImpl withMediaInfo(VideoMediaInfo mediaInfo) { - this.innerModel().withMediaInfo(mediaInfo); - return this; - } - - public VideoEntityImpl withArchival(VideoArchival archival) { - this.innerModel().withArchival(archival); - return this; - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideosClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideosClientImpl.java deleted file mode 100644 index 3b0cb9f62f35..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideosClientImpl.java +++ /dev/null @@ -1,1054 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.videoanalyzer.fluent.VideosClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoContentTokenInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoEntityInner; -import com.azure.resourcemanager.videoanalyzer.models.VideoEntityCollection; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in VideosClient. */ -public final class VideosClientImpl implements VideosClient { - /** The proxy service used to perform REST calls. */ - private final VideosService service; - - /** The service client containing this operation class. */ - private final VideoAnalyzerManagementClientImpl client; - - /** - * Initializes an instance of VideosClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - VideosClientImpl(VideoAnalyzerManagementClientImpl client) { - this.service = RestProxy.create(VideosService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for VideoAnalyzerManagementClientVideos to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "VideoAnalyzerManagem") - private interface VideosService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/videos") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @QueryParam("$top") Integer top, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/videos/{videoName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("videoName") String videoName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/videos/{videoName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("videoName") String videoName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") VideoEntityInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/videos/{videoName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("videoName") String videoName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/videos/{videoName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("videoName") String videoName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") VideoEntityInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/videos/{videoName}/listContentToken") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listContentToken(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("videoName") String videoName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Retrieves a list of video resources that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoEntity items along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String accountName, - Integer top) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), top, 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())); - } - - /** - * Retrieves a list of video resources that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoEntity items along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String accountName, - Integer top, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), top, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Retrieves a list of video resources that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoEntity items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, Integer top) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Retrieves a list of video resources that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoEntity items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName) { - final Integer top = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, top), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Retrieves a list of video resources that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoEntity items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, Integer top, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, top, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Retrieves a list of video resources that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoEntity items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName) { - final Integer top = null; - return new PagedIterable<>(listAsync(resourceGroupName, accountName, top)); - } - - /** - * Retrieves a list of video resources that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoEntity items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, Integer top, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, top, context)); - } - - /** - * Retrieves an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String videoName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (videoName == null) { - return Mono.error(new IllegalArgumentException("Parameter videoName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, videoName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieves an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String videoName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (videoName == null) { - return Mono.error(new IllegalArgumentException("Parameter videoName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - videoName, this.client.getApiVersion(), accept, context); - } - - /** - * Retrieves an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String videoName) { - return getWithResponseAsync(resourceGroupName, accountName, videoName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Retrieves an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VideoEntityInner get(String resourceGroupName, String accountName, String videoName) { - return getAsync(resourceGroupName, accountName, videoName).block(); - } - - /** - * Retrieves an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, String videoName, - Context context) { - return getWithResponseAsync(resourceGroupName, accountName, videoName, context).block(); - } - - /** - * Creates a new video resource or updates an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String videoName, VideoEntityInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (videoName == null) { - return Mono.error(new IllegalArgumentException("Parameter videoName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, videoName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a new video resource or updates an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String videoName, VideoEntityInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (videoName == null) { - return Mono.error(new IllegalArgumentException("Parameter videoName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, videoName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Creates a new video resource or updates an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, String videoName, - VideoEntityInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, videoName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates a new video resource or updates an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VideoEntityInner createOrUpdate(String resourceGroupName, String accountName, String videoName, - VideoEntityInner parameters) { - return createOrUpdateAsync(resourceGroupName, accountName, videoName, parameters).block(); - } - - /** - * Creates a new video resource or updates an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String accountName, - String videoName, VideoEntityInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, videoName, parameters, context).block(); - } - - /** - * Deletes an existing video resource and its underlying data. This operation is irreversible. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String videoName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (videoName == null) { - return Mono.error(new IllegalArgumentException("Parameter videoName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, videoName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes an existing video resource and its underlying data. This operation is irreversible. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, String videoName, - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (videoName == null) { - return Mono.error(new IllegalArgumentException("Parameter videoName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, videoName, this.client.getApiVersion(), accept, context); - } - - /** - * Deletes an existing video resource and its underlying data. This operation is irreversible. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String videoName) { - return deleteWithResponseAsync(resourceGroupName, accountName, videoName).flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes an existing video resource and its underlying data. This operation is irreversible. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String videoName) { - deleteAsync(resourceGroupName, accountName, videoName).block(); - } - - /** - * Deletes an existing video resource and its underlying data. This operation is irreversible. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String accountName, String videoName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, accountName, videoName, context).block(); - } - - /** - * Updates individual properties of an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String accountName, - String videoName, VideoEntityInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (videoName == null) { - return Mono.error(new IllegalArgumentException("Parameter videoName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, videoName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates individual properties of an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String accountName, - String videoName, VideoEntityInner 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (videoName == null) { - return Mono.error(new IllegalArgumentException("Parameter videoName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, videoName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Updates individual properties of an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, String videoName, - VideoEntityInner parameters) { - return updateWithResponseAsync(resourceGroupName, accountName, videoName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Updates individual properties of an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VideoEntityInner update(String resourceGroupName, String accountName, String videoName, - VideoEntityInner parameters) { - return updateAsync(resourceGroupName, accountName, videoName, parameters).block(); - } - - /** - * Updates individual properties of an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String accountName, String videoName, - VideoEntityInner parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, accountName, videoName, parameters, context).block(); - } - - /** - * Generates a streaming token which can be used for accessing content from video content URLs, for a video resource - * with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return "Video content token grants access to the video content URLs." along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listContentTokenWithResponseAsync(String resourceGroupName, - String accountName, String videoName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (videoName == null) { - return Mono.error(new IllegalArgumentException("Parameter videoName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listContentToken(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, videoName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Generates a streaming token which can be used for accessing content from video content URLs, for a video resource - * with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return "Video content token grants access to the video content URLs." along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listContentTokenWithResponseAsync(String resourceGroupName, - String accountName, String videoName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (videoName == null) { - return Mono.error(new IllegalArgumentException("Parameter videoName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listContentToken(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, videoName, this.client.getApiVersion(), accept, context); - } - - /** - * Generates a streaming token which can be used for accessing content from video content URLs, for a video resource - * with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return "Video content token grants access to the video content URLs." on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listContentTokenAsync(String resourceGroupName, String accountName, - String videoName) { - return listContentTokenWithResponseAsync(resourceGroupName, accountName, videoName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Generates a streaming token which can be used for accessing content from video content URLs, for a video resource - * with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return "Video content token grants access to the video content URLs.". - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VideoContentTokenInner listContentToken(String resourceGroupName, String accountName, String videoName) { - return listContentTokenAsync(resourceGroupName, accountName, videoName).block(); - } - - /** - * Generates a streaming token which can be used for accessing content from video content URLs, for a video resource - * with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return "Video content token grants access to the video content URLs." along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listContentTokenWithResponse(String resourceGroupName, String accountName, - String videoName, Context context) { - return listContentTokenWithResponseAsync(resourceGroupName, accountName, videoName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoEntity items along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoEntity items along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideosImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideosImpl.java deleted file mode 100644 index 109fbcba5d2f..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideosImpl.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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.videoanalyzer.fluent.VideosClient; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoContentTokenInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoEntityInner; -import com.azure.resourcemanager.videoanalyzer.models.VideoContentToken; -import com.azure.resourcemanager.videoanalyzer.models.VideoEntity; -import com.azure.resourcemanager.videoanalyzer.models.Videos; - -public final class VideosImpl implements Videos { - private static final ClientLogger LOGGER = new ClientLogger(VideosImpl.class); - - private final VideosClient innerClient; - - private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - - public VideosImpl(VideosClient innerClient, - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new VideoEntityImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, Integer top, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, top, context); - return Utils.mapPage(inner, inner1 -> new VideoEntityImpl(inner1, this.manager())); - } - - public VideoEntity get(String resourceGroupName, String accountName, String videoName) { - VideoEntityInner inner = this.serviceClient().get(resourceGroupName, accountName, videoName); - if (inner != null) { - return new VideoEntityImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String accountName, String videoName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, videoName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VideoEntityImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String videoName) { - this.serviceClient().delete(resourceGroupName, accountName, videoName); - } - - public Response deleteWithResponse(String resourceGroupName, String accountName, String videoName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, videoName, context); - } - - public VideoContentToken listContentToken(String resourceGroupName, String accountName, String videoName) { - VideoContentTokenInner inner = this.serviceClient().listContentToken(resourceGroupName, accountName, videoName); - if (inner != null) { - return new VideoContentTokenImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listContentTokenWithResponse(String resourceGroupName, String accountName, - String videoName, Context context) { - Response inner - = this.serviceClient().listContentTokenWithResponse(resourceGroupName, accountName, videoName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VideoContentTokenImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public VideoEntity 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String videoName = Utils.getValueFromIdByName(id, "videos"); - if (videoName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videos'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, videoName, 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String videoName = Utils.getValueFromIdByName(id, "videos"); - if (videoName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videos'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, videoName, 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 accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String videoName = Utils.getValueFromIdByName(id, "videos"); - if (videoName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videos'.", id))); - } - this.deleteWithResponse(resourceGroupName, accountName, videoName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); - } - String videoName = Utils.getValueFromIdByName(id, "videos"); - if (videoName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'videos'.", id))); - } - return this.deleteWithResponse(resourceGroupName, accountName, videoName, context); - } - - private VideosClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { - return this.serviceManager; - } - - public VideoEntityImpl define(String name) { - return new VideoEntityImpl(name, this.manager()); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/package-info.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/package-info.java deleted file mode 100644 index a85d799fd34f..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the implementations for VideoAnalyzerManagementClient. Azure Video Analyzer provides a platform - * for you to build intelligent video applications that span the edge and the cloud. - */ -package com.azure.resourcemanager.videoanalyzer.implementation; diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicies.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicies.java deleted file mode 100644 index e848487312f6..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicies.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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 AccessPolicies. */ -public interface AccessPolicies { - /** - * Retrieves all existing access policy resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccessPolicyEntity items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Retrieves all existing access policy resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of AccessPolicyEntity items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName, Integer top, Context context); - - /** - * Retrieves an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources. - */ - AccessPolicyEntity get(String resourceGroupName, String accountName, String accessPolicyName); - - /** - * Retrieves an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources - * along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String accountName, String accessPolicyName, - Context context); - - /** - * Deletes an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String accessPolicyName); - - /** - * Deletes an existing access policy resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The Access Policy name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String accountName, String accessPolicyName, - Context context); - - /** - * Retrieves an existing access policy resource with the given name. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources - * along with {@link Response}. - */ - AccessPolicyEntity getById(String id); - - /** - * Retrieves an existing access policy resource with the given name. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return access policies help define the authentication rules, and control access to specific video resources - * along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes an existing access policy resource with the given name. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes an existing access policy resource with the given name. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new AccessPolicyEntity resource. - * - * @param name resource name. - * @return the first stage of the new AccessPolicyEntity definition. - */ - AccessPolicyEntity.DefinitionStages.Blank define(String name); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyEccAlgo.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyEccAlgo.java deleted file mode 100644 index 26d96c579941..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyEccAlgo.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AccessPolicyEccAlgo. */ -public final class AccessPolicyEccAlgo extends ExpandableStringEnum { - /** Static value ES256 for AccessPolicyEccAlgo. */ - public static final AccessPolicyEccAlgo ES256 = fromString("ES256"); - - /** Static value ES384 for AccessPolicyEccAlgo. */ - public static final AccessPolicyEccAlgo ES384 = fromString("ES384"); - - /** Static value ES512 for AccessPolicyEccAlgo. */ - public static final AccessPolicyEccAlgo ES512 = fromString("ES512"); - - /** - * Creates or finds a AccessPolicyEccAlgo from its string representation. - * - * @param name a name to look for. - * @return the corresponding AccessPolicyEccAlgo. - */ - @JsonCreator - public static AccessPolicyEccAlgo fromString(String name) { - return fromString(name, AccessPolicyEccAlgo.class); - } - - /** - * Gets known AccessPolicyEccAlgo values. - * - * @return known AccessPolicyEccAlgo values. - */ - public static Collection values() { - return values(AccessPolicyEccAlgo.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyEntity.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyEntity.java deleted file mode 100644 index ff84958ce637..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyEntity.java +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.AccessPolicyEntityInner; - -/** An immutable client-side representation of AccessPolicyEntity. */ -public interface AccessPolicyEntity { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the role property: Defines the access level granted by this policy. - * - * @return the role value. - */ - AccessPolicyRole role(); - - /** - * Gets the authentication property: Authentication method to be used when validating client API access. - * - * @return the authentication value. - */ - AuthenticationBase authentication(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.AccessPolicyEntityInner object. - * - * @return the inner object. - */ - AccessPolicyEntityInner innerModel(); - - /** The entirety of the AccessPolicyEntity definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** The AccessPolicyEntity definition stages. */ - interface DefinitionStages { - /** The first stage of the AccessPolicyEntity definition. */ - interface Blank extends WithParentResource { - } - - /** The stage of the AccessPolicyEntity definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @return the next definition stage. - */ - WithCreate withExistingVideoAnalyzer(String resourceGroupName, String accountName); - } - - /** - * The stage of the AccessPolicyEntity 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.WithRole, DefinitionStages.WithAuthentication { - /** - * Executes the create request. - * - * @return the created resource. - */ - AccessPolicyEntity create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - AccessPolicyEntity create(Context context); - } - - /** The stage of the AccessPolicyEntity definition allowing to specify role. */ - interface WithRole { - /** - * Specifies the role property: Defines the access level granted by this policy.. - * - * @param role Defines the access level granted by this policy. - * @return the next definition stage. - */ - WithCreate withRole(AccessPolicyRole role); - } - - /** The stage of the AccessPolicyEntity definition allowing to specify authentication. */ - interface WithAuthentication { - /** - * Specifies the authentication property: Authentication method to be used when validating client API - * access.. - * - * @param authentication Authentication method to be used when validating client API access. - * @return the next definition stage. - */ - WithCreate withAuthentication(AuthenticationBase authentication); - } - } - - /** - * Begins update for the AccessPolicyEntity resource. - * - * @return the stage of resource update. - */ - AccessPolicyEntity.Update update(); - - /** The template for AccessPolicyEntity update. */ - interface Update extends UpdateStages.WithRole, UpdateStages.WithAuthentication { - /** - * Executes the update request. - * - * @return the updated resource. - */ - AccessPolicyEntity apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - AccessPolicyEntity apply(Context context); - } - - /** The AccessPolicyEntity update stages. */ - interface UpdateStages { - /** The stage of the AccessPolicyEntity update allowing to specify role. */ - interface WithRole { - /** - * Specifies the role property: Defines the access level granted by this policy.. - * - * @param role Defines the access level granted by this policy. - * @return the next definition stage. - */ - Update withRole(AccessPolicyRole role); - } - - /** The stage of the AccessPolicyEntity update allowing to specify authentication. */ - interface WithAuthentication { - /** - * Specifies the authentication property: Authentication method to be used when validating client API - * access.. - * - * @param authentication Authentication method to be used when validating client API access. - * @return the next definition stage. - */ - Update withAuthentication(AuthenticationBase authentication); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - AccessPolicyEntity refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - AccessPolicyEntity refresh(Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyEntityCollection.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyEntityCollection.java deleted file mode 100644 index 86c88633764c..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyEntityCollection.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.videoanalyzer.fluent.models.AccessPolicyEntityInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A collection of AccessPolicyEntity items. */ -@Fluent -public final class AccessPolicyEntityCollection { - /* - * A collection of AccessPolicyEntity items. - */ - @JsonProperty(value = "value") - private List value; - - /* - * A link to the next page of the collection (when the collection contains - * too many results to return in one response). - */ - @JsonProperty(value = "@nextLink") - private String nextLink; - - /** - * Get the value property: A collection of AccessPolicyEntity items. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A collection of AccessPolicyEntity items. - * - * @param value the value value to set. - * @return the AccessPolicyEntityCollection object itself. - */ - public AccessPolicyEntityCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @param nextLink the nextLink value to set. - * @return the AccessPolicyEntityCollection object itself. - */ - public AccessPolicyEntityCollection 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyRole.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyRole.java deleted file mode 100644 index 0e9375b40a45..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyRole.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AccessPolicyRole. */ -public final class AccessPolicyRole extends ExpandableStringEnum { - /** Static value Reader for AccessPolicyRole. */ - public static final AccessPolicyRole READER = fromString("Reader"); - - /** - * Creates or finds a AccessPolicyRole from its string representation. - * - * @param name a name to look for. - * @return the corresponding AccessPolicyRole. - */ - @JsonCreator - public static AccessPolicyRole fromString(String name) { - return fromString(name, AccessPolicyRole.class); - } - - /** - * Gets known AccessPolicyRole values. - * - * @return known AccessPolicyRole values. - */ - public static Collection values() { - return values(AccessPolicyRole.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyRsaAlgo.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyRsaAlgo.java deleted file mode 100644 index e5f57937e49e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyRsaAlgo.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AccessPolicyRsaAlgo. */ -public final class AccessPolicyRsaAlgo extends ExpandableStringEnum { - /** Static value RS256 for AccessPolicyRsaAlgo. */ - public static final AccessPolicyRsaAlgo RS256 = fromString("RS256"); - - /** Static value RS384 for AccessPolicyRsaAlgo. */ - public static final AccessPolicyRsaAlgo RS384 = fromString("RS384"); - - /** Static value RS512 for AccessPolicyRsaAlgo. */ - public static final AccessPolicyRsaAlgo RS512 = fromString("RS512"); - - /** - * Creates or finds a AccessPolicyRsaAlgo from its string representation. - * - * @param name a name to look for. - * @return the corresponding AccessPolicyRsaAlgo. - */ - @JsonCreator - public static AccessPolicyRsaAlgo fromString(String name) { - return fromString(name, AccessPolicyRsaAlgo.class); - } - - /** - * Gets known AccessPolicyRsaAlgo values. - * - * @return known AccessPolicyRsaAlgo values. - */ - public static Collection values() { - return values(AccessPolicyRsaAlgo.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccountEncryption.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccountEncryption.java deleted file mode 100644 index f7e603363f79..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccountEncryption.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Defines how the Video Analyzer account is (optionally) encrypted. */ -@Fluent -public final class AccountEncryption { - /* - * The type of key used to encrypt the Account Key. - */ - @JsonProperty(value = "type", required = true) - private AccountEncryptionKeyType type; - - /* - * The properties of the key used to encrypt the account. - */ - @JsonProperty(value = "keyVaultProperties") - private KeyVaultProperties keyVaultProperties; - - /* - * The Key Vault identity. - */ - @JsonProperty(value = "identity") - private ResourceIdentity identity; - - /* - * The current status of the Key Vault mapping. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private String status; - - /** - * Get the type property: The type of key used to encrypt the Account Key. - * - * @return the type value. - */ - public AccountEncryptionKeyType type() { - return this.type; - } - - /** - * Set the type property: The type of key used to encrypt the Account Key. - * - * @param type the type value to set. - * @return the AccountEncryption object itself. - */ - public AccountEncryption withType(AccountEncryptionKeyType type) { - this.type = type; - return this; - } - - /** - * Get the keyVaultProperties property: The properties of the key used to encrypt the account. - * - * @return the keyVaultProperties value. - */ - public KeyVaultProperties keyVaultProperties() { - return this.keyVaultProperties; - } - - /** - * Set the keyVaultProperties property: The properties of the key used to encrypt the account. - * - * @param keyVaultProperties the keyVaultProperties value to set. - * @return the AccountEncryption object itself. - */ - public AccountEncryption withKeyVaultProperties(KeyVaultProperties keyVaultProperties) { - this.keyVaultProperties = keyVaultProperties; - return this; - } - - /** - * Get the identity property: The Key Vault identity. - * - * @return the identity value. - */ - public ResourceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The Key Vault identity. - * - * @param identity the identity value to set. - * @return the AccountEncryption object itself. - */ - public AccountEncryption withIdentity(ResourceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the status property: The current status of the Key Vault mapping. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property type in model AccountEncryption")); - } - if (keyVaultProperties() != null) { - keyVaultProperties().validate(); - } - if (identity() != null) { - identity().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AccountEncryption.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccountEncryptionKeyType.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccountEncryptionKeyType.java deleted file mode 100644 index 06eabc2e4062..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccountEncryptionKeyType.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AccountEncryptionKeyType. */ -public final class AccountEncryptionKeyType extends ExpandableStringEnum { - /** Static value SystemKey for AccountEncryptionKeyType. */ - public static final AccountEncryptionKeyType SYSTEM_KEY = fromString("SystemKey"); - - /** Static value CustomerKey for AccountEncryptionKeyType. */ - public static final AccountEncryptionKeyType CUSTOMER_KEY = fromString("CustomerKey"); - - /** - * Creates or finds a AccountEncryptionKeyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AccountEncryptionKeyType. - */ - @JsonCreator - public static AccountEncryptionKeyType fromString(String name) { - return fromString(name, AccountEncryptionKeyType.class); - } - - /** - * Gets known AccountEncryptionKeyType values. - * - * @return known AccountEncryptionKeyType values. - */ - public static Collection values() { - return values(AccountEncryptionKeyType.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ActionType.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ActionType.java deleted file mode 100644 index c74c1cd88ff4..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ActionType.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ActionType. */ -public final class ActionType extends ExpandableStringEnum { - /** Static value Internal for ActionType. */ - public static final ActionType INTERNAL = fromString("Internal"); - - /** - * Creates or finds a ActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActionType. - */ - @JsonCreator - public static ActionType fromString(String name) { - return fromString(name, ActionType.class); - } - - /** - * Gets known ActionType values. - * - * @return known ActionType values. - */ - public static Collection values() { - return values(ActionType.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AudioEncoderAac.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AudioEncoderAac.java deleted file mode 100644 index 44d62963a32e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AudioEncoderAac.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A custom preset for encoding audio with the AAC codec. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.AudioEncoderAac") -@Fluent -public final class AudioEncoderAac extends AudioEncoderBase { - /** {@inheritDoc} */ - @Override - public AudioEncoderAac withBitrateKbps(String bitrateKbps) { - super.withBitrateKbps(bitrateKbps); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AudioEncoderBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AudioEncoderBase.java deleted file mode 100644 index 80daf624a1fd..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AudioEncoderBase.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Base type for all audio encoder presets, which define the recipe or instructions on how audio should be processed. - */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@type", - defaultImpl = AudioEncoderBase.class) -@JsonTypeName("AudioEncoderBase") -@JsonSubTypes({ @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.AudioEncoderAac", value = AudioEncoderAac.class) }) -@Fluent -public class AudioEncoderBase { - /* - * Bitrate, in kilobits per second or Kbps, at which audio should be - * encoded (2-channel stereo audio at a sampling rate of 48 kHz). Allowed - * values are 96, 112, 128, 160, 192, 224, and 256. If omitted, the bitrate - * of the input audio is used. - */ - @JsonProperty(value = "bitrateKbps") - private String bitrateKbps; - - /** - * Get the bitrateKbps property: Bitrate, in kilobits per second or Kbps, at which audio should be encoded - * (2-channel stereo audio at a sampling rate of 48 kHz). Allowed values are 96, 112, 128, 160, 192, 224, and 256. - * If omitted, the bitrate of the input audio is used. - * - * @return the bitrateKbps value. - */ - public String bitrateKbps() { - return this.bitrateKbps; - } - - /** - * Set the bitrateKbps property: Bitrate, in kilobits per second or Kbps, at which audio should be encoded - * (2-channel stereo audio at a sampling rate of 48 kHz). Allowed values are 96, 112, 128, 160, 192, 224, and 256. - * If omitted, the bitrate of the input audio is used. - * - * @param bitrateKbps the bitrateKbps value to set. - * @return the AudioEncoderBase object itself. - */ - public AudioEncoderBase withBitrateKbps(String bitrateKbps) { - this.bitrateKbps = bitrateKbps; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AuthenticationBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AuthenticationBase.java deleted file mode 100644 index 74c9a02c6b65..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AuthenticationBase.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base class for access policies authentication methods. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@type", - defaultImpl = AuthenticationBase.class) -@JsonTypeName("AuthenticationBase") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.JwtAuthentication", value = JwtAuthentication.class) }) -@Immutable -public class AuthenticationBase { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CertificateSource.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CertificateSource.java deleted file mode 100644 index 075b142c7686..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CertificateSource.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base class for certificate sources. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@type", - defaultImpl = CertificateSource.class) -@JsonTypeName("CertificateSource") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.PemCertificateList", value = PemCertificateList.class) }) -@Immutable -public class CertificateSource { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CheckNameAvailabilityReason.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CheckNameAvailabilityReason.java deleted file mode 100644 index e6826bc55902..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CheckNameAvailabilityReason.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for CheckNameAvailabilityReason. */ -public final class CheckNameAvailabilityReason extends ExpandableStringEnum { - /** Static value Invalid for CheckNameAvailabilityReason. */ - public static final CheckNameAvailabilityReason INVALID = fromString("Invalid"); - - /** Static value AlreadyExists for CheckNameAvailabilityReason. */ - public static final CheckNameAvailabilityReason ALREADY_EXISTS = fromString("AlreadyExists"); - - /** - * Creates or finds a CheckNameAvailabilityReason from its string representation. - * - * @param name a name to look for. - * @return the corresponding CheckNameAvailabilityReason. - */ - @JsonCreator - public static CheckNameAvailabilityReason fromString(String name) { - return fromString(name, CheckNameAvailabilityReason.class); - } - - /** - * Gets known CheckNameAvailabilityReason values. - * - * @return known CheckNameAvailabilityReason values. - */ - public static Collection values() { - return values(CheckNameAvailabilityReason.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CheckNameAvailabilityRequest.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CheckNameAvailabilityRequest.java deleted file mode 100644 index 9145110ecaf0..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CheckNameAvailabilityRequest.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The check availability request body. */ -@Fluent -public final class CheckNameAvailabilityRequest { - /* - * The name of the resource for which availability needs to be checked. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The resource type. - */ - @JsonProperty(value = "type") - private String type; - - /** - * Get the name property: The name of the resource for which availability needs to be checked. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the resource for which availability needs to be checked. - * - * @param name the name value to set. - * @return the CheckNameAvailabilityRequest object itself. - */ - public CheckNameAvailabilityRequest withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: The resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: The resource type. - * - * @param type the type value to set. - * @return the CheckNameAvailabilityRequest object itself. - */ - public CheckNameAvailabilityRequest withType(String type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CheckNameAvailabilityResponse.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CheckNameAvailabilityResponse.java deleted file mode 100644 index 640d36afa618..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CheckNameAvailabilityResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.resourcemanager.videoanalyzer.fluent.models.CheckNameAvailabilityResponseInner; - -/** An immutable client-side representation of CheckNameAvailabilityResponse. */ -public interface CheckNameAvailabilityResponse { - /** - * Gets the nameAvailable property: Indicates if the resource name is available. - * - * @return the nameAvailable value. - */ - Boolean nameAvailable(); - - /** - * Gets the reason property: The reason why the given name is not available. - * - * @return the reason value. - */ - CheckNameAvailabilityReason reason(); - - /** - * Gets the message property: Detailed reason why the given name is available. - * - * @return the message value. - */ - String message(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.CheckNameAvailabilityResponseInner object. - * - * @return the inner object. - */ - CheckNameAvailabilityResponseInner innerModel(); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CredentialsBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CredentialsBase.java deleted file mode 100644 index bee70f7fbdb9..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CredentialsBase.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base class for credential objects. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@type", - defaultImpl = CredentialsBase.class) -@JsonTypeName("CredentialsBase") -@JsonSubTypes({ - @JsonSubTypes.Type( - name = "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials", - value = UsernamePasswordCredentials.class) }) -@Immutable -public class CredentialsBase { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EccTokenKey.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EccTokenKey.java deleted file mode 100644 index c2ed95849c2f..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EccTokenKey.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Required validation properties for tokens generated with Elliptical Curve algorithm. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.EccTokenKey") -@Fluent -public final class EccTokenKey extends TokenKey { - /* - * Elliptical curve algorithm to be used: ES256, ES384 or ES512. - */ - @JsonProperty(value = "alg", required = true) - private AccessPolicyEccAlgo alg; - - /* - * X coordinate. - */ - @JsonProperty(value = "x", required = true) - private String x; - - /* - * Y coordinate. - */ - @JsonProperty(value = "y", required = true) - private String y; - - /** - * Get the alg property: Elliptical curve algorithm to be used: ES256, ES384 or ES512. - * - * @return the alg value. - */ - public AccessPolicyEccAlgo alg() { - return this.alg; - } - - /** - * Set the alg property: Elliptical curve algorithm to be used: ES256, ES384 or ES512. - * - * @param alg the alg value to set. - * @return the EccTokenKey object itself. - */ - public EccTokenKey withAlg(AccessPolicyEccAlgo alg) { - this.alg = alg; - return this; - } - - /** - * Get the x property: X coordinate. - * - * @return the x value. - */ - public String x() { - return this.x; - } - - /** - * Set the x property: X coordinate. - * - * @param x the x value to set. - * @return the EccTokenKey object itself. - */ - public EccTokenKey withX(String x) { - this.x = x; - return this; - } - - /** - * Get the y property: Y coordinate. - * - * @return the y value. - */ - public String y() { - return this.y; - } - - /** - * Set the y property: Y coordinate. - * - * @param y the y value to set. - * @return the EccTokenKey object itself. - */ - public EccTokenKey withY(String y) { - this.y = y; - return this; - } - - /** {@inheritDoc} */ - @Override - public EccTokenKey withKid(String kid) { - super.withKid(kid); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (alg() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property alg in model EccTokenKey")); - } - if (x() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property x in model EccTokenKey")); - } - if (y() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property y in model EccTokenKey")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EccTokenKey.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModuleEntity.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModuleEntity.java deleted file mode 100644 index 0fc12f107b5c..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModuleEntity.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.EdgeModuleEntityInner; -import java.util.UUID; - -/** An immutable client-side representation of EdgeModuleEntity. */ -public interface EdgeModuleEntity { - /** - * 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 edgeModuleId property: Internal ID generated for the instance of the Video Analyzer edge module. - * - * @return the edgeModuleId value. - */ - UUID edgeModuleId(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.EdgeModuleEntityInner object. - * - * @return the inner object. - */ - EdgeModuleEntityInner innerModel(); - - /** The entirety of the EdgeModuleEntity definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** The EdgeModuleEntity definition stages. */ - interface DefinitionStages { - /** The first stage of the EdgeModuleEntity definition. */ - interface Blank extends WithParentResource { - } - - /** The stage of the EdgeModuleEntity definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @return the next definition stage. - */ - WithCreate withExistingVideoAnalyzer(String resourceGroupName, String accountName); - } - - /** - * The stage of the EdgeModuleEntity definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - EdgeModuleEntity create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EdgeModuleEntity create(Context context); - } - } - - /** - * Begins update for the EdgeModuleEntity resource. - * - * @return the stage of resource update. - */ - EdgeModuleEntity.Update update(); - - /** The template for EdgeModuleEntity update. */ - interface Update { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EdgeModuleEntity apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EdgeModuleEntity apply(Context context); - } - - /** The EdgeModuleEntity update stages. */ - interface UpdateStages { - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EdgeModuleEntity refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EdgeModuleEntity refresh(Context context); - - /** - * Creates a new provisioning token. A provisioning token allows for a single instance of Azure Video analyzer IoT - * edge module to be initialized and authorized to the cloud account. The provisioning token itself is short lived - * and it is only used for the initial handshake between IoT edge module and the cloud. After the initial handshake, - * the IoT edge module will agree on a set of authentication keys which will be auto-rotated as long as the module - * is able to periodically connect to the cloud. A new provisioning token can be generated for the same IoT edge - * module in case the module state lost or reset. - * - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provisioning token properties. - */ - EdgeModuleProvisioningToken listProvisioningToken(ListProvisioningTokenInput parameters); - - /** - * Creates a new provisioning token. A provisioning token allows for a single instance of Azure Video analyzer IoT - * edge module to be initialized and authorized to the cloud account. The provisioning token itself is short lived - * and it is only used for the initial handshake between IoT edge module and the cloud. After the initial handshake, - * the IoT edge module will agree on a set of authentication keys which will be auto-rotated as long as the module - * is able to periodically connect to the cloud. A new provisioning token can be generated for the same IoT edge - * module in case the module state lost or reset. - * - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provisioning token properties along with {@link Response}. - */ - Response listProvisioningTokenWithResponse(ListProvisioningTokenInput parameters, - Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModuleEntityCollection.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModuleEntityCollection.java deleted file mode 100644 index cbf385516f5e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModuleEntityCollection.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.videoanalyzer.fluent.models.EdgeModuleEntityInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A collection of EdgeModuleEntity items. */ -@Fluent -public final class EdgeModuleEntityCollection { - /* - * A collection of EdgeModuleEntity items. - */ - @JsonProperty(value = "value") - private List value; - - /* - * A link to the next page of the collection (when the collection contains - * too many results to return in one response). - */ - @JsonProperty(value = "@nextLink") - private String nextLink; - - /** - * Get the value property: A collection of EdgeModuleEntity items. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A collection of EdgeModuleEntity items. - * - * @param value the value value to set. - * @return the EdgeModuleEntityCollection object itself. - */ - public EdgeModuleEntityCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @param nextLink the nextLink value to set. - * @return the EdgeModuleEntityCollection object itself. - */ - public EdgeModuleEntityCollection 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModuleProvisioningToken.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModuleProvisioningToken.java deleted file mode 100644 index 4a3414c84e83..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModuleProvisioningToken.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.resourcemanager.videoanalyzer.fluent.models.EdgeModuleProvisioningTokenInner; -import java.time.OffsetDateTime; - -/** An immutable client-side representation of EdgeModuleProvisioningToken. */ -public interface EdgeModuleProvisioningToken { - /** - * Gets the expirationDate property: The expiration date of the registration token. The Azure Video Analyzer IoT - * edge module must be initialized and connected to the Internet prior to the token expiration date. - * - * @return the expirationDate value. - */ - OffsetDateTime expirationDate(); - - /** - * Gets the token property: The token blob to be provided to the Azure Video Analyzer IoT edge module through the - * Azure IoT Edge module twin properties. - * - * @return the token value. - */ - String token(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.EdgeModuleProvisioningTokenInner object. - * - * @return the inner object. - */ - EdgeModuleProvisioningTokenInner innerModel(); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModules.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModules.java deleted file mode 100644 index e0f1c2fe0bd1..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModules.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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 EdgeModules. */ -public interface EdgeModules { - /** - * List all existing edge module resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of EdgeModuleEntity items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName); - - /** - * List all existing edge module resources, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of EdgeModuleEntity items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName, Integer top, Context context); - - /** - * Retrieves an existing edge module resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module. - */ - EdgeModuleEntity get(String resourceGroupName, String accountName, String edgeModuleName); - - /** - * Retrieves an existing edge module resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String accountName, String edgeModuleName, - Context context); - - /** - * Deletes an existing edge module resource. Deleting the edge module resource will prevent an Azure Video Analyzer - * IoT edge module which was previously initiated with the module provisioning token from communicating with the - * cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String edgeModuleName); - - /** - * Deletes an existing edge module resource. Deleting the edge module resource will prevent an Azure Video Analyzer - * IoT edge module which was previously initiated with the module provisioning token from communicating with the - * cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String accountName, String edgeModuleName, - Context context); - - /** - * Creates a new provisioning token. A provisioning token allows for a single instance of Azure Video analyzer IoT - * edge module to be initialized and authorized to the cloud account. The provisioning token itself is short lived - * and it is only used for the initial handshake between IoT edge module and the cloud. After the initial handshake, - * the IoT edge module will agree on a set of authentication keys which will be auto-rotated as long as the module - * is able to periodically connect to the cloud. A new provisioning token can be generated for the same IoT edge - * module in case the module state lost or reset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provisioning token properties. - */ - EdgeModuleProvisioningToken listProvisioningToken(String resourceGroupName, String accountName, - String edgeModuleName, ListProvisioningTokenInput parameters); - - /** - * Creates a new provisioning token. A provisioning token allows for a single instance of Azure Video analyzer IoT - * edge module to be initialized and authorized to the cloud account. The provisioning token itself is short lived - * and it is only used for the initial handshake between IoT edge module and the cloud. After the initial handshake, - * the IoT edge module will agree on a set of authentication keys which will be auto-rotated as long as the module - * is able to periodically connect to the cloud. A new provisioning token can be generated for the same IoT edge - * module in case the module state lost or reset. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The Edge Module name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return provisioning token properties along with {@link Response}. - */ - Response listProvisioningTokenWithResponse(String resourceGroupName, - String accountName, String edgeModuleName, ListProvisioningTokenInput parameters, Context context); - - /** - * Retrieves an existing edge module resource with the given name. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module along with {@link Response}. - */ - EdgeModuleEntity getById(String id); - - /** - * Retrieves an existing edge module resource with the given name. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of an edge module along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes an existing edge module resource. Deleting the edge module resource will prevent an Azure Video Analyzer - * IoT edge module which was previously initiated with the module provisioning token from communicating with the - * cloud. - * - * @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 an existing edge module resource. Deleting the edge module resource will prevent an Azure Video Analyzer - * IoT edge module which was previously initiated with the module provisioning token from communicating with the - * cloud. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EdgeModuleEntity resource. - * - * @param name resource name. - * @return the first stage of the new EdgeModuleEntity definition. - */ - EdgeModuleEntity.DefinitionStages.Blank define(String name); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderCustomPreset.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderCustomPreset.java deleted file mode 100644 index 2adae216e5d2..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderCustomPreset.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes a custom preset for encoding the input content using the encoder processor. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.EncoderCustomPreset") -@Fluent -public final class EncoderCustomPreset extends EncoderPresetBase { - /* - * Describes a custom preset for encoding audio. - */ - @JsonProperty(value = "audioEncoder") - private AudioEncoderBase audioEncoder; - - /* - * Describes a custom preset for encoding video. - */ - @JsonProperty(value = "videoEncoder") - private VideoEncoderBase videoEncoder; - - /** - * Get the audioEncoder property: Describes a custom preset for encoding audio. - * - * @return the audioEncoder value. - */ - public AudioEncoderBase audioEncoder() { - return this.audioEncoder; - } - - /** - * Set the audioEncoder property: Describes a custom preset for encoding audio. - * - * @param audioEncoder the audioEncoder value to set. - * @return the EncoderCustomPreset object itself. - */ - public EncoderCustomPreset withAudioEncoder(AudioEncoderBase audioEncoder) { - this.audioEncoder = audioEncoder; - return this; - } - - /** - * Get the videoEncoder property: Describes a custom preset for encoding video. - * - * @return the videoEncoder value. - */ - public VideoEncoderBase videoEncoder() { - return this.videoEncoder; - } - - /** - * Set the videoEncoder property: Describes a custom preset for encoding video. - * - * @param videoEncoder the videoEncoder value to set. - * @return the EncoderCustomPreset object itself. - */ - public EncoderCustomPreset withVideoEncoder(VideoEncoderBase videoEncoder) { - this.videoEncoder = videoEncoder; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (audioEncoder() != null) { - audioEncoder().validate(); - } - if (videoEncoder() != null) { - videoEncoder().validate(); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderPresetBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderPresetBase.java deleted file mode 100644 index b09d992e5c25..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderPresetBase.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Base type for all encoder presets, which define the recipe or instructions on how the input content should be - * processed. - */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@type", - defaultImpl = EncoderPresetBase.class) -@JsonTypeName("EncoderPresetBase") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.EncoderSystemPreset", value = EncoderSystemPreset.class), - @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.EncoderCustomPreset", value = EncoderCustomPreset.class) }) -@Immutable -public class EncoderPresetBase { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderProcessor.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderProcessor.java deleted file mode 100644 index ef2ae8045658..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderProcessor.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** - * Encoder processor allows for encoding of the input content. For example, it can used to change the resolution from 4K - * to 1280x720. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.EncoderProcessor") -@Fluent -public final class EncoderProcessor extends ProcessorNodeBase { - /* - * The encoder preset, which defines the recipe or instructions on how the - * input content should be processed. - */ - @JsonProperty(value = "preset", required = true) - private EncoderPresetBase preset; - - /** - * Get the preset property: The encoder preset, which defines the recipe or instructions on how the input content - * should be processed. - * - * @return the preset value. - */ - public EncoderPresetBase preset() { - return this.preset; - } - - /** - * Set the preset property: The encoder preset, which defines the recipe or instructions on how the input content - * should be processed. - * - * @param preset the preset value to set. - * @return the EncoderProcessor object itself. - */ - public EncoderProcessor withPreset(EncoderPresetBase preset) { - this.preset = preset; - return this; - } - - /** {@inheritDoc} */ - @Override - public EncoderProcessor withInputs(List inputs) { - super.withInputs(inputs); - return this; - } - - /** {@inheritDoc} */ - @Override - public EncoderProcessor withName(String name) { - super.withName(name); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (preset() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property preset in model EncoderProcessor")); - } else { - preset().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EncoderProcessor.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderSystemPreset.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderSystemPreset.java deleted file mode 100644 index 64317a339c02..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderSystemPreset.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes a built-in preset for encoding the input content using the encoder processor. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.EncoderSystemPreset") -@Fluent -public final class EncoderSystemPreset extends EncoderPresetBase { - /* - * Name of the built-in encoding preset. - */ - @JsonProperty(value = "name", required = true) - private EncoderSystemPresetType name; - - /** - * Get the name property: Name of the built-in encoding preset. - * - * @return the name value. - */ - public EncoderSystemPresetType name() { - return this.name; - } - - /** - * Set the name property: Name of the built-in encoding preset. - * - * @param name the name value to set. - * @return the EncoderSystemPreset object itself. - */ - public EncoderSystemPreset withName(EncoderSystemPresetType name) { - this.name = name; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (name() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property name in model EncoderSystemPreset")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EncoderSystemPreset.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderSystemPresetType.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderSystemPresetType.java deleted file mode 100644 index a9f5180610f7..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderSystemPresetType.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EncoderSystemPresetType. */ -public final class EncoderSystemPresetType extends ExpandableStringEnum { - /** Static value SingleLayer_540p_H264_AAC for EncoderSystemPresetType. */ - public static final EncoderSystemPresetType SINGLE_LAYER_540P_H264_AAC = fromString("SingleLayer_540p_H264_AAC"); - - /** Static value SingleLayer_720p_H264_AAC for EncoderSystemPresetType. */ - public static final EncoderSystemPresetType SINGLE_LAYER_720P_H264_AAC = fromString("SingleLayer_720p_H264_AAC"); - - /** Static value SingleLayer_1080p_H264_AAC for EncoderSystemPresetType. */ - public static final EncoderSystemPresetType SINGLE_LAYER_1080P_H264_AAC = fromString("SingleLayer_1080p_H264_AAC"); - - /** Static value SingleLayer_2160p_H264_AAC for EncoderSystemPresetType. */ - public static final EncoderSystemPresetType SINGLE_LAYER_2160P_H264_AAC = fromString("SingleLayer_2160p_H264_AAC"); - - /** - * Creates or finds a EncoderSystemPresetType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EncoderSystemPresetType. - */ - @JsonCreator - public static EncoderSystemPresetType fromString(String name) { - return fromString(name, EncoderSystemPresetType.class); - } - - /** - * Gets known EncoderSystemPresetType values. - * - * @return known EncoderSystemPresetType values. - */ - public static Collection values() { - return values(EncoderSystemPresetType.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Endpoint.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Endpoint.java deleted file mode 100644 index 717259407545..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Endpoint.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The endpoint details. */ -@Fluent -public final class Endpoint { - /* - * The URL of the endpoint. - */ - @JsonProperty(value = "endpointUrl") - private String endpointUrl; - - /* - * The type of the endpoint. - */ - @JsonProperty(value = "type", required = true) - private VideoAnalyzerEndpointType type; - - /** - * Get the endpointUrl property: The URL of the endpoint. - * - * @return the endpointUrl value. - */ - public String endpointUrl() { - return this.endpointUrl; - } - - /** - * Set the endpointUrl property: The URL of the endpoint. - * - * @param endpointUrl the endpointUrl value to set. - * @return the Endpoint object itself. - */ - public Endpoint withEndpointUrl(String endpointUrl) { - this.endpointUrl = endpointUrl; - return this; - } - - /** - * Get the type property: The type of the endpoint. - * - * @return the type value. - */ - public VideoAnalyzerEndpointType type() { - return this.type; - } - - /** - * Set the type property: The type of the endpoint. - * - * @param type the type value to set. - * @return the Endpoint object itself. - */ - public Endpoint withType(VideoAnalyzerEndpointType type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property type in model Endpoint")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Endpoint.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EndpointBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EndpointBase.java deleted file mode 100644 index 3a54aa206ceb..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EndpointBase.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base class for endpoints. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@type", - defaultImpl = EndpointBase.class) -@JsonTypeName("EndpointBase") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.UnsecuredEndpoint", value = UnsecuredEndpoint.class), - @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.TlsEndpoint", value = TlsEndpoint.class) }) -@Fluent -public class EndpointBase { - /* - * Credentials to be presented to the endpoint. - */ - @JsonProperty(value = "credentials", required = true) - private CredentialsBase credentials; - - /* - * The endpoint URL for Video Analyzer to connect to. - */ - @JsonProperty(value = "url", required = true) - private String url; - - /* - * Describes the tunnel through which Video Analyzer can connect to the - * endpoint URL. This is an optional property, typically used when the - * endpoint is behind a firewall. - */ - @JsonProperty(value = "tunnel") - private TunnelBase tunnel; - - /** - * Get the credentials property: Credentials to be presented to the endpoint. - * - * @return the credentials value. - */ - public CredentialsBase credentials() { - return this.credentials; - } - - /** - * Set the credentials property: Credentials to be presented to the endpoint. - * - * @param credentials the credentials value to set. - * @return the EndpointBase object itself. - */ - public EndpointBase withCredentials(CredentialsBase credentials) { - this.credentials = credentials; - return this; - } - - /** - * Get the url property: The endpoint URL for Video Analyzer to connect to. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: The endpoint URL for Video Analyzer to connect to. - * - * @param url the url value to set. - * @return the EndpointBase object itself. - */ - public EndpointBase withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the tunnel property: Describes the tunnel through which Video Analyzer can connect to the endpoint URL. This - * is an optional property, typically used when the endpoint is behind a firewall. - * - * @return the tunnel value. - */ - public TunnelBase tunnel() { - return this.tunnel; - } - - /** - * Set the tunnel property: Describes the tunnel through which Video Analyzer can connect to the endpoint URL. This - * is an optional property, typically used when the endpoint is behind a firewall. - * - * @param tunnel the tunnel value to set. - * @return the EndpointBase object itself. - */ - public EndpointBase withTunnel(TunnelBase tunnel) { - this.tunnel = tunnel; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (credentials() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property credentials in model EndpointBase")); - } else { - credentials().validate(); - } - if (url() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property url in model EndpointBase")); - } - if (tunnel() != null) { - tunnel().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EndpointBase.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/GroupLevelAccessControl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/GroupLevelAccessControl.java deleted file mode 100644 index eb0c606dd705..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/GroupLevelAccessControl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Group level network access control. */ -@Fluent -public final class GroupLevelAccessControl { - /* - * Whether or not public network access is allowed for specified resources - * under the Video Analyzer account. - */ - @JsonProperty(value = "publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; - - /** - * Get the publicNetworkAccess property: Whether or not public network access is allowed for specified resources - * under the Video Analyzer account. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Whether or not public network access is allowed for specified resources - * under the Video Analyzer account. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the GroupLevelAccessControl object itself. - */ - public GroupLevelAccessControl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/IotHub.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/IotHub.java deleted file mode 100644 index 45c6a85f64e8..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/IotHub.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The IoT Hub details. */ -@Fluent -public final class IotHub { - /* - * The IoT Hub resource identifier. - */ - @JsonProperty(value = "id", required = true) - private String id; - - /* - * The IoT Hub identity. - */ - @JsonProperty(value = "identity", required = true) - private ResourceIdentity identity; - - /* - * The current status of the Iot Hub mapping. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private String status; - - /** - * Get the id property: The IoT Hub resource identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The IoT Hub resource identifier. - * - * @param id the id value to set. - * @return the IotHub object itself. - */ - public IotHub withId(String id) { - this.id = id; - return this; - } - - /** - * Get the identity property: The IoT Hub identity. - * - * @return the identity value. - */ - public ResourceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The IoT Hub identity. - * - * @param identity the identity value to set. - * @return the IotHub object itself. - */ - public IotHub withIdentity(ResourceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the status property: The current status of the Iot Hub mapping. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property id in model IotHub")); - } - if (identity() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property identity in model IotHub")); - } else { - identity().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IotHub.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/JwtAuthentication.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/JwtAuthentication.java deleted file mode 100644 index 1ac5e90f20ca..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/JwtAuthentication.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Properties for access validation based on JSON Web Tokens (JWT). */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.JwtAuthentication") -@Fluent -public final class JwtAuthentication extends AuthenticationBase { - /* - * List of expected token issuers. Token issuer is valid if it matches at - * least one of the given values. - */ - @JsonProperty(value = "issuers") - private List issuers; - - /* - * List of expected token audiences. Token audience is valid if it matches - * at least one of the given values. - */ - @JsonProperty(value = "audiences") - private List audiences; - - /* - * List of additional token claims to be validated. Token must contains all - * claims and respective values for it to be valid. - */ - @JsonProperty(value = "claims") - private List claims; - - /* - * List of keys which can be used to validate access tokens. Having - * multiple keys allow for seamless key rotation of the token signing key. - * Token signature must match exactly one key. - */ - @JsonProperty(value = "keys") - private List keys; - - /** - * Get the issuers property: List of expected token issuers. Token issuer is valid if it matches at least one of the - * given values. - * - * @return the issuers value. - */ - public List issuers() { - return this.issuers; - } - - /** - * Set the issuers property: List of expected token issuers. Token issuer is valid if it matches at least one of the - * given values. - * - * @param issuers the issuers value to set. - * @return the JwtAuthentication object itself. - */ - public JwtAuthentication withIssuers(List issuers) { - this.issuers = issuers; - return this; - } - - /** - * Get the audiences property: List of expected token audiences. Token audience is valid if it matches at least one - * of the given values. - * - * @return the audiences value. - */ - public List audiences() { - return this.audiences; - } - - /** - * Set the audiences property: List of expected token audiences. Token audience is valid if it matches at least one - * of the given values. - * - * @param audiences the audiences value to set. - * @return the JwtAuthentication object itself. - */ - public JwtAuthentication withAudiences(List audiences) { - this.audiences = audiences; - return this; - } - - /** - * Get the claims property: List of additional token claims to be validated. Token must contains all claims and - * respective values for it to be valid. - * - * @return the claims value. - */ - public List claims() { - return this.claims; - } - - /** - * Set the claims property: List of additional token claims to be validated. Token must contains all claims and - * respective values for it to be valid. - * - * @param claims the claims value to set. - * @return the JwtAuthentication object itself. - */ - public JwtAuthentication withClaims(List claims) { - this.claims = claims; - return this; - } - - /** - * Get the keys property: List of keys which can be used to validate access tokens. Having multiple keys allow for - * seamless key rotation of the token signing key. Token signature must match exactly one key. - * - * @return the keys value. - */ - public List keys() { - return this.keys; - } - - /** - * Set the keys property: List of keys which can be used to validate access tokens. Having multiple keys allow for - * seamless key rotation of the token signing key. Token signature must match exactly one key. - * - * @param keys the keys value to set. - * @return the JwtAuthentication object itself. - */ - public JwtAuthentication withKeys(List keys) { - this.keys = keys; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (claims() != null) { - claims().forEach(e -> e.validate()); - } - if (keys() != null) { - keys().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/KeyVaultProperties.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/KeyVaultProperties.java deleted file mode 100644 index 3779aeca9f75..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/KeyVaultProperties.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The details for accessing the encryption keys in Key Vault. */ -@Fluent -public final class KeyVaultProperties { - /* - * The URL of the Key Vault key used to encrypt the account. The key may - * either be versioned (for example https://vault/keys/mykey/version1) or - * reference a key without a version (for example - * https://vault/keys/mykey). - */ - @JsonProperty(value = "keyIdentifier", required = true) - private String keyIdentifier; - - /* - * The current key used to encrypt Video Analyzer account, including the - * key version. - */ - @JsonProperty(value = "currentKeyIdentifier", access = JsonProperty.Access.WRITE_ONLY) - private String currentKeyIdentifier; - - /** - * Get the keyIdentifier property: The URL of the Key Vault key used to encrypt the account. The key may either be - * versioned (for example https://vault/keys/mykey/version1) or reference a key without a version (for example - * https://vault/keys/mykey). - * - * @return the keyIdentifier value. - */ - public String keyIdentifier() { - return this.keyIdentifier; - } - - /** - * Set the keyIdentifier property: The URL of the Key Vault key used to encrypt the account. The key may either be - * versioned (for example https://vault/keys/mykey/version1) or reference a key without a version (for example - * https://vault/keys/mykey). - * - * @param keyIdentifier the keyIdentifier value to set. - * @return the KeyVaultProperties object itself. - */ - public KeyVaultProperties withKeyIdentifier(String keyIdentifier) { - this.keyIdentifier = keyIdentifier; - return this; - } - - /** - * Get the currentKeyIdentifier property: The current key used to encrypt Video Analyzer account, including the key - * version. - * - * @return the currentKeyIdentifier value. - */ - public String currentKeyIdentifier() { - return this.currentKeyIdentifier; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyIdentifier() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property keyIdentifier in model KeyVaultProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(KeyVaultProperties.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Kind.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Kind.java deleted file mode 100644 index 076932a0be59..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Kind.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for Kind. */ -public final class Kind extends ExpandableStringEnum { - /** Static value Live for Kind. */ - public static final Kind LIVE = fromString("Live"); - - /** Static value Batch for Kind. */ - public static final Kind BATCH = fromString("Batch"); - - /** - * Creates or finds a Kind from its string representation. - * - * @param name a name to look for. - * @return the corresponding Kind. - */ - @JsonCreator - public static Kind fromString(String name) { - return fromString(name, Kind.class); - } - - /** - * Gets known Kind values. - * - * @return known Kind values. - */ - public static Collection values() { - return values(Kind.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ListProvisioningTokenInput.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ListProvisioningTokenInput.java deleted file mode 100644 index 92192a431062..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ListProvisioningTokenInput.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The input parameters to generate registration token for the Azure Video Analyzer IoT edge module. */ -@Fluent -public final class ListProvisioningTokenInput { - /* - * The desired expiration date of the registration token. The Azure Video - * Analyzer IoT edge module must be initialized and connected to the - * Internet prior to the token expiration date. - */ - @JsonProperty(value = "expirationDate", required = true) - private OffsetDateTime expirationDate; - - /** - * Get the expirationDate property: The desired expiration date of the registration token. The Azure Video Analyzer - * IoT edge module must be initialized and connected to the Internet prior to the token expiration date. - * - * @return the expirationDate value. - */ - public OffsetDateTime expirationDate() { - return this.expirationDate; - } - - /** - * Set the expirationDate property: The desired expiration date of the registration token. The Azure Video Analyzer - * IoT edge module must be initialized and connected to the Internet prior to the token expiration date. - * - * @param expirationDate the expirationDate value to set. - * @return the ListProvisioningTokenInput object itself. - */ - public ListProvisioningTokenInput withExpirationDate(OffsetDateTime expirationDate) { - this.expirationDate = expirationDate; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (expirationDate() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property expirationDate in model ListProvisioningTokenInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ListProvisioningTokenInput.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipeline.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipeline.java deleted file mode 100644 index 071c82bf89d6..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipeline.java +++ /dev/null @@ -1,351 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineInner; -import java.util.List; - -/** An immutable client-side representation of LivePipeline. */ -public interface LivePipeline { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the topologyName property: The reference to an existing pipeline topology defined for real-time content - * processing. When activated, this live pipeline will process content according to the pipeline topology - * definition. - * - * @return the topologyName value. - */ - String topologyName(); - - /** - * Gets the description property: An optional description for the pipeline. - * - * @return the description value. - */ - String description(); - - /** - * Gets the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range - * is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the service - * will disconnect temporarily from the camera. It will retry to re-establish connection (with exponential backoff), - * checking to see if the camera bitrate is now below the reserved capacity. Doing so will ensure that one 'noisy - * neighbor' does not affect other live pipelines in your account. - * - * @return the bitrateKbps value. - */ - int bitrateKbps(); - - /** - * Gets the state property: Current state of the pipeline (read-only). - * - * @return the state value. - */ - LivePipelineState state(); - - /** - * Gets the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @return the parameters value. - */ - List parameters(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineInner object. - * - * @return the inner object. - */ - LivePipelineInner innerModel(); - - /** The entirety of the LivePipeline definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** The LivePipeline definition stages. */ - interface DefinitionStages { - /** The first stage of the LivePipeline definition. */ - interface Blank extends WithParentResource { - } - - /** The stage of the LivePipeline definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @return the next definition stage. - */ - WithCreate withExistingVideoAnalyzer(String resourceGroupName, String accountName); - } - - /** - * The stage of the LivePipeline 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.WithTopologyName, DefinitionStages.WithDescription, - DefinitionStages.WithBitrateKbps, DefinitionStages.WithParameters { - /** - * Executes the create request. - * - * @return the created resource. - */ - LivePipeline create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - LivePipeline create(Context context); - } - - /** The stage of the LivePipeline definition allowing to specify topologyName. */ - interface WithTopologyName { - /** - * Specifies the topologyName property: The reference to an existing pipeline topology defined for real-time - * content processing. When activated, this live pipeline will process content according to the pipeline - * topology definition.. - * - * @param topologyName The reference to an existing pipeline topology defined for real-time content - * processing. When activated, this live pipeline will process content according to the pipeline - * topology definition. - * @return the next definition stage. - */ - WithCreate withTopologyName(String topologyName); - } - - /** The stage of the LivePipeline definition allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: An optional description for the pipeline.. - * - * @param description An optional description for the pipeline. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - - /** The stage of the LivePipeline definition allowing to specify bitrateKbps. */ - interface WithBitrateKbps { - /** - * Specifies the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The - * allowed range is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this - * capacity, then the service will disconnect temporarily from the camera. It will retry to re-establish - * connection (with exponential backoff), checking to see if the camera bitrate is now below the reserved - * capacity. Doing so will ensure that one 'noisy neighbor' does not affect other live pipelines in your - * account.. - * - * @param bitrateKbps Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range is - * from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the - * service will disconnect temporarily from the camera. It will retry to re-establish connection (with - * exponential backoff), checking to see if the camera bitrate is now below the reserved capacity. Doing - * so will ensure that one 'noisy neighbor' does not affect other live pipelines in your account. - * @return the next definition stage. - */ - WithCreate withBitrateKbps(int bitrateKbps); - } - - /** The stage of the LivePipeline definition allowing to specify parameters. */ - interface WithParameters { - /** - * Specifies the parameters property: List of the instance level parameter values for the user-defined - * topology parameters. A pipeline can only define or override parameters values for parameters which have - * been declared in the referenced topology. Topology parameters without a default value must be defined. - * Topology parameters with a default value can be optionally be overridden.. - * - * @param parameters List of the instance level parameter values for the user-defined topology parameters. A - * pipeline can only define or override parameters values for parameters which have been declared in the - * referenced topology. Topology parameters without a default value must be defined. Topology parameters - * with a default value can be optionally be overridden. - * @return the next definition stage. - */ - WithCreate withParameters(List parameters); - } - } - - /** - * Begins update for the LivePipeline resource. - * - * @return the stage of resource update. - */ - LivePipeline.Update update(); - - /** The template for LivePipeline update. */ - interface Update extends UpdateStages.WithTopologyName, UpdateStages.WithDescription, UpdateStages.WithBitrateKbps, - UpdateStages.WithParameters { - /** - * Executes the update request. - * - * @return the updated resource. - */ - LivePipeline apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - LivePipeline apply(Context context); - } - - /** The LivePipeline update stages. */ - interface UpdateStages { - /** The stage of the LivePipeline update allowing to specify topologyName. */ - interface WithTopologyName { - /** - * Specifies the topologyName property: The reference to an existing pipeline topology defined for real-time - * content processing. When activated, this live pipeline will process content according to the pipeline - * topology definition.. - * - * @param topologyName The reference to an existing pipeline topology defined for real-time content - * processing. When activated, this live pipeline will process content according to the pipeline - * topology definition. - * @return the next definition stage. - */ - Update withTopologyName(String topologyName); - } - - /** The stage of the LivePipeline update allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: An optional description for the pipeline.. - * - * @param description An optional description for the pipeline. - * @return the next definition stage. - */ - Update withDescription(String description); - } - - /** The stage of the LivePipeline update allowing to specify bitrateKbps. */ - interface WithBitrateKbps { - /** - * Specifies the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The - * allowed range is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this - * capacity, then the service will disconnect temporarily from the camera. It will retry to re-establish - * connection (with exponential backoff), checking to see if the camera bitrate is now below the reserved - * capacity. Doing so will ensure that one 'noisy neighbor' does not affect other live pipelines in your - * account.. - * - * @param bitrateKbps Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range is - * from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the - * service will disconnect temporarily from the camera. It will retry to re-establish connection (with - * exponential backoff), checking to see if the camera bitrate is now below the reserved capacity. Doing - * so will ensure that one 'noisy neighbor' does not affect other live pipelines in your account. - * @return the next definition stage. - */ - Update withBitrateKbps(Integer bitrateKbps); - } - - /** The stage of the LivePipeline update allowing to specify parameters. */ - interface WithParameters { - /** - * Specifies the parameters property: List of the instance level parameter values for the user-defined - * topology parameters. A pipeline can only define or override parameters values for parameters which have - * been declared in the referenced topology. Topology parameters without a default value must be defined. - * Topology parameters with a default value can be optionally be overridden.. - * - * @param parameters List of the instance level parameter values for the user-defined topology parameters. A - * pipeline can only define or override parameters values for parameters which have been declared in the - * referenced topology. Topology parameters without a default value must be defined. Topology parameters - * with a default value can be optionally be overridden. - * @return the next definition stage. - */ - Update withParameters(List parameters); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - LivePipeline refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - LivePipeline refresh(Context context); - - /** - * Activates a live pipeline with the given name. - * - * @throws com.azure.core.management.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 activate(); - - /** - * Activates a live pipeline with the given name. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void activate(Context context); - - /** - * Deactivates a live pipeline with the given name. - * - * @throws com.azure.core.management.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 deactivate(); - - /** - * Deactivates a live pipeline with the given name. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deactivate(Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineCollection.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineCollection.java deleted file mode 100644 index 5ac3a457c00b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineCollection.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A collection of LivePipeline items. */ -@Fluent -public final class LivePipelineCollection { - /* - * A collection of LivePipeline items. - */ - @JsonProperty(value = "value") - private List value; - - /* - * A link to the next page of the collection (when the collection contains - * too many results to return in one response). - */ - @JsonProperty(value = "@nextLink") - private String nextLink; - - /** - * Get the value property: A collection of LivePipeline items. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A collection of LivePipeline items. - * - * @param value the value value to set. - * @return the LivePipelineCollection object itself. - */ - public LivePipelineCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @param nextLink the nextLink value to set. - * @return the LivePipelineCollection object itself. - */ - public LivePipelineCollection 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineOperationStatus.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineOperationStatus.java deleted file mode 100644 index 671f6f284b2d..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineOperationStatus.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.management.exception.ManagementError; -import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineOperationStatusInner; - -/** An immutable client-side representation of LivePipelineOperationStatus. */ -public interface LivePipelineOperationStatus { - /** - * Gets the name property: The name of the live pipeline operation. - * - * @return the name value. - */ - String name(); - - /** - * Gets the status property: The status of the live pipeline operation. - * - * @return the status value. - */ - String status(); - - /** - * Gets the error property: The error details for the live pipeline operation. - * - * @return the error value. - */ - ManagementError error(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineOperationStatusInner object. - * - * @return the inner object. - */ - LivePipelineOperationStatusInner innerModel(); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineOperationStatuses.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineOperationStatuses.java deleted file mode 100644 index 4ccd0772a785..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineOperationStatuses.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of LivePipelineOperationStatuses. */ -public interface LivePipelineOperationStatuses { - /** - * Get the operation status of a live pipeline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param operationId The operation 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 operation status of a live pipeline. - */ - LivePipelineOperationStatus get(String resourceGroupName, String accountName, String livePipelineName, - String operationId); - - /** - * Get the operation status of a live pipeline. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param operationId The operation 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 operation status of a live pipeline along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String accountName, - String livePipelineName, String operationId, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineState.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineState.java deleted file mode 100644 index 4c4d724a04c9..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineState.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for LivePipelineState. */ -public final class LivePipelineState extends ExpandableStringEnum { - /** Static value Inactive for LivePipelineState. */ - public static final LivePipelineState INACTIVE = fromString("Inactive"); - - /** Static value Activating for LivePipelineState. */ - public static final LivePipelineState ACTIVATING = fromString("Activating"); - - /** Static value Active for LivePipelineState. */ - public static final LivePipelineState ACTIVE = fromString("Active"); - - /** Static value Deactivating for LivePipelineState. */ - public static final LivePipelineState DEACTIVATING = fromString("Deactivating"); - - /** - * Creates or finds a LivePipelineState from its string representation. - * - * @param name a name to look for. - * @return the corresponding LivePipelineState. - */ - @JsonCreator - public static LivePipelineState fromString(String name) { - return fromString(name, LivePipelineState.class); - } - - /** - * Gets known LivePipelineState values. - * - * @return known LivePipelineState values. - */ - public static Collection values() { - return values(LivePipelineState.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineUpdate.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineUpdate.java deleted file mode 100644 index 565aaf71c59d..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineUpdate.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelinePropertiesUpdate; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** - * Live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving and publishing - * of content for a unique RTSP camera. - */ -@Fluent -public final class LivePipelineUpdate extends ProxyResource { - /* - * The resource properties. - */ - @JsonProperty(value = "properties") - private LivePipelinePropertiesUpdate innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: The resource properties. - * - * @return the innerProperties value. - */ - private LivePipelinePropertiesUpdate innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the topologyName property: The reference to an existing pipeline topology defined for real-time content - * processing. When activated, this live pipeline will process content according to the pipeline topology - * definition. - * - * @return the topologyName value. - */ - public String topologyName() { - return this.innerProperties() == null ? null : this.innerProperties().topologyName(); - } - - /** - * Set the topologyName property: The reference to an existing pipeline topology defined for real-time content - * processing. When activated, this live pipeline will process content according to the pipeline topology - * definition. - * - * @param topologyName the topologyName value to set. - * @return the LivePipelineUpdate object itself. - */ - public LivePipelineUpdate withTopologyName(String topologyName) { - if (this.innerProperties() == null) { - this.innerProperties = new LivePipelinePropertiesUpdate(); - } - this.innerProperties().withTopologyName(topologyName); - return this; - } - - /** - * Get the description property: An optional description for the pipeline. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: An optional description for the pipeline. - * - * @param description the description value to set. - * @return the LivePipelineUpdate object itself. - */ - public LivePipelineUpdate withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new LivePipelinePropertiesUpdate(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range - * is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the service - * will disconnect temporarily from the camera. It will retry to re-establish connection (with exponential backoff), - * checking to see if the camera bitrate is now below the reserved capacity. Doing so will ensure that one 'noisy - * neighbor' does not affect other live pipelines in your account. - * - * @return the bitrateKbps value. - */ - public Integer bitrateKbps() { - return this.innerProperties() == null ? null : this.innerProperties().bitrateKbps(); - } - - /** - * Set the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range - * is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the service - * will disconnect temporarily from the camera. It will retry to re-establish connection (with exponential backoff), - * checking to see if the camera bitrate is now below the reserved capacity. Doing so will ensure that one 'noisy - * neighbor' does not affect other live pipelines in your account. - * - * @param bitrateKbps the bitrateKbps value to set. - * @return the LivePipelineUpdate object itself. - */ - public LivePipelineUpdate withBitrateKbps(Integer bitrateKbps) { - if (this.innerProperties() == null) { - this.innerProperties = new LivePipelinePropertiesUpdate(); - } - this.innerProperties().withBitrateKbps(bitrateKbps); - return this; - } - - /** - * Get the state property: Current state of the pipeline (read-only). - * - * @return the state value. - */ - public LivePipelineState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); - } - - /** - * Get the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @return the parameters value. - */ - public List parameters() { - return this.innerProperties() == null ? null : this.innerProperties().parameters(); - } - - /** - * Set the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @param parameters the parameters value to set. - * @return the LivePipelineUpdate object itself. - */ - public LivePipelineUpdate withParameters(List parameters) { - if (this.innerProperties() == null) { - this.innerProperties = new LivePipelinePropertiesUpdate(); - } - this.innerProperties().withParameters(parameters); - 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelines.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelines.java deleted file mode 100644 index 12bf4a30f859..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelines.java +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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 LivePipelines. */ -public interface LivePipelines { - /** - * Retrieves a list of live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of LivePipeline items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Retrieves a list of live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of LivePipeline items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName, String filter, Integer top, - Context context); - - /** - * Retrieves a specific live pipeline by name. If a live pipeline with that name has been previously created, the - * call will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera. - */ - LivePipeline get(String resourceGroupName, String accountName, String livePipelineName); - - /** - * Retrieves a specific live pipeline by name. If a live pipeline with that name has been previously created, the - * call will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String accountName, String livePipelineName, - Context context); - - /** - * Deletes a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String livePipelineName); - - /** - * Deletes a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String accountName, String livePipelineName, - Context context); - - /** - * Activates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void activate(String resourceGroupName, String accountName, String livePipelineName); - - /** - * Activates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void activate(String resourceGroupName, String accountName, String livePipelineName, Context context); - - /** - * Deactivates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deactivate(String resourceGroupName, String accountName, String livePipelineName); - - /** - * Deactivates a live pipeline with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param livePipelineName Live pipeline unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deactivate(String resourceGroupName, String accountName, String livePipelineName, Context context); - - /** - * Retrieves a specific live pipeline by name. If a live pipeline with that name has been previously created, the - * call will return the JSON representation of that instance. - * - * @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 live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera along with {@link Response}. - */ - LivePipeline getById(String id); - - /** - * Retrieves a specific live pipeline by name. If a live pipeline with that name has been previously created, the - * call will return the JSON representation of that instance. - * - * @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 live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving - * and publishing of content for a unique RTSP camera along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a live pipeline with the given name. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a live pipeline with the given name. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new LivePipeline resource. - * - * @param name resource name. - * @return the first stage of the new LivePipeline definition. - */ - LivePipeline.DefinitionStages.Blank define(String name); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Locations.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Locations.java deleted file mode 100644 index 3ff6316a2193..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Locations.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Locations. */ -public interface Locations { - /** - * Checks whether the Video Analyzer resource name is available. - * - * @param locationName Location Name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result. - */ - CheckNameAvailabilityResponse checkNameAvailability(String locationName, CheckNameAvailabilityRequest parameters); - - /** - * Checks whether the Video Analyzer resource name is available. - * - * @param locationName Location Name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response}. - */ - Response checkNameAvailabilityWithResponse(String locationName, - CheckNameAvailabilityRequest parameters, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LogSpecification.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LogSpecification.java deleted file mode 100644 index 55a125dfd371..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LogSpecification.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** A diagnostic log emitted by service. */ -@Immutable -public final class LogSpecification { - /* - * The diagnostic log category name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * The diagnostic log category display name. - */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) - private String displayName; - - /* - * The time range for requests in each blob. - */ - @JsonProperty(value = "blobDuration", access = JsonProperty.Access.WRITE_ONLY) - private String blobDuration; - - /** - * Get the name property: The diagnostic log category name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the displayName property: The diagnostic log category display name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Get the blobDuration property: The time range for requests in each blob. - * - * @return the blobDuration value. - */ - public String blobDuration() { - return this.blobDuration; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/MetricAggregationType.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/MetricAggregationType.java deleted file mode 100644 index b175cbdab215..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/MetricAggregationType.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for MetricAggregationType. */ -public final class MetricAggregationType extends ExpandableStringEnum { - /** Static value Average for MetricAggregationType. */ - public static final MetricAggregationType AVERAGE = fromString("Average"); - - /** Static value Count for MetricAggregationType. */ - public static final MetricAggregationType COUNT = fromString("Count"); - - /** Static value Total for MetricAggregationType. */ - public static final MetricAggregationType TOTAL = fromString("Total"); - - /** - * Creates or finds a MetricAggregationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding MetricAggregationType. - */ - @JsonCreator - public static MetricAggregationType fromString(String name) { - return fromString(name, MetricAggregationType.class); - } - - /** - * Gets known MetricAggregationType values. - * - * @return known MetricAggregationType values. - */ - public static Collection values() { - return values(MetricAggregationType.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/MetricDimension.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/MetricDimension.java deleted file mode 100644 index 3a094cc89c0d..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/MetricDimension.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** A metric dimension. */ -@Immutable -public final class MetricDimension { - /* - * The metric dimension name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * The display name for the dimension. - */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) - private String displayName; - - /* - * Whether to export metric to shoebox. - */ - @JsonProperty(value = "toBeExportedForShoebox", access = JsonProperty.Access.WRITE_ONLY) - private Boolean toBeExportedForShoebox; - - /** - * Get the name property: The metric dimension name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the displayName property: The display name for the dimension. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Get the toBeExportedForShoebox property: Whether to export metric to shoebox. - * - * @return the toBeExportedForShoebox value. - */ - public Boolean toBeExportedForShoebox() { - return this.toBeExportedForShoebox; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/MetricSpecification.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/MetricSpecification.java deleted file mode 100644 index eaf3649a1002..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/MetricSpecification.java +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A metric emitted by service. */ -@Fluent -public final class MetricSpecification { - /* - * The metric name. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * The metric display name. - */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) - private String displayName; - - /* - * The metric display description. - */ - @JsonProperty(value = "displayDescription", access = JsonProperty.Access.WRITE_ONLY) - private String displayDescription; - - /* - * The metric unit - */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) - private MetricUnit unit; - - /* - * The metric aggregation type - */ - @JsonProperty(value = "aggregationType", access = JsonProperty.Access.WRITE_ONLY) - private MetricAggregationType aggregationType; - - /* - * The metric lock aggregation type - */ - @JsonProperty(value = "lockAggregationType", access = JsonProperty.Access.WRITE_ONLY) - private MetricAggregationType lockAggregationType; - - /* - * Supported aggregation types. - */ - @JsonProperty(value = "supportedAggregationTypes") - private List supportedAggregationTypes; - - /* - * The metric dimensions. - */ - @JsonProperty(value = "dimensions", access = JsonProperty.Access.WRITE_ONLY) - private List dimensions; - - /* - * Indicates whether regional MDM account is enabled. - */ - @JsonProperty(value = "enableRegionalMdmAccount", access = JsonProperty.Access.WRITE_ONLY) - private Boolean enableRegionalMdmAccount; - - /* - * The source MDM account. - */ - @JsonProperty(value = "sourceMdmAccount", access = JsonProperty.Access.WRITE_ONLY) - private String sourceMdmAccount; - - /* - * The source MDM namespace. - */ - @JsonProperty(value = "sourceMdmNamespace", access = JsonProperty.Access.WRITE_ONLY) - private String sourceMdmNamespace; - - /* - * The supported time grain types. - */ - @JsonProperty(value = "supportedTimeGrainTypes", access = JsonProperty.Access.WRITE_ONLY) - private List supportedTimeGrainTypes; - - /** - * Get the name property: The metric name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the displayName property: The metric display name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Get the displayDescription property: The metric display description. - * - * @return the displayDescription value. - */ - public String displayDescription() { - return this.displayDescription; - } - - /** - * Get the unit property: The metric unit. - * - * @return the unit value. - */ - public MetricUnit unit() { - return this.unit; - } - - /** - * Get the aggregationType property: The metric aggregation type. - * - * @return the aggregationType value. - */ - public MetricAggregationType aggregationType() { - return this.aggregationType; - } - - /** - * Get the lockAggregationType property: The metric lock aggregation type. - * - * @return the lockAggregationType value. - */ - public MetricAggregationType lockAggregationType() { - return this.lockAggregationType; - } - - /** - * Get the supportedAggregationTypes property: Supported aggregation types. - * - * @return the supportedAggregationTypes value. - */ - public List supportedAggregationTypes() { - return this.supportedAggregationTypes; - } - - /** - * Set the supportedAggregationTypes property: Supported aggregation types. - * - * @param supportedAggregationTypes the supportedAggregationTypes value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withSupportedAggregationTypes(List supportedAggregationTypes) { - this.supportedAggregationTypes = supportedAggregationTypes; - return this; - } - - /** - * Get the dimensions property: The metric dimensions. - * - * @return the dimensions value. - */ - public List dimensions() { - return this.dimensions; - } - - /** - * Get the enableRegionalMdmAccount property: Indicates whether regional MDM account is enabled. - * - * @return the enableRegionalMdmAccount value. - */ - public Boolean enableRegionalMdmAccount() { - return this.enableRegionalMdmAccount; - } - - /** - * Get the sourceMdmAccount property: The source MDM account. - * - * @return the sourceMdmAccount value. - */ - public String sourceMdmAccount() { - return this.sourceMdmAccount; - } - - /** - * Get the sourceMdmNamespace property: The source MDM namespace. - * - * @return the sourceMdmNamespace value. - */ - public String sourceMdmNamespace() { - return this.sourceMdmNamespace; - } - - /** - * Get the supportedTimeGrainTypes property: The supported time grain types. - * - * @return the supportedTimeGrainTypes value. - */ - public List supportedTimeGrainTypes() { - return this.supportedTimeGrainTypes; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dimensions() != null) { - dimensions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/MetricUnit.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/MetricUnit.java deleted file mode 100644 index c728ff9cc3b2..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/MetricUnit.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for MetricUnit. */ -public final class MetricUnit extends ExpandableStringEnum { - /** Static value Bytes for MetricUnit. */ - public static final MetricUnit BYTES = fromString("Bytes"); - - /** Static value Count for MetricUnit. */ - public static final MetricUnit COUNT = fromString("Count"); - - /** Static value Milliseconds for MetricUnit. */ - public static final MetricUnit MILLISECONDS = fromString("Milliseconds"); - - /** - * Creates or finds a MetricUnit from its string representation. - * - * @param name a name to look for. - * @return the corresponding MetricUnit. - */ - @JsonCreator - public static MetricUnit fromString(String name) { - return fromString(name, MetricUnit.class); - } - - /** - * Gets known MetricUnit values. - * - * @return known MetricUnit values. - */ - public static Collection values() { - return values(MetricUnit.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NetworkAccessControl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NetworkAccessControl.java deleted file mode 100644 index a5254909a8a7..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NetworkAccessControl.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Network access control for video analyzer account. */ -@Fluent -public final class NetworkAccessControl { - /* - * Public network access for integration group. - */ - @JsonProperty(value = "integration") - private GroupLevelAccessControl integration; - - /* - * Public network access for ingestion group. - */ - @JsonProperty(value = "ingestion") - private GroupLevelAccessControl ingestion; - - /* - * Public network access for consumption group. - */ - @JsonProperty(value = "consumption") - private GroupLevelAccessControl consumption; - - /** - * Get the integration property: Public network access for integration group. - * - * @return the integration value. - */ - public GroupLevelAccessControl integration() { - return this.integration; - } - - /** - * Set the integration property: Public network access for integration group. - * - * @param integration the integration value to set. - * @return the NetworkAccessControl object itself. - */ - public NetworkAccessControl withIntegration(GroupLevelAccessControl integration) { - this.integration = integration; - return this; - } - - /** - * Get the ingestion property: Public network access for ingestion group. - * - * @return the ingestion value. - */ - public GroupLevelAccessControl ingestion() { - return this.ingestion; - } - - /** - * Set the ingestion property: Public network access for ingestion group. - * - * @param ingestion the ingestion value to set. - * @return the NetworkAccessControl object itself. - */ - public NetworkAccessControl withIngestion(GroupLevelAccessControl ingestion) { - this.ingestion = ingestion; - return this; - } - - /** - * Get the consumption property: Public network access for consumption group. - * - * @return the consumption value. - */ - public GroupLevelAccessControl consumption() { - return this.consumption; - } - - /** - * Set the consumption property: Public network access for consumption group. - * - * @param consumption the consumption value to set. - * @return the NetworkAccessControl object itself. - */ - public NetworkAccessControl withConsumption(GroupLevelAccessControl consumption) { - this.consumption = consumption; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (integration() != null) { - integration().validate(); - } - if (ingestion() != null) { - ingestion().validate(); - } - if (consumption() != null) { - consumption().validate(); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NodeBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NodeBase.java deleted file mode 100644 index 225ea2d5b0b2..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NodeBase.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base class for nodes. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@type", - defaultImpl = NodeBase.class) -@JsonTypeName("NodeBase") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.SourceNodeBase", value = SourceNodeBase.class), - @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.ProcessorNodeBase", value = ProcessorNodeBase.class), - @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.SinkNodeBase", value = SinkNodeBase.class) }) -@Fluent -public class NodeBase { - /* - * Node name. Must be unique within the topology. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /** - * Get the name property: Node name. Must be unique within the topology. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Node name. Must be unique within the topology. - * - * @param name the name value to set. - * @return the NodeBase object itself. - */ - public NodeBase withName(String name) { - this.name = name; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property name in model NodeBase")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NodeBase.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NodeInput.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NodeInput.java deleted file mode 100644 index 7def4d484c82..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NodeInput.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes an input signal to be used on a pipeline node. */ -@Fluent -public final class NodeInput { - /* - * The name of the upstream node in the pipeline which output is used as - * input of the current node. - */ - @JsonProperty(value = "nodeName", required = true) - private String nodeName; - - /** - * Get the nodeName property: The name of the upstream node in the pipeline which output is used as input of the - * current node. - * - * @return the nodeName value. - */ - public String nodeName() { - return this.nodeName; - } - - /** - * Set the nodeName property: The name of the upstream node in the pipeline which output is used as input of the - * current node. - * - * @param nodeName the nodeName value to set. - * @return the NodeInput object itself. - */ - public NodeInput withNodeName(String nodeName) { - this.nodeName = nodeName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (nodeName() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property nodeName in model NodeInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NodeInput.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Operation.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Operation.java deleted file mode 100644 index ac705553ab3e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Operation.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** An operation. */ -@Fluent -public final class Operation { - /* - * The operation name. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * The operation display name. - */ - @JsonProperty(value = "display") - private OperationDisplay display; - - /* - * Origin of the operation. - */ - @JsonProperty(value = "origin") - private String origin; - - /* - * Operation properties format. - */ - @JsonProperty(value = "properties") - private Properties properties; - - /* - * Whether the operation applies to data-plane. - */ - @JsonProperty(value = "isDataAction") - private Boolean isDataAction; - - /* - * Indicates the action type. - */ - @JsonProperty(value = "actionType") - private ActionType actionType; - - /** - * Get the name property: The operation name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The operation name. - * - * @param name the name value to set. - * @return the Operation object itself. - */ - public Operation withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display property: The operation display name. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display property: The operation display name. - * - * @param display the display value to set. - * @return the Operation object itself. - */ - public Operation withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - - /** - * Get the origin property: Origin of the operation. - * - * @return the origin value. - */ - public String origin() { - return this.origin; - } - - /** - * Set the origin property: Origin of the operation. - * - * @param origin the origin value to set. - * @return the Operation object itself. - */ - public Operation withOrigin(String origin) { - this.origin = origin; - return this; - } - - /** - * Get the properties property: Operation properties format. - * - * @return the properties value. - */ - public Properties properties() { - return this.properties; - } - - /** - * Set the properties property: Operation properties format. - * - * @param properties the properties value to set. - * @return the Operation object itself. - */ - public Operation withProperties(Properties properties) { - this.properties = properties; - return this; - } - - /** - * Get the isDataAction property: Whether the operation applies to data-plane. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Set the isDataAction property: Whether the operation applies to data-plane. - * - * @param isDataAction the isDataAction value to set. - * @return the Operation object itself. - */ - public Operation withIsDataAction(Boolean isDataAction) { - this.isDataAction = isDataAction; - return this; - } - - /** - * Get the actionType property: Indicates the action type. - * - * @return the actionType value. - */ - public ActionType actionType() { - return this.actionType; - } - - /** - * Set the actionType property: Indicates the action type. - * - * @param actionType the actionType value to set. - * @return the Operation object itself. - */ - public Operation withActionType(ActionType actionType) { - this.actionType = actionType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Operation")); - } - if (display() != null) { - display().validate(); - } - if (properties() != null) { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Operation.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationCollection.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationCollection.java deleted file mode 100644 index 7348d81dad25..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationCollection.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.resourcemanager.videoanalyzer.fluent.models.OperationCollectionInner; -import java.util.List; - -/** An immutable client-side representation of OperationCollection. */ -public interface OperationCollection { - /** - * Gets the value property: A collection of Operation items. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.OperationCollectionInner object. - * - * @return the inner object. - */ - OperationCollectionInner innerModel(); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationDisplay.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationDisplay.java deleted file mode 100644 index 2d0c9d145bfc..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationDisplay.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Operation details. */ -@Fluent -public final class OperationDisplay { - /* - * The service provider. - */ - @JsonProperty(value = "provider") - private String provider; - - /* - * Resource on which the operation is performed. - */ - @JsonProperty(value = "resource") - private String resource; - - /* - * The operation type. - */ - @JsonProperty(value = "operation") - private String operation; - - /* - * The operation description. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Get the provider property: The service provider. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider property: The service provider. - * - * @param provider the provider value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource property: Resource on which the operation is performed. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource property: Resource on which the operation is performed. - * - * @param resource the resource value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation property: The operation type. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation property: The operation type. - * - * @param operation the operation value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the description property: The operation description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The operation description. - * - * @param description the description value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationResults.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationResults.java deleted file mode 100644 index 97520c8792f9..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationResults.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of OperationResults. */ -public interface OperationResults { - /** - * Get private endpoint connection operation result. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation 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 private endpoint connection operation result. - */ - PrivateEndpointConnection get(String resourceGroupName, String accountName, String name, String operationId); - - /** - * Get private endpoint connection operation result. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation 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 private endpoint connection operation result along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String accountName, String name, - String operationId, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationStatuses.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationStatuses.java deleted file mode 100644 index 0609947fbd73..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationStatuses.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of OperationStatuses. */ -public interface OperationStatuses { - /** - * Get private endpoint connection operation status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation 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 private endpoint connection operation status. - */ - VideoAnalyzerPrivateEndpointConnectionOperationStatus get(String resourceGroupName, String accountName, String name, - String operationId); - - /** - * Get private endpoint connection operation status. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param operationId Operation 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 private endpoint connection operation status along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, - String accountName, String name, String operationId, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Operations.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Operations.java deleted file mode 100644 index a5c6cede6476..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Operations.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Operations. */ -public interface Operations { - /** - * Lists all the Media 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 a collection of Operation items. - */ - OperationCollection list(); - - /** - * Lists all the Media 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 a collection of Operation items along with {@link Response}. - */ - Response listWithResponse(Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterDeclaration.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterDeclaration.java deleted file mode 100644 index 0f287f64db38..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterDeclaration.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Single topology parameter declaration. Declared parameters can and must be referenced throughout the topology and can - * optionally have default values to be used when they are not defined in the pipelines. - */ -@Fluent -public final class ParameterDeclaration { - /* - * Name of the parameter. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * Type of the parameter. - */ - @JsonProperty(value = "type", required = true) - private ParameterType type; - - /* - * Description of the parameter. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The default value for the parameter to be used if the pipeline does not - * specify a value. - */ - @JsonProperty(value = "default") - private String defaultProperty; - - /** - * Get the name property: Name of the parameter. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the parameter. - * - * @param name the name value to set. - * @return the ParameterDeclaration object itself. - */ - public ParameterDeclaration withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: Type of the parameter. - * - * @return the type value. - */ - public ParameterType type() { - return this.type; - } - - /** - * Set the type property: Type of the parameter. - * - * @param type the type value to set. - * @return the ParameterDeclaration object itself. - */ - public ParameterDeclaration withType(ParameterType type) { - this.type = type; - return this; - } - - /** - * Get the description property: Description of the parameter. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of the parameter. - * - * @param description the description value to set. - * @return the ParameterDeclaration object itself. - */ - public ParameterDeclaration withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the defaultProperty property: The default value for the parameter to be used if the pipeline does not specify - * a value. - * - * @return the defaultProperty value. - */ - public String defaultProperty() { - return this.defaultProperty; - } - - /** - * Set the defaultProperty property: The default value for the parameter to be used if the pipeline does not specify - * a value. - * - * @param defaultProperty the defaultProperty value to set. - * @return the ParameterDeclaration object itself. - */ - public ParameterDeclaration withDefaultProperty(String defaultProperty) { - this.defaultProperty = defaultProperty; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property name in model ParameterDeclaration")); - } - if (type() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property type in model ParameterDeclaration")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ParameterDeclaration.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterDefinition.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterDefinition.java deleted file mode 100644 index bc3bd0203736..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterDefinition.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Defines the parameter value of an specific pipeline topology parameter. See pipeline topology parameters for more - * information. - */ -@Fluent -public final class ParameterDefinition { - /* - * Name of the parameter declared in the pipeline topology. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * Parameter value to be applied on this specific pipeline. - */ - @JsonProperty(value = "value") - private String value; - - /** - * Get the name property: Name of the parameter declared in the pipeline topology. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the parameter declared in the pipeline topology. - * - * @param name the name value to set. - * @return the ParameterDefinition object itself. - */ - public ParameterDefinition withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: Parameter value to be applied on this specific pipeline. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Parameter value to be applied on this specific pipeline. - * - * @param value the value value to set. - * @return the ParameterDefinition object itself. - */ - public ParameterDefinition withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property name in model ParameterDefinition")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ParameterDefinition.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterType.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterType.java deleted file mode 100644 index 8cd45b2eec59..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterType.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ParameterType. */ -public final class ParameterType extends ExpandableStringEnum { - /** Static value String for ParameterType. */ - public static final ParameterType STRING = fromString("String"); - - /** Static value SecretString for ParameterType. */ - public static final ParameterType SECRET_STRING = fromString("SecretString"); - - /** Static value Int for ParameterType. */ - public static final ParameterType INT = fromString("Int"); - - /** Static value Double for ParameterType. */ - public static final ParameterType DOUBLE = fromString("Double"); - - /** Static value Bool for ParameterType. */ - public static final ParameterType BOOL = fromString("Bool"); - - /** - * Creates or finds a ParameterType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ParameterType. - */ - @JsonCreator - public static ParameterType fromString(String name) { - return fromString(name, ParameterType.class); - } - - /** - * Gets known ParameterType values. - * - * @return known ParameterType values. - */ - public static Collection values() { - return values(ParameterType.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PemCertificateList.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PemCertificateList.java deleted file mode 100644 index 3e36053f20f7..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PemCertificateList.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** A list of PEM formatted certificates. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.PemCertificateList") -@Fluent -public final class PemCertificateList extends CertificateSource { - /* - * PEM formatted public certificates. One certificate per entry. - */ - @JsonProperty(value = "certificates", required = true) - private List certificates; - - /** - * Get the certificates property: PEM formatted public certificates. One certificate per entry. - * - * @return the certificates value. - */ - public List certificates() { - return this.certificates; - } - - /** - * Set the certificates property: PEM formatted public certificates. One certificate per entry. - * - * @param certificates the certificates value to set. - * @return the PemCertificateList object itself. - */ - public PemCertificateList withCertificates(List certificates) { - this.certificates = certificates; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (certificates() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property certificates in model PemCertificateList")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PemCertificateList.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJob.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJob.java deleted file mode 100644 index ed0b8bb5d000..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJob.java +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of PipelineJob. */ -public interface PipelineJob { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the topologyName property: Reference to an existing pipeline topology. When activated, this pipeline job - * will process content according to the pipeline topology definition. - * - * @return the topologyName value. - */ - String topologyName(); - - /** - * Gets the description property: An optional description for the pipeline. - * - * @return the description value. - */ - String description(); - - /** - * Gets the state property: Current state of the pipeline (read-only). - * - * @return the state value. - */ - PipelineJobState state(); - - /** - * Gets the expiration property: The date-time by when this pipeline job will be automatically deleted from your - * account. - * - * @return the expiration value. - */ - OffsetDateTime expiration(); - - /** - * Gets the error property: Details about the error, in case the pipeline job fails. - * - * @return the error value. - */ - PipelineJobError error(); - - /** - * Gets the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @return the parameters value. - */ - List parameters(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobInner object. - * - * @return the inner object. - */ - PipelineJobInner innerModel(); - - /** The entirety of the PipelineJob definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** The PipelineJob definition stages. */ - interface DefinitionStages { - /** The first stage of the PipelineJob definition. */ - interface Blank extends WithParentResource { - } - - /** The stage of the PipelineJob definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @return the next definition stage. - */ - WithCreate withExistingVideoAnalyzer(String resourceGroupName, String accountName); - } - - /** - * The stage of the PipelineJob 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.WithTopologyName, DefinitionStages.WithDescription, - DefinitionStages.WithParameters { - /** - * Executes the create request. - * - * @return the created resource. - */ - PipelineJob create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - PipelineJob create(Context context); - } - - /** The stage of the PipelineJob definition allowing to specify topologyName. */ - interface WithTopologyName { - /** - * Specifies the topologyName property: Reference to an existing pipeline topology. When activated, this - * pipeline job will process content according to the pipeline topology definition.. - * - * @param topologyName Reference to an existing pipeline topology. When activated, this pipeline job will - * process content according to the pipeline topology definition. - * @return the next definition stage. - */ - WithCreate withTopologyName(String topologyName); - } - - /** The stage of the PipelineJob definition allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: An optional description for the pipeline.. - * - * @param description An optional description for the pipeline. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - - /** The stage of the PipelineJob definition allowing to specify parameters. */ - interface WithParameters { - /** - * Specifies the parameters property: List of the instance level parameter values for the user-defined - * topology parameters. A pipeline can only define or override parameters values for parameters which have - * been declared in the referenced topology. Topology parameters without a default value must be defined. - * Topology parameters with a default value can be optionally be overridden.. - * - * @param parameters List of the instance level parameter values for the user-defined topology parameters. A - * pipeline can only define or override parameters values for parameters which have been declared in the - * referenced topology. Topology parameters without a default value must be defined. Topology parameters - * with a default value can be optionally be overridden. - * @return the next definition stage. - */ - WithCreate withParameters(List parameters); - } - } - - /** - * Begins update for the PipelineJob resource. - * - * @return the stage of resource update. - */ - PipelineJob.Update update(); - - /** The template for PipelineJob update. */ - interface Update extends UpdateStages.WithTopologyName, UpdateStages.WithDescription, UpdateStages.WithParameters { - /** - * Executes the update request. - * - * @return the updated resource. - */ - PipelineJob apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - PipelineJob apply(Context context); - } - - /** The PipelineJob update stages. */ - interface UpdateStages { - /** The stage of the PipelineJob update allowing to specify topologyName. */ - interface WithTopologyName { - /** - * Specifies the topologyName property: Reference to an existing pipeline topology. When activated, this - * pipeline job will process content according to the pipeline topology definition.. - * - * @param topologyName Reference to an existing pipeline topology. When activated, this pipeline job will - * process content according to the pipeline topology definition. - * @return the next definition stage. - */ - Update withTopologyName(String topologyName); - } - - /** The stage of the PipelineJob update allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: An optional description for the pipeline.. - * - * @param description An optional description for the pipeline. - * @return the next definition stage. - */ - Update withDescription(String description); - } - - /** The stage of the PipelineJob update allowing to specify parameters. */ - interface WithParameters { - /** - * Specifies the parameters property: List of the instance level parameter values for the user-defined - * topology parameters. A pipeline can only define or override parameters values for parameters which have - * been declared in the referenced topology. Topology parameters without a default value must be defined. - * Topology parameters with a default value can be optionally be overridden.. - * - * @param parameters List of the instance level parameter values for the user-defined topology parameters. A - * pipeline can only define or override parameters values for parameters which have been declared in the - * referenced topology. Topology parameters without a default value must be defined. Topology parameters - * with a default value can be optionally be overridden. - * @return the next definition stage. - */ - Update withParameters(List parameters); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - PipelineJob refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - PipelineJob refresh(Context context); - - /** - * Cancels a pipeline job with the given name. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void cancel(); - - /** - * Cancels a pipeline job with the given name. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void cancel(Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobCollection.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobCollection.java deleted file mode 100644 index 5a7c60f166cc..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobCollection.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A collection of PipelineJob items. */ -@Fluent -public final class PipelineJobCollection { - /* - * A collection of PipelineJob items. - */ - @JsonProperty(value = "value") - private List value; - - /* - * A link to the next page of the collection (when the collection contains - * too many results to return in one response). - */ - @JsonProperty(value = "@nextLink") - private String nextLink; - - /** - * Get the value property: A collection of PipelineJob items. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A collection of PipelineJob items. - * - * @param value the value value to set. - * @return the PipelineJobCollection object itself. - */ - public PipelineJobCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @param nextLink the nextLink value to set. - * @return the PipelineJobCollection object itself. - */ - public PipelineJobCollection 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobError.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobError.java deleted file mode 100644 index 3bc685f91d2b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobError.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Details about the error for a failed pipeline job. */ -@Fluent -public final class PipelineJobError { - /* - * The error code. - */ - @JsonProperty(value = "code") - private String code; - - /* - * The error message. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the code property: The error code. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Set the code property: The error code. - * - * @param code the code value to set. - * @return the PipelineJobError object itself. - */ - public PipelineJobError withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message property: The error message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: The error message. - * - * @param message the message value to set. - * @return the PipelineJobError object itself. - */ - public PipelineJobError withMessage(String message) { - this.message = message; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobOperationStatus.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobOperationStatus.java deleted file mode 100644 index 2bbfbbdb0fce..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobOperationStatus.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.management.exception.ManagementError; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobOperationStatusInner; - -/** An immutable client-side representation of PipelineJobOperationStatus. */ -public interface PipelineJobOperationStatus { - /** - * Gets the name property: The name of the pipeline job operation. - * - * @return the name value. - */ - String name(); - - /** - * Gets the status property: The status of the pipeline job operation. - * - * @return the status value. - */ - String status(); - - /** - * Gets the error property: The error details for the pipeline job operation. - * - * @return the error value. - */ - ManagementError error(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobOperationStatusInner object. - * - * @return the inner object. - */ - PipelineJobOperationStatusInner innerModel(); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobOperationStatuses.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobOperationStatuses.java deleted file mode 100644 index 315b758aac9a..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobOperationStatuses.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of PipelineJobOperationStatuses. */ -public interface PipelineJobOperationStatuses { - /** - * Get the operation status of a pipeline job with the given operationId. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param operationId The operation 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 operation status of a pipeline job with the given operationId. - */ - PipelineJobOperationStatus get(String resourceGroupName, String accountName, String pipelineJobName, - String operationId); - - /** - * Get the operation status of a pipeline job with the given operationId. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param operationId The operation 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 operation status of a pipeline job with the given operationId along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String accountName, - String pipelineJobName, String operationId, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobState.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobState.java deleted file mode 100644 index 8d209b304321..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobState.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PipelineJobState. */ -public final class PipelineJobState extends ExpandableStringEnum { - /** Static value Processing for PipelineJobState. */ - public static final PipelineJobState PROCESSING = fromString("Processing"); - - /** Static value Canceled for PipelineJobState. */ - public static final PipelineJobState CANCELED = fromString("Canceled"); - - /** Static value Completed for PipelineJobState. */ - public static final PipelineJobState COMPLETED = fromString("Completed"); - - /** Static value Failed for PipelineJobState. */ - public static final PipelineJobState FAILED = fromString("Failed"); - - /** - * Creates or finds a PipelineJobState from its string representation. - * - * @param name a name to look for. - * @return the corresponding PipelineJobState. - */ - @JsonCreator - public static PipelineJobState fromString(String name) { - return fromString(name, PipelineJobState.class); - } - - /** - * Gets known PipelineJobState values. - * - * @return known PipelineJobState values. - */ - public static Collection values() { - return values(PipelineJobState.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobUpdate.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobUpdate.java deleted file mode 100644 index f1bc44bc8ae2..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobUpdate.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobPropertiesUpdate; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Pipeline job represents a unique instance of a batch topology, used for offline processing of selected portions of - * archived content. - */ -@Fluent -public final class PipelineJobUpdate extends ProxyResource { - /* - * The resource properties. - */ - @JsonProperty(value = "properties") - private PipelineJobPropertiesUpdate innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: The resource properties. - * - * @return the innerProperties value. - */ - private PipelineJobPropertiesUpdate innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the topologyName property: Reference to an existing pipeline topology. When activated, this pipeline job will - * process content according to the pipeline topology definition. - * - * @return the topologyName value. - */ - public String topologyName() { - return this.innerProperties() == null ? null : this.innerProperties().topologyName(); - } - - /** - * Set the topologyName property: Reference to an existing pipeline topology. When activated, this pipeline job will - * process content according to the pipeline topology definition. - * - * @param topologyName the topologyName value to set. - * @return the PipelineJobUpdate object itself. - */ - public PipelineJobUpdate withTopologyName(String topologyName) { - if (this.innerProperties() == null) { - this.innerProperties = new PipelineJobPropertiesUpdate(); - } - this.innerProperties().withTopologyName(topologyName); - return this; - } - - /** - * Get the description property: An optional description for the pipeline. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: An optional description for the pipeline. - * - * @param description the description value to set. - * @return the PipelineJobUpdate object itself. - */ - public PipelineJobUpdate withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new PipelineJobPropertiesUpdate(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the state property: Current state of the pipeline (read-only). - * - * @return the state value. - */ - public PipelineJobState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); - } - - /** - * Get the expiration property: The date-time by when this pipeline job will be automatically deleted from your - * account. - * - * @return the expiration value. - */ - public OffsetDateTime expiration() { - return this.innerProperties() == null ? null : this.innerProperties().expiration(); - } - - /** - * Get the error property: Details about the error, in case the pipeline job fails. - * - * @return the error value. - */ - public PipelineJobError error() { - return this.innerProperties() == null ? null : this.innerProperties().error(); - } - - /** - * Get the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @return the parameters value. - */ - public List parameters() { - return this.innerProperties() == null ? null : this.innerProperties().parameters(); - } - - /** - * Set the parameters property: List of the instance level parameter values for the user-defined topology - * parameters. A pipeline can only define or override parameters values for parameters which have been declared in - * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a - * default value can be optionally be overridden. - * - * @param parameters the parameters value to set. - * @return the PipelineJobUpdate object itself. - */ - public PipelineJobUpdate withParameters(List parameters) { - if (this.innerProperties() == null) { - this.innerProperties = new PipelineJobPropertiesUpdate(); - } - this.innerProperties().withParameters(parameters); - 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobs.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobs.java deleted file mode 100644 index b69f74e5f64d..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobs.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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 PipelineJobs. */ -public interface PipelineJobs { - /** - * Retrieves a list of all live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineJob items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Retrieves a list of all live pipelines that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineJob items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName, String filter, Integer top, - Context context); - - /** - * Retrieves a specific pipeline job by name. If a pipeline job with that name has been previously created, the call - * will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content. - */ - PipelineJob get(String resourceGroupName, String accountName, String pipelineJobName); - - /** - * Retrieves a specific pipeline job by name. If a pipeline job with that name has been previously created, the call - * will return the JSON representation of that instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String accountName, String pipelineJobName, - Context context); - - /** - * Deletes a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String pipelineJobName); - - /** - * Deletes a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String accountName, String pipelineJobName, - Context context); - - /** - * Cancels a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void cancel(String resourceGroupName, String accountName, String pipelineJobName); - - /** - * Cancels a pipeline job with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineJobName The pipeline job name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void cancel(String resourceGroupName, String accountName, String pipelineJobName, Context context); - - /** - * Retrieves a specific pipeline job by name. If a pipeline job with that name has been previously created, the call - * will return the JSON representation of that instance. - * - * @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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content along with {@link Response}. - */ - PipelineJob getById(String id); - - /** - * Retrieves a specific pipeline job by name. If a pipeline job with that name has been previously created, the call - * will return the JSON representation of that instance. - * - * @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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected - * portions of archived content along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a pipeline job with the given name. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a pipeline job with the given name. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new PipelineJob resource. - * - * @param name resource name. - * @return the first stage of the new PipelineJob definition. - */ - PipelineJob.DefinitionStages.Blank define(String name); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologies.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologies.java deleted file mode 100644 index dd5128344e3b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologies.java +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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 PipelineTopologies. */ -public interface PipelineTopologies { - /** - * Retrieves a list of pipeline topologies that have been added to the account, if any, along with their JSON - * representation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineTopology items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Retrieves a list of pipeline topologies that have been added to the account, if any, along with their JSON - * representation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of PipelineTopology items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName, String filter, Integer top, - Context context); - - /** - * Retrieves a specific pipeline topology by name. If a topology with that name has been previously created, the - * call will return the JSON representation of that topology. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome. - */ - PipelineTopology get(String resourceGroupName, String accountName, String pipelineTopologyName); - - /** - * Retrieves a specific pipeline topology by name. If a topology with that name has been previously created, the - * call will return the JSON representation of that topology. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String accountName, - String pipelineTopologyName, Context context); - - /** - * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology - * have been stopped and deleted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String pipelineTopologyName); - - /** - * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology - * have been stopped and deleted. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param pipelineTopologyName Pipeline topology unique identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String accountName, String pipelineTopologyName, - Context context); - - /** - * Retrieves a specific pipeline topology by name. If a topology with that name has been previously created, the - * call will return the JSON representation of that topology. - * - * @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 pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome along with {@link Response}. - */ - PipelineTopology getById(String id); - - /** - * Retrieves a specific pipeline topology by name. If a topology with that name has been previously created, the - * call will return the JSON representation of that topology. - * - * @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 pipeline topology describes the processing steps to be applied when processing content for a particular - * outcome along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology - * have been stopped and deleted. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology - * have been stopped and deleted. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new PipelineTopology resource. - * - * @param name resource name. - * @return the first stage of the new PipelineTopology definition. - */ - PipelineTopology.DefinitionStages.Blank define(String name); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopology.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopology.java deleted file mode 100644 index cb163566890f..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopology.java +++ /dev/null @@ -1,378 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineTopologyInner; -import java.util.List; - -/** An immutable client-side representation of PipelineTopology. */ -public interface PipelineTopology { - /** - * 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 kind property: Topology kind. - * - * @return the kind value. - */ - Kind kind(); - - /** - * Gets the sku property: Describes the properties of a SKU. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the description property: An optional description of the pipeline topology. It is recommended that the - * expected use of the topology to be described here. - * - * @return the description value. - */ - String description(); - - /** - * Gets the parameters property: List of the topology parameter declarations. Parameters declared here can be - * referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can - * have optional default values and can later be defined in individual instances of the pipeline. - * - * @return the parameters value. - */ - List parameters(); - - /** - * Gets the sources property: List of the topology source nodes. Source nodes enable external data to be ingested by - * the pipeline. - * - * @return the sources value. - */ - List sources(); - - /** - * Gets the processors property: List of the topology processor nodes. Processor nodes enable pipeline data to be - * analyzed, processed or transformed. - * - * @return the processors value. - */ - List processors(); - - /** - * Gets the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or - * exported. - * - * @return the sinks value. - */ - List sinks(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineTopologyInner object. - * - * @return the inner object. - */ - PipelineTopologyInner innerModel(); - - /** The entirety of the PipelineTopology definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithKind, - DefinitionStages.WithSku, DefinitionStages.WithCreate { - } - - /** The PipelineTopology definition stages. */ - interface DefinitionStages { - /** The first stage of the PipelineTopology definition. */ - interface Blank extends WithParentResource { - } - - /** The stage of the PipelineTopology definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @return the next definition stage. - */ - WithKind withExistingVideoAnalyzer(String resourceGroupName, String accountName); - } - - /** The stage of the PipelineTopology definition allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: Topology kind.. - * - * @param kind Topology kind. - * @return the next definition stage. - */ - WithSku withKind(Kind kind); - } - - /** The stage of the PipelineTopology definition allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: Describes the properties of a SKU.. - * - * @param sku Describes the properties of a SKU. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - - /** - * The stage of the PipelineTopology 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.WithDescription, DefinitionStages.WithParameters, - DefinitionStages.WithSources, DefinitionStages.WithProcessors, DefinitionStages.WithSinks { - /** - * Executes the create request. - * - * @return the created resource. - */ - PipelineTopology create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - PipelineTopology create(Context context); - } - - /** The stage of the PipelineTopology definition allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: An optional description of the pipeline topology. It is recommended - * that the expected use of the topology to be described here.. - * - * @param description An optional description of the pipeline topology. It is recommended that the expected - * use of the topology to be described here. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - - /** The stage of the PipelineTopology definition allowing to specify parameters. */ - interface WithParameters { - /** - * Specifies the parameters property: List of the topology parameter declarations. Parameters declared here - * can be referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. - * Parameters can have optional default values and can later be defined in individual instances of the - * pipeline.. - * - * @param parameters List of the topology parameter declarations. Parameters declared here can be referenced - * throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can - * have optional default values and can later be defined in individual instances of the pipeline. - * @return the next definition stage. - */ - WithCreate withParameters(List parameters); - } - - /** The stage of the PipelineTopology definition allowing to specify sources. */ - interface WithSources { - /** - * Specifies the sources property: List of the topology source nodes. Source nodes enable external data to - * be ingested by the pipeline.. - * - * @param sources List of the topology source nodes. Source nodes enable external data to be ingested by the - * pipeline. - * @return the next definition stage. - */ - WithCreate withSources(List sources); - } - - /** The stage of the PipelineTopology definition allowing to specify processors. */ - interface WithProcessors { - /** - * Specifies the processors property: List of the topology processor nodes. Processor nodes enable pipeline - * data to be analyzed, processed or transformed.. - * - * @param processors List of the topology processor nodes. Processor nodes enable pipeline data to be - * analyzed, processed or transformed. - * @return the next definition stage. - */ - WithCreate withProcessors(List processors); - } - - /** The stage of the PipelineTopology definition allowing to specify sinks. */ - interface WithSinks { - /** - * Specifies the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be - * stored or exported.. - * - * @param sinks List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. - * @return the next definition stage. - */ - WithCreate withSinks(List sinks); - } - } - - /** - * Begins update for the PipelineTopology resource. - * - * @return the stage of resource update. - */ - PipelineTopology.Update update(); - - /** The template for PipelineTopology update. */ - interface Update extends UpdateStages.WithKind, UpdateStages.WithSku, UpdateStages.WithDescription, - UpdateStages.WithParameters, UpdateStages.WithSources, UpdateStages.WithProcessors, UpdateStages.WithSinks { - /** - * Executes the update request. - * - * @return the updated resource. - */ - PipelineTopology apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - PipelineTopology apply(Context context); - } - - /** The PipelineTopology update stages. */ - interface UpdateStages { - /** The stage of the PipelineTopology update allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: Topology kind.. - * - * @param kind Topology kind. - * @return the next definition stage. - */ - Update withKind(Kind kind); - } - - /** The stage of the PipelineTopology update allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: Describes the properties of a SKU.. - * - * @param sku Describes the properties of a SKU. - * @return the next definition stage. - */ - Update withSku(Sku sku); - } - - /** The stage of the PipelineTopology update allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: An optional description of the pipeline topology. It is recommended - * that the expected use of the topology to be described here.. - * - * @param description An optional description of the pipeline topology. It is recommended that the expected - * use of the topology to be described here. - * @return the next definition stage. - */ - Update withDescription(String description); - } - - /** The stage of the PipelineTopology update allowing to specify parameters. */ - interface WithParameters { - /** - * Specifies the parameters property: List of the topology parameter declarations. Parameters declared here - * can be referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. - * Parameters can have optional default values and can later be defined in individual instances of the - * pipeline.. - * - * @param parameters List of the topology parameter declarations. Parameters declared here can be referenced - * throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can - * have optional default values and can later be defined in individual instances of the pipeline. - * @return the next definition stage. - */ - Update withParameters(List parameters); - } - - /** The stage of the PipelineTopology update allowing to specify sources. */ - interface WithSources { - /** - * Specifies the sources property: List of the topology source nodes. Source nodes enable external data to - * be ingested by the pipeline.. - * - * @param sources List of the topology source nodes. Source nodes enable external data to be ingested by the - * pipeline. - * @return the next definition stage. - */ - Update withSources(List sources); - } - - /** The stage of the PipelineTopology update allowing to specify processors. */ - interface WithProcessors { - /** - * Specifies the processors property: List of the topology processor nodes. Processor nodes enable pipeline - * data to be analyzed, processed or transformed.. - * - * @param processors List of the topology processor nodes. Processor nodes enable pipeline data to be - * analyzed, processed or transformed. - * @return the next definition stage. - */ - Update withProcessors(List processors); - } - - /** The stage of the PipelineTopology update allowing to specify sinks. */ - interface WithSinks { - /** - * Specifies the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be - * stored or exported.. - * - * @param sinks List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. - * @return the next definition stage. - */ - Update withSinks(List sinks); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - PipelineTopology refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - PipelineTopology refresh(Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologyCollection.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologyCollection.java deleted file mode 100644 index 474ce82fee39..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologyCollection.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineTopologyInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A collection of PipelineTopology items. */ -@Fluent -public final class PipelineTopologyCollection { - /* - * A collection of PipelineTopology items. - */ - @JsonProperty(value = "value") - private List value; - - /* - * A link to the next page of the collection (when the collection contains - * too many results to return in one response). - */ - @JsonProperty(value = "@nextLink") - private String nextLink; - - /** - * Get the value property: A collection of PipelineTopology items. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A collection of PipelineTopology items. - * - * @param value the value value to set. - * @return the PipelineTopologyCollection object itself. - */ - public PipelineTopologyCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @param nextLink the nextLink value to set. - * @return the PipelineTopologyCollection object itself. - */ - public PipelineTopologyCollection 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologyUpdate.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologyUpdate.java deleted file mode 100644 index d4a04b913983..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologyUpdate.java +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineTopologyPropertiesUpdate; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** - * Pipeline topology describes the processing steps to be applied when processing content for a particular outcome. The - * topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances - * which share the same processing characteristics. For instance, a pipeline topology which captures content from a RTSP - * camera and archives the content can be reused across many different cameras, as long as the same processing is to be - * applied across all the cameras. Individual instance properties can be defined through the use of user-defined - * parameters, which allow for a topology to be parameterized. This allows individual pipelines refer to different - * values, such as individual cameras' RTSP endpoints and credentials. Overall a topology is composed of the following: - * - *

- Parameters: list of user defined parameters that can be references across the topology nodes. - Sources: list of - * one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras. - - * Processors: list of nodes which perform data analysis or transformations. - Sinks: list of one or more data sinks - * which allow for data to be stored or exported to other destinations. - */ -@Fluent -public final class PipelineTopologyUpdate extends ProxyResource { - /* - * The resource properties. - */ - @JsonProperty(value = "properties") - private PipelineTopologyPropertiesUpdate innerProperties; - - /* - * Topology kind. - */ - @JsonProperty(value = "kind") - private Kind kind; - - /* - * Describes the properties of a SKU. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: The resource properties. - * - * @return the innerProperties value. - */ - private PipelineTopologyPropertiesUpdate innerProperties() { - return this.innerProperties; - } - - /** - * Get the kind property: Topology kind. - * - * @return the kind value. - */ - public Kind kind() { - return this.kind; - } - - /** - * Set the kind property: Topology kind. - * - * @param kind the kind value to set. - * @return the PipelineTopologyUpdate object itself. - */ - public PipelineTopologyUpdate withKind(Kind kind) { - this.kind = kind; - return this; - } - - /** - * Get the sku property: Describes the properties of a SKU. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: Describes the properties of a SKU. - * - * @param sku the sku value to set. - * @return the PipelineTopologyUpdate object itself. - */ - public PipelineTopologyUpdate withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the description property: An optional description of the pipeline topology. It is recommended that the - * expected use of the topology to be described here. - * - * @return the description value. - */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: An optional description of the pipeline topology. It is recommended that the - * expected use of the topology to be described here. - * - * @param description the description value to set. - * @return the PipelineTopologyUpdate object itself. - */ - public PipelineTopologyUpdate withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new PipelineTopologyPropertiesUpdate(); - } - this.innerProperties().withDescription(description); - return this; - } - - /** - * Get the parameters property: List of the topology parameter declarations. Parameters declared here can be - * referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can - * have optional default values and can later be defined in individual instances of the pipeline. - * - * @return the parameters value. - */ - public List parameters() { - return this.innerProperties() == null ? null : this.innerProperties().parameters(); - } - - /** - * Set the parameters property: List of the topology parameter declarations. Parameters declared here can be - * referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can - * have optional default values and can later be defined in individual instances of the pipeline. - * - * @param parameters the parameters value to set. - * @return the PipelineTopologyUpdate object itself. - */ - public PipelineTopologyUpdate withParameters(List parameters) { - if (this.innerProperties() == null) { - this.innerProperties = new PipelineTopologyPropertiesUpdate(); - } - this.innerProperties().withParameters(parameters); - return this; - } - - /** - * Get the sources property: List of the topology source nodes. Source nodes enable external data to be ingested by - * the pipeline. - * - * @return the sources value. - */ - public List sources() { - return this.innerProperties() == null ? null : this.innerProperties().sources(); - } - - /** - * Set the sources property: List of the topology source nodes. Source nodes enable external data to be ingested by - * the pipeline. - * - * @param sources the sources value to set. - * @return the PipelineTopologyUpdate object itself. - */ - public PipelineTopologyUpdate withSources(List sources) { - if (this.innerProperties() == null) { - this.innerProperties = new PipelineTopologyPropertiesUpdate(); - } - this.innerProperties().withSources(sources); - return this; - } - - /** - * Get the processors property: List of the topology processor nodes. Processor nodes enable pipeline data to be - * analyzed, processed or transformed. - * - * @return the processors value. - */ - public List processors() { - return this.innerProperties() == null ? null : this.innerProperties().processors(); - } - - /** - * Set the processors property: List of the topology processor nodes. Processor nodes enable pipeline data to be - * analyzed, processed or transformed. - * - * @param processors the processors value to set. - * @return the PipelineTopologyUpdate object itself. - */ - public PipelineTopologyUpdate withProcessors(List processors) { - if (this.innerProperties() == null) { - this.innerProperties = new PipelineTopologyPropertiesUpdate(); - } - this.innerProperties().withProcessors(processors); - return this; - } - - /** - * Get the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. - * - * @return the sinks value. - */ - public List sinks() { - return this.innerProperties() == null ? null : this.innerProperties().sinks(); - } - - /** - * Set the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. - * - * @param sinks the sinks value to set. - * @return the PipelineTopologyUpdate object itself. - */ - public PipelineTopologyUpdate withSinks(List sinks) { - if (this.innerProperties() == null) { - this.innerProperties = new PipelineTopologyPropertiesUpdate(); - } - this.innerProperties().withSinks(sinks); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpoint.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpoint.java deleted file mode 100644 index 80cc82a89123..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpoint.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Private Endpoint resource. */ -@Immutable -public final class PrivateEndpoint { - /* - * The ARM identifier for Private Endpoint - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Get the id property: The ARM identifier for Private Endpoint. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnection.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnection.java deleted file mode 100644 index 04ad2e0c78b1..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnection.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; - -/** An immutable client-side representation of PrivateEndpointConnection. */ -public interface PrivateEndpointConnection { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the privateEndpoint property: The resource of private end point. - * - * @return the privateEndpoint value. - */ - PrivateEndpoint privateEndpoint(); - - /** - * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the - * connection between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); - - /** - * Gets the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @return the provisioningState value. - */ - PrivateEndpointConnectionProvisioningState provisioningState(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner object. - * - * @return the inner object. - */ - PrivateEndpointConnectionInner innerModel(); - - /** The entirety of the PrivateEndpointConnection definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** The PrivateEndpointConnection definition stages. */ - interface DefinitionStages { - /** The first stage of the PrivateEndpointConnection definition. */ - interface Blank extends WithParentResource { - } - - /** The stage of the PrivateEndpointConnection definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @return the next definition stage. - */ - WithCreate withExistingVideoAnalyzer(String resourceGroupName, String accountName); - } - - /** - * The stage of the PrivateEndpointConnection definition which contains all the minimum required properties for - * the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithPrivateEndpoint, DefinitionStages.WithPrivateLinkServiceConnectionState { - /** - * Executes the create request. - * - * @return the created resource. - */ - PrivateEndpointConnection create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - PrivateEndpointConnection create(Context context); - } - - /** The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. */ - interface WithPrivateEndpoint { - /** - * Specifies the privateEndpoint property: The resource of private end point.. - * - * @param privateEndpoint The resource of private end point. - * @return the next definition stage. - */ - WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); - } - - /** - * The stage of the PrivateEndpointConnection definition allowing to specify privateLinkServiceConnectionState. - */ - interface WithPrivateLinkServiceConnectionState { - /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. - * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. - * @return the next definition stage. - */ - WithCreate withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState); - } - } - - /** - * Begins update for the PrivateEndpointConnection resource. - * - * @return the stage of resource update. - */ - PrivateEndpointConnection.Update update(); - - /** The template for PrivateEndpointConnection update. */ - interface Update extends UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState { - /** - * Executes the update request. - * - * @return the updated resource. - */ - PrivateEndpointConnection apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - PrivateEndpointConnection apply(Context context); - } - - /** The PrivateEndpointConnection update stages. */ - interface UpdateStages { - /** The stage of the PrivateEndpointConnection update allowing to specify privateEndpoint. */ - interface WithPrivateEndpoint { - /** - * Specifies the privateEndpoint property: The resource of private end point.. - * - * @param privateEndpoint The resource of private end point. - * @return the next definition stage. - */ - Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); - } - - /** The stage of the PrivateEndpointConnection update allowing to specify privateLinkServiceConnectionState. */ - interface WithPrivateLinkServiceConnectionState { - /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. - * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. - * @return the next definition stage. - */ - Update withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - PrivateEndpointConnection refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - PrivateEndpointConnection refresh(Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionListResult.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionListResult.java deleted file mode 100644 index 7f33eecaa826..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionListResult.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionListResultInner; -import java.util.List; - -/** An immutable client-side representation of PrivateEndpointConnectionListResult. */ -public interface PrivateEndpointConnectionListResult { - /** - * Gets the value property: Array of private endpoint connections. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionListResultInner - * object. - * - * @return the inner object. - */ - PrivateEndpointConnectionListResultInner innerModel(); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionProvisioningState.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionProvisioningState.java deleted file mode 100644 index 661cf25b28bc..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionProvisioningState.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PrivateEndpointConnectionProvisioningState. */ -public final class PrivateEndpointConnectionProvisioningState - extends ExpandableStringEnum { - /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ - public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Creating for PrivateEndpointConnectionProvisioningState. */ - public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); - - /** Static value Deleting for PrivateEndpointConnectionProvisioningState. */ - public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); - - /** Static value Failed for PrivateEndpointConnectionProvisioningState. */ - public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); - - /** - * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointConnectionProvisioningState. - */ - @JsonCreator - public static PrivateEndpointConnectionProvisioningState fromString(String name) { - return fromString(name, PrivateEndpointConnectionProvisioningState.class); - } - - /** - * Gets known PrivateEndpointConnectionProvisioningState values. - * - * @return known PrivateEndpointConnectionProvisioningState values. - */ - public static Collection values() { - return values(PrivateEndpointConnectionProvisioningState.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnections.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnections.java deleted file mode 100644 index 0257896ad00c..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnections.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of PrivateEndpointConnections. */ -public interface PrivateEndpointConnections { - /** - * Get all private endpoint connections under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under video analyzer account. - */ - PrivateEndpointConnectionListResult list(String resourceGroupName, String accountName); - - /** - * Get all private endpoint connections under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections under video analyzer account along with {@link Response}. - */ - Response listWithResponse(String resourceGroupName, String accountName, - Context context); - - /** - * Get private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection under video analyzer account. - */ - PrivateEndpointConnection get(String resourceGroupName, String accountName, String name); - - /** - * Get private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection under video analyzer account along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String accountName, String name, - Context context); - - /** - * Delete private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String name); - - /** - * Delete private endpoint connection under video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Private endpoint connection name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String accountName, String name, Context context); - - /** - * Get private endpoint connection under video analyzer account. - * - * @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 private endpoint connection under video analyzer account along with {@link Response}. - */ - PrivateEndpointConnection getById(String id); - - /** - * Get private endpoint connection under video analyzer account. - * - * @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 private endpoint connection under video analyzer account along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete private endpoint connection under video analyzer account. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete private endpoint connection under video analyzer account. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new PrivateEndpointConnection resource. - * - * @param name resource name. - * @return the first stage of the new PrivateEndpointConnection definition. - */ - PrivateEndpointConnection.DefinitionStages.Blank define(String name); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionsCreateOrUpdateHeaders.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionsCreateOrUpdateHeaders.java deleted file mode 100644 index ad03d3bdc1a5..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionsCreateOrUpdateHeaders.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The PrivateEndpointConnectionsCreateOrUpdateHeaders model. */ -@Fluent -public final class PrivateEndpointConnectionsCreateOrUpdateHeaders { - /* - * The Retry-After property. - */ - @JsonProperty(value = "Retry-After") - private Integer retryAfter; - - /* - * The Azure-AsyncOperation property. - */ - @JsonProperty(value = "Azure-AsyncOperation") - private String azureAsyncOperation; - - /* - * The Location property. - */ - @JsonProperty(value = "Location") - private String location; - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public Integer retryAfter() { - return this.retryAfter; - } - - /** - * Set the retryAfter property: The Retry-After property. - * - * @param retryAfter the retryAfter value to set. - * @return the PrivateEndpointConnectionsCreateOrUpdateHeaders object itself. - */ - public PrivateEndpointConnectionsCreateOrUpdateHeaders withRetryAfter(Integer retryAfter) { - this.retryAfter = retryAfter; - return this; - } - - /** - * Get the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @return the azureAsyncOperation value. - */ - public String azureAsyncOperation() { - return this.azureAsyncOperation; - } - - /** - * Set the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @param azureAsyncOperation the azureAsyncOperation value to set. - * @return the PrivateEndpointConnectionsCreateOrUpdateHeaders object itself. - */ - public PrivateEndpointConnectionsCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { - this.azureAsyncOperation = azureAsyncOperation; - return this; - } - - /** - * 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 PrivateEndpointConnectionsCreateOrUpdateHeaders object itself. - */ - public PrivateEndpointConnectionsCreateOrUpdateHeaders 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionsCreateOrUpdateResponse.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionsCreateOrUpdateResponse.java deleted file mode 100644 index 863d3faa594e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionsCreateOrUpdateResponse.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; - -/** Contains all response data for the createOrUpdate operation. */ -public final class PrivateEndpointConnectionsCreateOrUpdateResponse - extends ResponseBase { - /** - * Creates an instance of PrivateEndpointConnectionsCreateOrUpdateResponse. - * - * @param request the request which resulted in this PrivateEndpointConnectionsCreateOrUpdateResponse. - * @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 PrivateEndpointConnectionsCreateOrUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - PrivateEndpointConnectionInner value, PrivateEndpointConnectionsCreateOrUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public PrivateEndpointConnectionInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointServiceConnectionStatus.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointServiceConnectionStatus.java deleted file mode 100644 index 1cd3bd10a5ee..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointServiceConnectionStatus.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PrivateEndpointServiceConnectionStatus. */ -public final class PrivateEndpointServiceConnectionStatus - extends ExpandableStringEnum { - /** Static value Pending for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); - - /** Static value Approved for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); - - /** Static value Rejected for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); - - /** - * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointServiceConnectionStatus. - */ - @JsonCreator - public static PrivateEndpointServiceConnectionStatus fromString(String name) { - return fromString(name, PrivateEndpointServiceConnectionStatus.class); - } - - /** - * Gets known PrivateEndpointServiceConnectionStatus values. - * - * @return known PrivateEndpointServiceConnectionStatus values. - */ - public static Collection values() { - return values(PrivateEndpointServiceConnectionStatus.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResource.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResource.java deleted file mode 100644 index b1721e9c979e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResource.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceInner; -import java.util.List; - -/** An immutable client-side representation of PrivateLinkResource. */ -public interface PrivateLinkResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - String groupId(); - - /** - * Gets the requiredMembers property: The private link resource required member names. - * - * @return the requiredMembers value. - */ - List requiredMembers(); - - /** - * Gets the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @return the requiredZoneNames value. - */ - List requiredZoneNames(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceInner object. - * - * @return the inner object. - */ - PrivateLinkResourceInner innerModel(); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResourceListResult.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResourceListResult.java deleted file mode 100644 index 1ea5ad139ed2..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResourceListResult.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceListResultInner; -import java.util.List; - -/** An immutable client-side representation of PrivateLinkResourceListResult. */ -public interface PrivateLinkResourceListResult { - /** - * Gets the value property: Array of private link resources. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceListResultInner object. - * - * @return the inner object. - */ - PrivateLinkResourceListResultInner innerModel(); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResources.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResources.java deleted file mode 100644 index 8a45dc53cd56..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResources.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of PrivateLinkResources. */ -public interface PrivateLinkResources { - /** - * Get list of group IDs for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs for video analyzer account. - */ - PrivateLinkResourceListResult list(String resourceGroupName, String accountName); - - /** - * Get list of group IDs for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of group IDs for video analyzer account along with {@link Response}. - */ - Response listWithResponse(String resourceGroupName, String accountName, - Context context); - - /** - * Get group ID for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Name of the private link resource (Group 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 group ID for video analyzer account. - */ - PrivateLinkResource get(String resourceGroupName, String accountName, String name); - - /** - * Get group ID for video analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param name Name of the private link resource (Group 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 group ID for video analyzer account along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String accountName, String name, - Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkServiceConnectionState.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkServiceConnectionState.java deleted file mode 100644 index 824c4510175a..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkServiceConnectionState.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** A collection of information about the state of the connection between service consumer and provider. */ -@Fluent -public final class PrivateLinkServiceConnectionState { - /* - * Indicates whether the connection has been Approved/Rejected/Removed by - * the owner of the service. - */ - @JsonProperty(value = "status") - private PrivateEndpointServiceConnectionStatus status; - - /* - * The reason for approval/rejection of the connection. - */ - @JsonProperty(value = "description") - private String description; - - /* - * A message indicating if changes on the service provider require any - * updates on the consumer. - */ - @JsonProperty(value = "actionsRequired") - private String actionsRequired; - - /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @return the status value. - */ - public PrivateEndpointServiceConnectionStatus status() { - return this.status; - } - - /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @param status the status value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) { - this.status = status; - return this; - } - - /** - * Get the description property: The reason for approval/rejection of the connection. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The reason for approval/rejection of the connection. - * - * @param description the description value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @return the actionsRequired value. - */ - public String actionsRequired() { - return this.actionsRequired; - } - - /** - * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @param actionsRequired the actionsRequired value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { - this.actionsRequired = actionsRequired; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ProcessorNodeBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ProcessorNodeBase.java deleted file mode 100644 index 33ee4849586b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ProcessorNodeBase.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Base class for topology processor nodes. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@type", - defaultImpl = ProcessorNodeBase.class) -@JsonTypeName("#Microsoft.VideoAnalyzer.ProcessorNodeBase") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.EncoderProcessor", value = EncoderProcessor.class) }) -@Fluent -public class ProcessorNodeBase extends NodeBase { - /* - * An array of upstream node references within the topology to be used as - * inputs for this node. - */ - @JsonProperty(value = "inputs", required = true) - private List inputs; - - /** - * Get the inputs property: An array of upstream node references within the topology to be used as inputs for this - * node. - * - * @return the inputs value. - */ - public List inputs() { - return this.inputs; - } - - /** - * Set the inputs property: An array of upstream node references within the topology to be used as inputs for this - * node. - * - * @param inputs the inputs value to set. - * @return the ProcessorNodeBase object itself. - */ - public ProcessorNodeBase withInputs(List inputs) { - this.inputs = inputs; - return this; - } - - /** {@inheritDoc} */ - @Override - public ProcessorNodeBase withName(String name) { - super.withName(name); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (inputs() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property inputs in model ProcessorNodeBase")); - } else { - inputs().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ProcessorNodeBase.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Properties.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Properties.java deleted file mode 100644 index ad241f35c323..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Properties.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Metric properties. */ -@Immutable -public final class Properties { - /* - * The service specifications. - */ - @JsonProperty(value = "serviceSpecification", access = JsonProperty.Access.WRITE_ONLY) - private ServiceSpecification serviceSpecification; - - /** - * Get the serviceSpecification property: The service specifications. - * - * @return the serviceSpecification value. - */ - public ServiceSpecification serviceSpecification() { - return this.serviceSpecification; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serviceSpecification() != null) { - serviceSpecification().validate(); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ProvisioningState.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ProvisioningState.java deleted file mode 100644 index ceefa5a20257..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ProvisioningState.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ProvisioningState. */ -public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Failed for ProvisioningState. */ - public static final ProvisioningState FAILED = fromString("Failed"); - - /** Static value InProgress for ProvisioningState. */ - public static final ProvisioningState IN_PROGRESS = fromString("InProgress"); - - /** Static value Succeeded for ProvisioningState. */ - public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Creates or finds a ProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProvisioningState. - */ - @JsonCreator - public static ProvisioningState fromString(String name) { - return fromString(name, ProvisioningState.class); - } - - /** - * Gets known ProvisioningState values. - * - * @return known ProvisioningState values. - */ - public static Collection values() { - return values(ProvisioningState.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PublicNetworkAccess.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PublicNetworkAccess.java deleted file mode 100644 index 5f8455885a91..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PublicNetworkAccess.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PublicNetworkAccess. */ -public final class PublicNetworkAccess extends ExpandableStringEnum { - /** Static value Enabled for PublicNetworkAccess. */ - public static final PublicNetworkAccess ENABLED = fromString("Enabled"); - - /** Static value Disabled for PublicNetworkAccess. */ - public static final PublicNetworkAccess DISABLED = fromString("Disabled"); - - /** - * Creates or finds a PublicNetworkAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicNetworkAccess. - */ - @JsonCreator - public static PublicNetworkAccess fromString(String name) { - return fromString(name, PublicNetworkAccess.class); - } - - /** - * Gets known PublicNetworkAccess values. - * - * @return known PublicNetworkAccess values. - */ - public static Collection values() { - return values(PublicNetworkAccess.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ResourceIdentity.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ResourceIdentity.java deleted file mode 100644 index e25b45f1c8cc..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ResourceIdentity.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The user assigned managed identity to use when accessing a resource. */ -@Fluent -public class ResourceIdentity { - /* - * The user assigned managed identity's resource identifier to use when - * accessing a resource. - */ - @JsonProperty(value = "userAssignedIdentity", required = true) - private String userAssignedIdentity; - - /** - * Get the userAssignedIdentity property: The user assigned managed identity's resource identifier to use when - * accessing a resource. - * - * @return the userAssignedIdentity value. - */ - public String userAssignedIdentity() { - return this.userAssignedIdentity; - } - - /** - * Set the userAssignedIdentity property: The user assigned managed identity's resource identifier to use when - * accessing a resource. - * - * @param userAssignedIdentity the userAssignedIdentity value to set. - * @return the ResourceIdentity object itself. - */ - public ResourceIdentity withUserAssignedIdentity(String userAssignedIdentity) { - this.userAssignedIdentity = userAssignedIdentity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userAssignedIdentity() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property userAssignedIdentity in model ResourceIdentity")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ResourceIdentity.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RsaTokenKey.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RsaTokenKey.java deleted file mode 100644 index 0b1f44b01ab8..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RsaTokenKey.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Required validation properties for tokens generated with RSA algorithm. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.RsaTokenKey") -@Fluent -public final class RsaTokenKey extends TokenKey { - /* - * RSA algorithm to be used: RS256, RS384 or RS512. - */ - @JsonProperty(value = "alg", required = true) - private AccessPolicyRsaAlgo alg; - - /* - * RSA public key modulus. - */ - @JsonProperty(value = "n", required = true) - private String n; - - /* - * RSA public key exponent. - */ - @JsonProperty(value = "e", required = true) - private String e; - - /** - * Get the alg property: RSA algorithm to be used: RS256, RS384 or RS512. - * - * @return the alg value. - */ - public AccessPolicyRsaAlgo alg() { - return this.alg; - } - - /** - * Set the alg property: RSA algorithm to be used: RS256, RS384 or RS512. - * - * @param alg the alg value to set. - * @return the RsaTokenKey object itself. - */ - public RsaTokenKey withAlg(AccessPolicyRsaAlgo alg) { - this.alg = alg; - return this; - } - - /** - * Get the n property: RSA public key modulus. - * - * @return the n value. - */ - public String n() { - return this.n; - } - - /** - * Set the n property: RSA public key modulus. - * - * @param n the n value to set. - * @return the RsaTokenKey object itself. - */ - public RsaTokenKey withN(String n) { - this.n = n; - return this; - } - - /** - * Get the e property: RSA public key exponent. - * - * @return the e value. - */ - public String e() { - return this.e; - } - - /** - * Set the e property: RSA public key exponent. - * - * @param e the e value to set. - * @return the RsaTokenKey object itself. - */ - public RsaTokenKey withE(String e) { - this.e = e; - return this; - } - - /** {@inheritDoc} */ - @Override - public RsaTokenKey withKid(String kid) { - super.withKid(kid); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (alg() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property alg in model RsaTokenKey")); - } - if (n() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property n in model RsaTokenKey")); - } - if (e() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property e in model RsaTokenKey")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RsaTokenKey.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RtspSource.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RtspSource.java deleted file mode 100644 index 15ea1c0b177b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RtspSource.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** RTSP source allows for media from an RTSP camera or generic RTSP server to be ingested into a pipeline. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.RtspSource") -@Fluent -public final class RtspSource extends SourceNodeBase { - /* - * Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. - * When using TCP, the RTP packets are interleaved on the TCP RTSP - * connection. When using HTTP, the RTSP messages are exchanged through - * long lived HTTP connections, and the RTP packages are interleaved in the - * HTTP connections alongside the RTSP messages. - */ - @JsonProperty(value = "transport") - private RtspTransport transport; - - /* - * RTSP endpoint information for Video Analyzer to connect to. This - * contains the required information for Video Analyzer to connect to RTSP - * cameras and/or generic RTSP servers. - */ - @JsonProperty(value = "endpoint", required = true) - private EndpointBase endpoint; - - /** - * Get the transport property: Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When using TCP, - * the RTP packets are interleaved on the TCP RTSP connection. When using HTTP, the RTSP messages are exchanged - * through long lived HTTP connections, and the RTP packages are interleaved in the HTTP connections alongside the - * RTSP messages. - * - * @return the transport value. - */ - public RtspTransport transport() { - return this.transport; - } - - /** - * Set the transport property: Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When using TCP, - * the RTP packets are interleaved on the TCP RTSP connection. When using HTTP, the RTSP messages are exchanged - * through long lived HTTP connections, and the RTP packages are interleaved in the HTTP connections alongside the - * RTSP messages. - * - * @param transport the transport value to set. - * @return the RtspSource object itself. - */ - public RtspSource withTransport(RtspTransport transport) { - this.transport = transport; - return this; - } - - /** - * Get the endpoint property: RTSP endpoint information for Video Analyzer to connect to. This contains the required - * information for Video Analyzer to connect to RTSP cameras and/or generic RTSP servers. - * - * @return the endpoint value. - */ - public EndpointBase endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint property: RTSP endpoint information for Video Analyzer to connect to. This contains the required - * information for Video Analyzer to connect to RTSP cameras and/or generic RTSP servers. - * - * @param endpoint the endpoint value to set. - * @return the RtspSource object itself. - */ - public RtspSource withEndpoint(EndpointBase endpoint) { - this.endpoint = endpoint; - return this; - } - - /** {@inheritDoc} */ - @Override - public RtspSource withName(String name) { - super.withName(name); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (endpoint() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property endpoint in model RtspSource")); - } else { - endpoint().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RtspSource.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RtspTransport.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RtspTransport.java deleted file mode 100644 index 1a43fbe2ef44..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RtspTransport.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for RtspTransport. */ -public final class RtspTransport extends ExpandableStringEnum { - /** Static value Http for RtspTransport. */ - public static final RtspTransport HTTP = fromString("Http"); - - /** Static value Tcp for RtspTransport. */ - public static final RtspTransport TCP = fromString("Tcp"); - - /** - * Creates or finds a RtspTransport from its string representation. - * - * @param name a name to look for. - * @return the corresponding RtspTransport. - */ - @JsonCreator - public static RtspTransport fromString(String name) { - return fromString(name, RtspTransport.class); - } - - /** - * Gets known RtspTransport values. - * - * @return known RtspTransport values. - */ - public static Collection values() { - return values(RtspTransport.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SecureIotDeviceRemoteTunnel.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SecureIotDeviceRemoteTunnel.java deleted file mode 100644 index 3ec2b1bff842..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SecureIotDeviceRemoteTunnel.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A remote tunnel securely established using IoT Hub device information. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.SecureIotDeviceRemoteTunnel") -@Fluent -public final class SecureIotDeviceRemoteTunnel extends TunnelBase { - /* - * Name of the IoT Hub. - */ - @JsonProperty(value = "iotHubName", required = true) - private String iotHubName; - - /* - * The IoT device id to use when establishing the remote tunnel. This - * string is case-sensitive. - */ - @JsonProperty(value = "deviceId", required = true) - private String deviceId; - - /** - * Get the iotHubName property: Name of the IoT Hub. - * - * @return the iotHubName value. - */ - public String iotHubName() { - return this.iotHubName; - } - - /** - * Set the iotHubName property: Name of the IoT Hub. - * - * @param iotHubName the iotHubName value to set. - * @return the SecureIotDeviceRemoteTunnel object itself. - */ - public SecureIotDeviceRemoteTunnel withIotHubName(String iotHubName) { - this.iotHubName = iotHubName; - return this; - } - - /** - * Get the deviceId property: The IoT device id to use when establishing the remote tunnel. This string is - * case-sensitive. - * - * @return the deviceId value. - */ - public String deviceId() { - return this.deviceId; - } - - /** - * Set the deviceId property: The IoT device id to use when establishing the remote tunnel. This string is - * case-sensitive. - * - * @param deviceId the deviceId value to set. - * @return the SecureIotDeviceRemoteTunnel object itself. - */ - public SecureIotDeviceRemoteTunnel withDeviceId(String deviceId) { - this.deviceId = deviceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (iotHubName() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property iotHubName in model SecureIotDeviceRemoteTunnel")); - } - if (deviceId() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property deviceId in model SecureIotDeviceRemoteTunnel")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SecureIotDeviceRemoteTunnel.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ServiceSpecification.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ServiceSpecification.java deleted file mode 100644 index 05a1b7713055..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ServiceSpecification.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The service metric specifications. */ -@Immutable -public final class ServiceSpecification { - /* - * List of log specifications. - */ - @JsonProperty(value = "logSpecifications", access = JsonProperty.Access.WRITE_ONLY) - private List logSpecifications; - - /* - * List of metric specifications. - */ - @JsonProperty(value = "metricSpecifications", access = JsonProperty.Access.WRITE_ONLY) - private List metricSpecifications; - - /** - * Get the logSpecifications property: List of log specifications. - * - * @return the logSpecifications value. - */ - public List logSpecifications() { - return this.logSpecifications; - } - - /** - * Get the metricSpecifications property: List of metric specifications. - * - * @return the metricSpecifications value. - */ - public List metricSpecifications() { - return this.metricSpecifications; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logSpecifications() != null) { - logSpecifications().forEach(e -> e.validate()); - } - if (metricSpecifications() != null) { - metricSpecifications().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SinkNodeBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SinkNodeBase.java deleted file mode 100644 index 75760b73b5b0..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SinkNodeBase.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Base class for topology sink nodes. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@type", - defaultImpl = SinkNodeBase.class) -@JsonTypeName("#Microsoft.VideoAnalyzer.SinkNodeBase") -@JsonSubTypes({ @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.VideoSink", value = VideoSink.class) }) -@Fluent -public class SinkNodeBase extends NodeBase { - /* - * An array of upstream node references within the topology to be used as - * inputs for this node. - */ - @JsonProperty(value = "inputs", required = true) - private List inputs; - - /** - * Get the inputs property: An array of upstream node references within the topology to be used as inputs for this - * node. - * - * @return the inputs value. - */ - public List inputs() { - return this.inputs; - } - - /** - * Set the inputs property: An array of upstream node references within the topology to be used as inputs for this - * node. - * - * @param inputs the inputs value to set. - * @return the SinkNodeBase object itself. - */ - public SinkNodeBase withInputs(List inputs) { - this.inputs = inputs; - return this; - } - - /** {@inheritDoc} */ - @Override - public SinkNodeBase withName(String name) { - super.withName(name); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (inputs() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property inputs in model SinkNodeBase")); - } else { - inputs().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SinkNodeBase.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Sku.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Sku.java deleted file mode 100644 index e6dcf2653071..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Sku.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The SKU details. */ -@Fluent -public final class Sku { - /* - * The SKU name. - */ - @JsonProperty(value = "name", required = true) - private SkuName name; - - /* - * The SKU tier. - */ - @JsonProperty(value = "tier", access = JsonProperty.Access.WRITE_ONLY) - private SkuTier tier; - - /** - * Get the name property: The SKU name. - * - * @return the name value. - */ - public SkuName name() { - return this.name; - } - - /** - * Set the name property: The SKU name. - * - * @param name the name value to set. - * @return the Sku object itself. - */ - public Sku withName(SkuName name) { - this.name = name; - return this; - } - - /** - * Get the tier property: The SKU tier. - * - * @return the tier value. - */ - public SkuTier tier() { - return this.tier; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Sku")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Sku.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SkuName.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SkuName.java deleted file mode 100644 index d947edebadec..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SkuName.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SkuName. */ -public final class SkuName extends ExpandableStringEnum { - /** Static value Live_S1 for SkuName. */ - public static final SkuName LIVE_S1 = fromString("Live_S1"); - - /** Static value Batch_S1 for SkuName. */ - public static final SkuName BATCH_S1 = fromString("Batch_S1"); - - /** - * Creates or finds a SkuName from its string representation. - * - * @param name a name to look for. - * @return the corresponding SkuName. - */ - @JsonCreator - public static SkuName fromString(String name) { - return fromString(name, SkuName.class); - } - - /** - * Gets known SkuName values. - * - * @return known SkuName values. - */ - public static Collection values() { - return values(SkuName.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SkuTier.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SkuTier.java deleted file mode 100644 index 6334b6d21be7..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SkuTier.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SkuTier. */ -public final class SkuTier extends ExpandableStringEnum { - /** Static value Standard for SkuTier. */ - public static final SkuTier STANDARD = fromString("Standard"); - - /** - * Creates or finds a SkuTier from its string representation. - * - * @param name a name to look for. - * @return the corresponding SkuTier. - */ - @JsonCreator - public static SkuTier fromString(String name) { - return fromString(name, SkuTier.class); - } - - /** - * Gets known SkuTier values. - * - * @return known SkuTier values. - */ - public static Collection values() { - return values(SkuTier.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SourceNodeBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SourceNodeBase.java deleted file mode 100644 index e5477baa4107..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SourceNodeBase.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base class for topology source nodes. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@type", - defaultImpl = SourceNodeBase.class) -@JsonTypeName("#Microsoft.VideoAnalyzer.SourceNodeBase") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.RtspSource", value = RtspSource.class), - @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.VideoSource", value = VideoSource.class) }) -@Fluent -public class SourceNodeBase extends NodeBase { - /** {@inheritDoc} */ - @Override - public SourceNodeBase withName(String name) { - super.withName(name); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/StorageAccount.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/StorageAccount.java deleted file mode 100644 index e2c60dfc7dd5..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/StorageAccount.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The details about the associated storage account. */ -@Fluent -public final class StorageAccount { - /* - * The ID of the storage account resource. Video Analyzer relies on tables, - * queues, and blobs. The primary storage account must be a Standard - * Storage account (either Microsoft.ClassicStorage or Microsoft.Storage). - */ - @JsonProperty(value = "id", required = true) - private String id; - - /* - * A managed identity that Video Analyzer will use to access the storage - * account. - */ - @JsonProperty(value = "identity") - private ResourceIdentity identity; - - /* - * The current status of the storage account mapping. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private String status; - - /** - * Get the id property: The ID of the storage account resource. Video Analyzer relies on tables, queues, and blobs. - * The primary storage account must be a Standard Storage account (either Microsoft.ClassicStorage or - * Microsoft.Storage). - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The ID of the storage account resource. Video Analyzer relies on tables, queues, and blobs. - * The primary storage account must be a Standard Storage account (either Microsoft.ClassicStorage or - * Microsoft.Storage). - * - * @param id the id value to set. - * @return the StorageAccount object itself. - */ - public StorageAccount withId(String id) { - this.id = id; - return this; - } - - /** - * Get the identity property: A managed identity that Video Analyzer will use to access the storage account. - * - * @return the identity value. - */ - public ResourceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: A managed identity that Video Analyzer will use to access the storage account. - * - * @param identity the identity value to set. - * @return the StorageAccount object itself. - */ - public StorageAccount withIdentity(ResourceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the status property: The current status of the storage account mapping. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property id in model StorageAccount")); - } - if (identity() != null) { - identity().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(StorageAccount.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TimeSequenceBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TimeSequenceBase.java deleted file mode 100644 index 73145e5b8e73..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TimeSequenceBase.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A sequence of datetime ranges as a string. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@type", - defaultImpl = TimeSequenceBase.class) -@JsonTypeName("TimeSequenceBase") -@JsonSubTypes({ - @JsonSubTypes.Type( - name = "#Microsoft.VideoAnalyzer.VideoSequenceAbsoluteTimeMarkers", - value = VideoSequenceAbsoluteTimeMarkers.class) }) -@Immutable -public class TimeSequenceBase { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TlsEndpoint.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TlsEndpoint.java deleted file mode 100644 index a4cd303e55a7..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TlsEndpoint.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * TLS endpoint describes an endpoint that the pipeline can connect to over TLS transport (data is encrypted in - * transit). - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.TlsEndpoint") -@Fluent -public final class TlsEndpoint extends EndpointBase { - /* - * List of trusted certificate authorities when authenticating a TLS - * connection. A null list designates that Azure Video Analyzer's list of - * trusted authorities should be used. - */ - @JsonProperty(value = "trustedCertificates") - private CertificateSource trustedCertificates; - - /* - * Validation options to use when authenticating a TLS connection. By - * default, strict validation is used. - */ - @JsonProperty(value = "validationOptions") - private TlsValidationOptions validationOptions; - - /** - * Get the trustedCertificates property: List of trusted certificate authorities when authenticating a TLS - * connection. A null list designates that Azure Video Analyzer's list of trusted authorities should be used. - * - * @return the trustedCertificates value. - */ - public CertificateSource trustedCertificates() { - return this.trustedCertificates; - } - - /** - * Set the trustedCertificates property: List of trusted certificate authorities when authenticating a TLS - * connection. A null list designates that Azure Video Analyzer's list of trusted authorities should be used. - * - * @param trustedCertificates the trustedCertificates value to set. - * @return the TlsEndpoint object itself. - */ - public TlsEndpoint withTrustedCertificates(CertificateSource trustedCertificates) { - this.trustedCertificates = trustedCertificates; - return this; - } - - /** - * Get the validationOptions property: Validation options to use when authenticating a TLS connection. By default, - * strict validation is used. - * - * @return the validationOptions value. - */ - public TlsValidationOptions validationOptions() { - return this.validationOptions; - } - - /** - * Set the validationOptions property: Validation options to use when authenticating a TLS connection. By default, - * strict validation is used. - * - * @param validationOptions the validationOptions value to set. - * @return the TlsEndpoint object itself. - */ - public TlsEndpoint withValidationOptions(TlsValidationOptions validationOptions) { - this.validationOptions = validationOptions; - return this; - } - - /** {@inheritDoc} */ - @Override - public TlsEndpoint withCredentials(CredentialsBase credentials) { - super.withCredentials(credentials); - return this; - } - - /** {@inheritDoc} */ - @Override - public TlsEndpoint withUrl(String url) { - super.withUrl(url); - return this; - } - - /** {@inheritDoc} */ - @Override - public TlsEndpoint withTunnel(TunnelBase tunnel) { - super.withTunnel(tunnel); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (trustedCertificates() != null) { - trustedCertificates().validate(); - } - if (validationOptions() != null) { - validationOptions().validate(); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TlsValidationOptions.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TlsValidationOptions.java deleted file mode 100644 index 7cfa1892d650..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TlsValidationOptions.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Options for controlling the validation of TLS endpoints. */ -@Fluent -public final class TlsValidationOptions { - /* - * When set to 'true' causes the certificate subject name validation to be - * skipped. Default is 'false'. - */ - @JsonProperty(value = "ignoreHostname") - private String ignoreHostname; - - /* - * When set to 'true' causes the certificate chain trust validation to be - * skipped. Default is 'false'. - */ - @JsonProperty(value = "ignoreSignature") - private String ignoreSignature; - - /** - * Get the ignoreHostname property: When set to 'true' causes the certificate subject name validation to be skipped. - * Default is 'false'. - * - * @return the ignoreHostname value. - */ - public String ignoreHostname() { - return this.ignoreHostname; - } - - /** - * Set the ignoreHostname property: When set to 'true' causes the certificate subject name validation to be skipped. - * Default is 'false'. - * - * @param ignoreHostname the ignoreHostname value to set. - * @return the TlsValidationOptions object itself. - */ - public TlsValidationOptions withIgnoreHostname(String ignoreHostname) { - this.ignoreHostname = ignoreHostname; - return this; - } - - /** - * Get the ignoreSignature property: When set to 'true' causes the certificate chain trust validation to be skipped. - * Default is 'false'. - * - * @return the ignoreSignature value. - */ - public String ignoreSignature() { - return this.ignoreSignature; - } - - /** - * Set the ignoreSignature property: When set to 'true' causes the certificate chain trust validation to be skipped. - * Default is 'false'. - * - * @param ignoreSignature the ignoreSignature value to set. - * @return the TlsValidationOptions object itself. - */ - public TlsValidationOptions withIgnoreSignature(String ignoreSignature) { - this.ignoreSignature = ignoreSignature; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TokenClaim.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TokenClaim.java deleted file mode 100644 index 80ff394cfd0b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TokenClaim.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties for expected token claims. */ -@Fluent -public final class TokenClaim { - /* - * Name of the claim which must be present on the token. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * Expected value of the claim to be present on the token. - */ - @JsonProperty(value = "value", required = true) - private String value; - - /** - * Get the name property: Name of the claim which must be present on the token. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the claim which must be present on the token. - * - * @param name the name value to set. - * @return the TokenClaim object itself. - */ - public TokenClaim withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: Expected value of the claim to be present on the token. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Expected value of the claim to be present on the token. - * - * @param value the value value to set. - * @return the TokenClaim object itself. - */ - public TokenClaim withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property name in model TokenClaim")); - } - if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model TokenClaim")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TokenClaim.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TokenKey.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TokenKey.java deleted file mode 100644 index 813c01f0a13c..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TokenKey.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Key properties for JWT token validation. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@type", - defaultImpl = TokenKey.class) -@JsonTypeName("TokenKey") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.RsaTokenKey", value = RsaTokenKey.class), - @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.EccTokenKey", value = EccTokenKey.class) }) -@Fluent -public class TokenKey { - /* - * JWT token key id. Validation keys are looked up based on the key id - * present on the JWT token header. - */ - @JsonProperty(value = "kid", required = true) - private String kid; - - /** - * Get the kid property: JWT token key id. Validation keys are looked up based on the key id present on the JWT - * token header. - * - * @return the kid value. - */ - public String kid() { - return this.kid; - } - - /** - * Set the kid property: JWT token key id. Validation keys are looked up based on the key id present on the JWT - * token header. - * - * @param kid the kid value to set. - * @return the TokenKey object itself. - */ - public TokenKey withKid(String kid) { - this.kid = kid; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (kid() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property kid in model TokenKey")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TokenKey.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TunnelBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TunnelBase.java deleted file mode 100644 index bc19763d79cb..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TunnelBase.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base class for tunnel objects. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@type", - defaultImpl = TunnelBase.class) -@JsonTypeName("TunnelBase") -@JsonSubTypes({ - @JsonSubTypes.Type( - name = "#Microsoft.VideoAnalyzer.SecureIotDeviceRemoteTunnel", - value = SecureIotDeviceRemoteTunnel.class) }) -@Immutable -public class TunnelBase { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UnsecuredEndpoint.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UnsecuredEndpoint.java deleted file mode 100644 index 4c797bb03f2f..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UnsecuredEndpoint.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Unsecured endpoint describes an endpoint that the pipeline can connect to over clear transport (no encryption in - * transit). - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.UnsecuredEndpoint") -@Fluent -public final class UnsecuredEndpoint extends EndpointBase { - /** {@inheritDoc} */ - @Override - public UnsecuredEndpoint withCredentials(CredentialsBase credentials) { - super.withCredentials(credentials); - return this; - } - - /** {@inheritDoc} */ - @Override - public UnsecuredEndpoint withUrl(String url) { - super.withUrl(url); - return this; - } - - /** {@inheritDoc} */ - @Override - public UnsecuredEndpoint withTunnel(TunnelBase tunnel) { - super.withTunnel(tunnel); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UserAssignedManagedIdentity.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UserAssignedManagedIdentity.java deleted file mode 100644 index 875ae672c553..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UserAssignedManagedIdentity.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.UUID; - -/** The details of the user assigned managed identity used by the Video Analyzer resource. */ -@Immutable -public class UserAssignedManagedIdentity { - /* - * The client ID. - */ - @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) - private UUID clientId; - - /* - * The principal ID. - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private UUID principalId; - - /** - * Get the clientId property: The client ID. - * - * @return the clientId value. - */ - public UUID clientId() { - return this.clientId; - } - - /** - * Get the principalId property: The principal ID. - * - * @return the principalId value. - */ - public UUID principalId() { - return this.principalId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UsernamePasswordCredentials.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UsernamePasswordCredentials.java deleted file mode 100644 index e2d4d5c15ae6..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UsernamePasswordCredentials.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Username and password credentials. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.UsernamePasswordCredentials") -@Fluent -public final class UsernamePasswordCredentials extends CredentialsBase { - /* - * Username to be presented as part of the credentials. - */ - @JsonProperty(value = "username", required = true) - private String username; - - /* - * Password to be presented as part of the credentials. It is recommended - * that this value is parameterized as a secret string in order to prevent - * this value to be returned as part of the resource on API requests. - */ - @JsonProperty(value = "password", required = true) - private String password; - - /** - * Get the username property: Username to be presented as part of the credentials. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: Username to be presented as part of the credentials. - * - * @param username the username value to set. - * @return the UsernamePasswordCredentials object itself. - */ - public UsernamePasswordCredentials withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: Password to be presented as part of the credentials. It is recommended that this value - * is parameterized as a secret string in order to prevent this value to be returned as part of the resource on API - * requests. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: Password to be presented as part of the credentials. It is recommended that this value - * is parameterized as a secret string in order to prevent this value to be returned as part of the resource on API - * requests. - * - * @param password the password value to set. - * @return the UsernamePasswordCredentials object itself. - */ - public UsernamePasswordCredentials withPassword(String password) { - this.password = password; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (username() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property username in model UsernamePasswordCredentials")); - } - if (password() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property password in model UsernamePasswordCredentials")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UsernamePasswordCredentials.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzer.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzer.java deleted file mode 100644 index a74ec8c90e30..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzer.java +++ /dev/null @@ -1,409 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; -import java.util.List; -import java.util.Map; - -/** An immutable client-side representation of VideoAnalyzer. */ -public interface VideoAnalyzer { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the identity property: The identities associated to the Video Analyzer resource. - * - * @return the identity value. - */ - VideoAnalyzerIdentity identity(); - - /** - * Gets the storageAccounts property: The storage accounts for this resource. - * - * @return the storageAccounts value. - */ - List storageAccounts(); - - /** - * Gets the endpoints property: The endpoints associated with this resource. - * - * @return the endpoints value. - */ - List endpoints(); - - /** - * Gets the encryption property: The account encryption properties. - * - * @return the encryption value. - */ - AccountEncryption encryption(); - - /** - * Gets the iotHubs property: The IoT Hubs for this resource. - * - * @return the iotHubs value. - */ - List iotHubs(); - - /** - * Gets the publicNetworkAccess property: Whether or not public network access is allowed for resources under the - * Video Analyzer account. - * - * @return the publicNetworkAccess value. - */ - PublicNetworkAccess publicNetworkAccess(); - - /** - * Gets the networkAccessControl property: Network access control for Video Analyzer. - * - * @return the networkAccessControl value. - */ - NetworkAccessControl networkAccessControl(); - - /** - * Gets the provisioningState property: Provisioning state of the Video Analyzer account. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the privateEndpointConnections property: Private Endpoint Connections created under Video Analyzer account. - * - * @return the privateEndpointConnections value. - */ - List privateEndpointConnections(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner object. - * - * @return the inner object. - */ - VideoAnalyzerInner innerModel(); - - /** The entirety of the VideoAnalyzer definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** The VideoAnalyzer definition stages. */ - interface DefinitionStages { - /** The first stage of the VideoAnalyzer definition. */ - interface Blank extends WithLocation { - } - - /** The stage of the VideoAnalyzer 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 VideoAnalyzer definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the VideoAnalyzer definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, - DefinitionStages.WithStorageAccounts, DefinitionStages.WithEncryption, DefinitionStages.WithIotHubs, - DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithNetworkAccessControl { - /** - * Executes the create request. - * - * @return the created resource. - */ - VideoAnalyzer create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - VideoAnalyzer create(Context context); - } - - /** The stage of the VideoAnalyzer 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 VideoAnalyzer definition allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: The identities associated to the Video Analyzer resource.. - * - * @param identity The identities associated to the Video Analyzer resource. - * @return the next definition stage. - */ - WithCreate withIdentity(VideoAnalyzerIdentity identity); - } - - /** The stage of the VideoAnalyzer definition allowing to specify storageAccounts. */ - interface WithStorageAccounts { - /** - * Specifies the storageAccounts property: The storage accounts for this resource.. - * - * @param storageAccounts The storage accounts for this resource. - * @return the next definition stage. - */ - WithCreate withStorageAccounts(List storageAccounts); - } - - /** The stage of the VideoAnalyzer definition allowing to specify encryption. */ - interface WithEncryption { - /** - * Specifies the encryption property: The account encryption properties.. - * - * @param encryption The account encryption properties. - * @return the next definition stage. - */ - WithCreate withEncryption(AccountEncryption encryption); - } - - /** The stage of the VideoAnalyzer definition allowing to specify iotHubs. */ - interface WithIotHubs { - /** - * Specifies the iotHubs property: The IoT Hubs for this resource.. - * - * @param iotHubs The IoT Hubs for this resource. - * @return the next definition stage. - */ - WithCreate withIotHubs(List iotHubs); - } - - /** The stage of the VideoAnalyzer definition allowing to specify publicNetworkAccess. */ - interface WithPublicNetworkAccess { - /** - * Specifies the publicNetworkAccess property: Whether or not public network access is allowed for resources - * under the Video Analyzer account.. - * - * @param publicNetworkAccess Whether or not public network access is allowed for resources under the Video - * Analyzer account. - * @return the next definition stage. - */ - WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); - } - - /** The stage of the VideoAnalyzer definition allowing to specify networkAccessControl. */ - interface WithNetworkAccessControl { - /** - * Specifies the networkAccessControl property: Network access control for Video Analyzer.. - * - * @param networkAccessControl Network access control for Video Analyzer. - * @return the next definition stage. - */ - WithCreate withNetworkAccessControl(NetworkAccessControl networkAccessControl); - } - } - - /** - * Begins update for the VideoAnalyzer resource. - * - * @return the stage of resource update. - */ - VideoAnalyzer.Update update(); - - /** The template for VideoAnalyzer update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithStorageAccounts, - UpdateStages.WithEncryption, UpdateStages.WithIotHubs, UpdateStages.WithPublicNetworkAccess, - UpdateStages.WithNetworkAccessControl { - /** - * Executes the update request. - * - * @return the updated resource. - */ - VideoAnalyzer apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - VideoAnalyzer apply(Context context); - } - - /** The VideoAnalyzer update stages. */ - interface UpdateStages { - /** The stage of the VideoAnalyzer update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** The stage of the VideoAnalyzer update allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: The identities associated to the Video Analyzer resource.. - * - * @param identity The identities associated to the Video Analyzer resource. - * @return the next definition stage. - */ - Update withIdentity(VideoAnalyzerIdentity identity); - } - - /** The stage of the VideoAnalyzer update allowing to specify storageAccounts. */ - interface WithStorageAccounts { - /** - * Specifies the storageAccounts property: The storage accounts for this resource.. - * - * @param storageAccounts The storage accounts for this resource. - * @return the next definition stage. - */ - Update withStorageAccounts(List storageAccounts); - } - - /** The stage of the VideoAnalyzer update allowing to specify encryption. */ - interface WithEncryption { - /** - * Specifies the encryption property: The account encryption properties.. - * - * @param encryption The account encryption properties. - * @return the next definition stage. - */ - Update withEncryption(AccountEncryption encryption); - } - - /** The stage of the VideoAnalyzer update allowing to specify iotHubs. */ - interface WithIotHubs { - /** - * Specifies the iotHubs property: The IoT Hubs for this resource.. - * - * @param iotHubs The IoT Hubs for this resource. - * @return the next definition stage. - */ - Update withIotHubs(List iotHubs); - } - - /** The stage of the VideoAnalyzer update allowing to specify publicNetworkAccess. */ - interface WithPublicNetworkAccess { - /** - * Specifies the publicNetworkAccess property: Whether or not public network access is allowed for resources - * under the Video Analyzer account.. - * - * @param publicNetworkAccess Whether or not public network access is allowed for resources under the Video - * Analyzer account. - * @return the next definition stage. - */ - Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); - } - - /** The stage of the VideoAnalyzer update allowing to specify networkAccessControl. */ - interface WithNetworkAccessControl { - /** - * Specifies the networkAccessControl property: Network access control for Video Analyzer.. - * - * @param networkAccessControl Network access control for Video Analyzer. - * @return the next definition stage. - */ - Update withNetworkAccessControl(NetworkAccessControl networkAccessControl); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - VideoAnalyzer refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - VideoAnalyzer refresh(Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerCollection.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerCollection.java deleted file mode 100644 index cde276e0d3a0..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerCollection.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerCollectionInner; -import java.util.List; - -/** An immutable client-side representation of VideoAnalyzerCollection. */ -public interface VideoAnalyzerCollection { - /** - * Gets the value property: A collection of VideoAnalyzer items. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerCollectionInner object. - * - * @return the inner object. - */ - VideoAnalyzerCollectionInner innerModel(); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerEndpointType.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerEndpointType.java deleted file mode 100644 index f35e4ab5d110..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerEndpointType.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for VideoAnalyzerEndpointType. */ -public final class VideoAnalyzerEndpointType extends ExpandableStringEnum { - /** Static value ClientApi for VideoAnalyzerEndpointType. */ - public static final VideoAnalyzerEndpointType CLIENT_API = fromString("ClientApi"); - - /** - * Creates or finds a VideoAnalyzerEndpointType from its string representation. - * - * @param name a name to look for. - * @return the corresponding VideoAnalyzerEndpointType. - */ - @JsonCreator - public static VideoAnalyzerEndpointType fromString(String name) { - return fromString(name, VideoAnalyzerEndpointType.class); - } - - /** - * Gets known VideoAnalyzerEndpointType values. - * - * @return known VideoAnalyzerEndpointType values. - */ - public static Collection values() { - return values(VideoAnalyzerEndpointType.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerIdentity.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerIdentity.java deleted file mode 100644 index 5bd852a93faf..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerIdentity.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The managed identity for the Video Analyzer resource. */ -@Fluent -public class VideoAnalyzerIdentity { - /* - * The identity type. - */ - @JsonProperty(value = "type", required = true) - private String type; - - /* - * The User Assigned Managed Identities. - */ - @JsonProperty(value = "userAssignedIdentities") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map userAssignedIdentities; - - /** - * Get the type property: The identity type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: The identity type. - * - * @param type the type value to set. - * @return the VideoAnalyzerIdentity object itself. - */ - public VideoAnalyzerIdentity withType(String type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: The User Assigned Managed Identities. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The User Assigned Managed Identities. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the VideoAnalyzerIdentity object itself. - */ - public VideoAnalyzerIdentity - withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property type in model VideoAnalyzerIdentity")); - } - if (userAssignedIdentities() != null) { - userAssignedIdentities().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VideoAnalyzerIdentity.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationResults.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationResults.java deleted file mode 100644 index 736bf9e1e752..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationResults.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of VideoAnalyzerOperationResults. */ -public interface VideoAnalyzerOperationResults { - /** - * Get video analyzer operation result. - * - * @param locationName Location name. - * @param operationId Operation 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 video analyzer operation result. - */ - VideoAnalyzer get(String locationName, String operationId); - - /** - * Get video analyzer operation result. - * - * @param locationName Location name. - * @param operationId Operation 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 video analyzer operation result along with {@link Response}. - */ - Response getWithResponse(String locationName, String operationId, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationStatus.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationStatus.java deleted file mode 100644 index b0390e246a8e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationStatus.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.management.exception.ManagementError; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerOperationStatusInner; - -/** An immutable client-side representation of VideoAnalyzerOperationStatus. */ -public interface VideoAnalyzerOperationStatus { - /** - * Gets the name property: Operation identifier. - * - * @return the name value. - */ - String name(); - - /** - * Gets the id property: Operation resource ID. - * - * @return the id value. - */ - String id(); - - /** - * Gets the startTime property: Operation start time. - * - * @return the startTime value. - */ - String startTime(); - - /** - * Gets the endTime property: Operation end time. - * - * @return the endTime value. - */ - String endTime(); - - /** - * Gets the status property: Operation status. - * - * @return the status value. - */ - String status(); - - /** - * Gets the error property: The error detail. - * - * @return the error value. - */ - ManagementError error(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerOperationStatusInner object. - * - * @return the inner object. - */ - VideoAnalyzerOperationStatusInner innerModel(); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationStatuses.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationStatuses.java deleted file mode 100644 index 76408b30529b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationStatuses.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of VideoAnalyzerOperationStatuses. */ -public interface VideoAnalyzerOperationStatuses { - /** - * Get video analyzer operation status. - * - * @param locationName Location name. - * @param operationId Operation 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 video analyzer operation status. - */ - VideoAnalyzerOperationStatus get(String locationName, String operationId); - - /** - * Get video analyzer operation status. - * - * @param locationName Location name. - * @param operationId Operation 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 video analyzer operation status along with {@link Response}. - */ - Response getWithResponse(String locationName, String operationId, Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerPrivateEndpointConnectionOperationStatus.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerPrivateEndpointConnectionOperationStatus.java deleted file mode 100644 index cbffb540b2e6..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerPrivateEndpointConnectionOperationStatus.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.management.exception.ManagementError; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerPrivateEndpointConnectionOperationStatusInner; - -/** An immutable client-side representation of VideoAnalyzerPrivateEndpointConnectionOperationStatus. */ -public interface VideoAnalyzerPrivateEndpointConnectionOperationStatus { - /** - * Gets the name property: Operation identifier. - * - * @return the name value. - */ - String name(); - - /** - * Gets the id property: Operation resource ID. - * - * @return the id value. - */ - String id(); - - /** - * Gets the startTime property: Operation start time. - * - * @return the startTime value. - */ - String startTime(); - - /** - * Gets the endTime property: Operation end time. - * - * @return the endTime value. - */ - String endTime(); - - /** - * Gets the status property: Operation status. - * - * @return the status value. - */ - String status(); - - /** - * Gets the error property: The error detail. - * - * @return the error value. - */ - ManagementError error(); - - /** - * Gets the inner - * com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerPrivateEndpointConnectionOperationStatusInner - * object. - * - * @return the inner object. - */ - VideoAnalyzerPrivateEndpointConnectionOperationStatusInner innerModel(); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerUpdate.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerUpdate.java deleted file mode 100644 index 196e4fea2143..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerUpdate.java +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerPropertiesUpdate; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** The update operation for a Video Analyzer account. */ -@Fluent -public final class VideoAnalyzerUpdate { - /* - * Resource tags. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /* - * The resource properties. - */ - @JsonProperty(value = "properties") - private VideoAnalyzerPropertiesUpdate innerProperties; - - /* - * The identities associated to the Video Analyzer resource. - */ - @JsonProperty(value = "identity") - private VideoAnalyzerIdentity identity; - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the VideoAnalyzerUpdate object itself. - */ - public VideoAnalyzerUpdate withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the innerProperties property: The resource properties. - * - * @return the innerProperties value. - */ - private VideoAnalyzerPropertiesUpdate innerProperties() { - return this.innerProperties; - } - - /** - * Get the identity property: The identities associated to the Video Analyzer resource. - * - * @return the identity value. - */ - public VideoAnalyzerIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identities associated to the Video Analyzer resource. - * - * @param identity the identity value to set. - * @return the VideoAnalyzerUpdate object itself. - */ - public VideoAnalyzerUpdate withIdentity(VideoAnalyzerIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the storageAccounts property: The storage accounts for this resource. - * - * @return the storageAccounts value. - */ - public List storageAccounts() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccounts(); - } - - /** - * Set the storageAccounts property: The storage accounts for this resource. - * - * @param storageAccounts the storageAccounts value to set. - * @return the VideoAnalyzerUpdate object itself. - */ - public VideoAnalyzerUpdate withStorageAccounts(List storageAccounts) { - if (this.innerProperties() == null) { - this.innerProperties = new VideoAnalyzerPropertiesUpdate(); - } - this.innerProperties().withStorageAccounts(storageAccounts); - return this; - } - - /** - * Get the endpoints property: The endpoints associated with this resource. - * - * @return the endpoints value. - */ - public List endpoints() { - return this.innerProperties() == null ? null : this.innerProperties().endpoints(); - } - - /** - * Get the encryption property: The account encryption properties. - * - * @return the encryption value. - */ - public AccountEncryption encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); - } - - /** - * Set the encryption property: The account encryption properties. - * - * @param encryption the encryption value to set. - * @return the VideoAnalyzerUpdate object itself. - */ - public VideoAnalyzerUpdate withEncryption(AccountEncryption encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new VideoAnalyzerPropertiesUpdate(); - } - this.innerProperties().withEncryption(encryption); - return this; - } - - /** - * Get the iotHubs property: The IoT Hubs for this resource. - * - * @return the iotHubs value. - */ - public List iotHubs() { - return this.innerProperties() == null ? null : this.innerProperties().iotHubs(); - } - - /** - * Set the iotHubs property: The IoT Hubs for this resource. - * - * @param iotHubs the iotHubs value to set. - * @return the VideoAnalyzerUpdate object itself. - */ - public VideoAnalyzerUpdate withIotHubs(List iotHubs) { - if (this.innerProperties() == null) { - this.innerProperties = new VideoAnalyzerPropertiesUpdate(); - } - this.innerProperties().withIotHubs(iotHubs); - return this; - } - - /** - * Get the publicNetworkAccess property: Whether or not public network access is allowed for resources under the - * Video Analyzer account. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); - } - - /** - * Set the publicNetworkAccess property: Whether or not public network access is allowed for resources under the - * Video Analyzer account. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the VideoAnalyzerUpdate object itself. - */ - public VideoAnalyzerUpdate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new VideoAnalyzerPropertiesUpdate(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); - return this; - } - - /** - * Get the networkAccessControl property: Network access control for Video Analyzer. - * - * @return the networkAccessControl value. - */ - public NetworkAccessControl networkAccessControl() { - return this.innerProperties() == null ? null : this.innerProperties().networkAccessControl(); - } - - /** - * Set the networkAccessControl property: Network access control for Video Analyzer. - * - * @param networkAccessControl the networkAccessControl value to set. - * @return the VideoAnalyzerUpdate object itself. - */ - public VideoAnalyzerUpdate withNetworkAccessControl(NetworkAccessControl networkAccessControl) { - if (this.innerProperties() == null) { - this.innerProperties = new VideoAnalyzerPropertiesUpdate(); - } - this.innerProperties().withNetworkAccessControl(networkAccessControl); - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the Video Analyzer account. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the privateEndpointConnections property: Private Endpoint Connections created under Video Analyzer account. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (identity() != null) { - identity().validate(); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzers.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzers.java deleted file mode 100644 index e594defb27e4..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzers.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of VideoAnalyzers. */ -public interface VideoAnalyzers { - /** - * Lists the Video Analyzer accounts in the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoAnalyzer items. - */ - VideoAnalyzerCollection list(String resourceGroupName); - - /** - * Lists the Video Analyzer accounts in the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoAnalyzer items along with {@link Response}. - */ - Response listWithResponse(String resourceGroupName, Context context); - - /** - * Get the details of the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified Video Analyzer account. - */ - VideoAnalyzer getByResourceGroup(String resourceGroupName, String accountName); - - /** - * Get the details of the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of the specified Video Analyzer account along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, - Context context); - - /** - * Delete the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String accountName); - - /** - * Delete the specified Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String accountName, Context context); - - /** - * List all Video Analyzer accounts 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 a collection of VideoAnalyzer items. - */ - VideoAnalyzerCollection listBySubscription(); - - /** - * List all Video Analyzer accounts in the specified subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoAnalyzer items along with {@link Response}. - */ - Response listBySubscriptionWithResponse(Context context); - - /** - * Get the details of the specified Video Analyzer account. - * - * @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 details of the specified Video Analyzer account along with {@link Response}. - */ - VideoAnalyzer getById(String id); - - /** - * Get the details of the specified Video Analyzer account. - * - * @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 details of the specified Video Analyzer account along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete the specified Video Analyzer account. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete the specified Video Analyzer account. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new VideoAnalyzer resource. - * - * @param name resource name. - * @return the first stage of the new VideoAnalyzer definition. - */ - VideoAnalyzer.DefinitionStages.Blank define(String name); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoArchival.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoArchival.java deleted file mode 100644 index 86a089311e82..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoArchival.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Video archival properties. */ -@Fluent -public final class VideoArchival { - /* - * Video retention period indicates the maximum age of the video archive - * segments which are intended to be kept in storage. It must be provided - * in the ISO8601 duration format in the granularity of days, up to a - * maximum of 10 years. For example, if this is set to P30D (30 days), - * content older than 30 days will be periodically deleted. This value can - * be updated at any time and the new desired retention period will be - * effective within 24 hours. - */ - @JsonProperty(value = "retentionPeriod") - private String retentionPeriod; - - /** - * Get the retentionPeriod property: Video retention period indicates the maximum age of the video archive segments - * which are intended to be kept in storage. It must be provided in the ISO8601 duration format in the granularity - * of days, up to a maximum of 10 years. For example, if this is set to P30D (30 days), content older than 30 days - * will be periodically deleted. This value can be updated at any time and the new desired retention period will be - * effective within 24 hours. - * - * @return the retentionPeriod value. - */ - public String retentionPeriod() { - return this.retentionPeriod; - } - - /** - * Set the retentionPeriod property: Video retention period indicates the maximum age of the video archive segments - * which are intended to be kept in storage. It must be provided in the ISO8601 duration format in the granularity - * of days, up to a maximum of 10 years. For example, if this is set to P30D (30 days), content older than 30 days - * will be periodically deleted. This value can be updated at any time and the new desired retention period will be - * effective within 24 hours. - * - * @param retentionPeriod the retentionPeriod value to set. - * @return the VideoArchival object itself. - */ - public VideoArchival withRetentionPeriod(String retentionPeriod) { - this.retentionPeriod = retentionPeriod; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoContentToken.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoContentToken.java deleted file mode 100644 index 8e7326ffb5a4..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoContentToken.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoContentTokenInner; -import java.time.OffsetDateTime; - -/** An immutable client-side representation of VideoContentToken. */ -public interface VideoContentToken { - /** - * Gets the expirationDate property: The content token expiration date in ISO8601 format (eg. 2021-01-01T00:00:00Z). - * - * @return the expirationDate value. - */ - OffsetDateTime expirationDate(); - - /** - * Gets the token property: The content token value to be added to the video content URL as the value for the - * "token" query string parameter. The token is specific to a single video. - * - * @return the token value. - */ - String token(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.VideoContentTokenInner object. - * - * @return the inner object. - */ - VideoContentTokenInner innerModel(); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoContentUrls.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoContentUrls.java deleted file mode 100644 index b48e9e0d2073..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoContentUrls.java +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Set of URLs to the video content. */ -@Fluent -public final class VideoContentUrls { - /* - * Video file download URL. This URL can be used in conjunction with the - * video content authorization token to download the video MP4 file. The - * resulting MP4 file can be played on any standard media player. It is - * available when the video type is 'file' and video file is available for - * consumption. - */ - @JsonProperty(value = "downloadUrl") - private String downloadUrl; - - /* - * Video archive streaming base URL. The archived content can be - * automatically played by the Azure Video Analyzer player widget. - * Alternatively, this URL can be used in conjunction with the video - * content authorization token on any compatible DASH or HLS players by - * appending the following to the base URL: - * - * - HLSv4: /manifest(format=m3u8-aapl).m3u8 - * - HLS CMAF: /manifest(format=m3u8-cmaf) - * - DASH CMAF: /manifest(format=mpd-time-cmaf) - * - * Moreover, an ongoing video recording can be played in "live mode" with - * latencies which are approximately double of the chosen video segment - * length. It is available when the video type is 'archive' and video - * archiving is enabled. - */ - @JsonProperty(value = "archiveBaseUrl") - private String archiveBaseUrl; - - /* - * Video low-latency streaming URL. The live content can be automatically - * played by the Azure Video Analyzer player widget. Alternatively, this - * URL can be used in conjunction with the video content authorization - * token to expose a WebSocket tunneled RTSP stream. It is available when - * the video type is 'archive' and a live, low-latency feed is available - * from the source. - */ - @JsonProperty(value = "rtspTunnelUrl") - private String rtspTunnelUrl; - - /* - * Video preview image URLs. These URLs can be used in conjunction with the - * video content authorization token to download the most recent still - * image from the video archive in different resolutions. They are - * available when the video type is 'archive' and preview images are - * enabled. - */ - @JsonProperty(value = "previewImageUrls") - private VideoPreviewImageUrls previewImageUrls; - - /** - * Get the downloadUrl property: Video file download URL. This URL can be used in conjunction with the video content - * authorization token to download the video MP4 file. The resulting MP4 file can be played on any standard media - * player. It is available when the video type is 'file' and video file is available for consumption. - * - * @return the downloadUrl value. - */ - public String downloadUrl() { - return this.downloadUrl; - } - - /** - * Set the downloadUrl property: Video file download URL. This URL can be used in conjunction with the video content - * authorization token to download the video MP4 file. The resulting MP4 file can be played on any standard media - * player. It is available when the video type is 'file' and video file is available for consumption. - * - * @param downloadUrl the downloadUrl value to set. - * @return the VideoContentUrls object itself. - */ - public VideoContentUrls withDownloadUrl(String downloadUrl) { - this.downloadUrl = downloadUrl; - return this; - } - - /** - * Get the archiveBaseUrl property: Video archive streaming base URL. The archived content can be automatically - * played by the Azure Video Analyzer player widget. Alternatively, this URL can be used in conjunction with the - * video content authorization token on any compatible DASH or HLS players by appending the following to the base - * URL: - * - *

- HLSv4: /manifest(format=m3u8-aapl).m3u8 - HLS CMAF: /manifest(format=m3u8-cmaf) - DASH CMAF: - * /manifest(format=mpd-time-cmaf) - * - *

Moreover, an ongoing video recording can be played in "live mode" with latencies which are approximately - * double of the chosen video segment length. It is available when the video type is 'archive' and video archiving - * is enabled. - * - * @return the archiveBaseUrl value. - */ - public String archiveBaseUrl() { - return this.archiveBaseUrl; - } - - /** - * Set the archiveBaseUrl property: Video archive streaming base URL. The archived content can be automatically - * played by the Azure Video Analyzer player widget. Alternatively, this URL can be used in conjunction with the - * video content authorization token on any compatible DASH or HLS players by appending the following to the base - * URL: - * - *

- HLSv4: /manifest(format=m3u8-aapl).m3u8 - HLS CMAF: /manifest(format=m3u8-cmaf) - DASH CMAF: - * /manifest(format=mpd-time-cmaf) - * - *

Moreover, an ongoing video recording can be played in "live mode" with latencies which are approximately - * double of the chosen video segment length. It is available when the video type is 'archive' and video archiving - * is enabled. - * - * @param archiveBaseUrl the archiveBaseUrl value to set. - * @return the VideoContentUrls object itself. - */ - public VideoContentUrls withArchiveBaseUrl(String archiveBaseUrl) { - this.archiveBaseUrl = archiveBaseUrl; - return this; - } - - /** - * Get the rtspTunnelUrl property: Video low-latency streaming URL. The live content can be automatically played by - * the Azure Video Analyzer player widget. Alternatively, this URL can be used in conjunction with the video content - * authorization token to expose a WebSocket tunneled RTSP stream. It is available when the video type is 'archive' - * and a live, low-latency feed is available from the source. - * - * @return the rtspTunnelUrl value. - */ - public String rtspTunnelUrl() { - return this.rtspTunnelUrl; - } - - /** - * Set the rtspTunnelUrl property: Video low-latency streaming URL. The live content can be automatically played by - * the Azure Video Analyzer player widget. Alternatively, this URL can be used in conjunction with the video content - * authorization token to expose a WebSocket tunneled RTSP stream. It is available when the video type is 'archive' - * and a live, low-latency feed is available from the source. - * - * @param rtspTunnelUrl the rtspTunnelUrl value to set. - * @return the VideoContentUrls object itself. - */ - public VideoContentUrls withRtspTunnelUrl(String rtspTunnelUrl) { - this.rtspTunnelUrl = rtspTunnelUrl; - return this; - } - - /** - * Get the previewImageUrls property: Video preview image URLs. These URLs can be used in conjunction with the video - * content authorization token to download the most recent still image from the video archive in different - * resolutions. They are available when the video type is 'archive' and preview images are enabled. - * - * @return the previewImageUrls value. - */ - public VideoPreviewImageUrls previewImageUrls() { - return this.previewImageUrls; - } - - /** - * Set the previewImageUrls property: Video preview image URLs. These URLs can be used in conjunction with the video - * content authorization token to download the most recent still image from the video archive in different - * resolutions. They are available when the video type is 'archive' and preview images are enabled. - * - * @param previewImageUrls the previewImageUrls value to set. - * @return the VideoContentUrls object itself. - */ - public VideoContentUrls withPreviewImageUrls(VideoPreviewImageUrls previewImageUrls) { - this.previewImageUrls = previewImageUrls; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (previewImageUrls() != null) { - previewImageUrls().validate(); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoCreationProperties.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoCreationProperties.java deleted file mode 100644 index 76df78bf6549..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoCreationProperties.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Optional properties to be used in case a new video resource needs to be created on the service. These will not take - * effect if the video already exists. - */ -@Fluent -public final class VideoCreationProperties { - /* - * Optional title provided by the user. Value can be up to 256 characters - * long. - */ - @JsonProperty(value = "title") - private String title; - - /* - * Optional description provided by the user. Value can be up to 2048 - * characters long. - */ - @JsonProperty(value = "description") - private String description; - - /* - * Segment length indicates the length of individual content files - * (segments) which are persisted to storage. Smaller segments provide - * lower archive playback latency but generate larger volume of storage - * transactions. Larger segments reduce the amount of storage transactions - * while increasing the archive playback latency. Value must be specified - * in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can vary - * between 30 seconds to 5 minutes, in 30 seconds increments. Changing this - * value after the initial call to create the video resource can lead to - * errors when uploading content to the archive. Default value is 30 - * seconds. This property is only allowed for topologies where "kind" is - * set to "live". - */ - @JsonProperty(value = "segmentLength") - private String segmentLength; - - /* - * Video retention period indicates how long the video is kept in storage. - * Value must be specified in ISO8601 duration format (i.e. "P1D" equals 1 - * day) and can vary between 1 day to 10 years, in 1 day increments. When - * absent (null), all video content is retained indefinitely. This property - * is only allowed for topologies where "kind" is set to "live". - */ - @JsonProperty(value = "retentionPeriod") - private String retentionPeriod; - - /** - * Get the title property: Optional title provided by the user. Value can be up to 256 characters long. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: Optional title provided by the user. Value can be up to 256 characters long. - * - * @param title the title value to set. - * @return the VideoCreationProperties object itself. - */ - public VideoCreationProperties withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description property: Optional description provided by the user. Value can be up to 2048 characters long. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Optional description provided by the user. Value can be up to 2048 characters long. - * - * @param description the description value to set. - * @return the VideoCreationProperties object itself. - */ - public VideoCreationProperties withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the segmentLength property: Segment length indicates the length of individual content files (segments) which - * are persisted to storage. Smaller segments provide lower archive playback latency but generate larger volume of - * storage transactions. Larger segments reduce the amount of storage transactions while increasing the archive - * playback latency. Value must be specified in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can - * vary between 30 seconds to 5 minutes, in 30 seconds increments. Changing this value after the initial call to - * create the video resource can lead to errors when uploading content to the archive. Default value is 30 seconds. - * This property is only allowed for topologies where "kind" is set to "live". - * - * @return the segmentLength value. - */ - public String segmentLength() { - return this.segmentLength; - } - - /** - * Set the segmentLength property: Segment length indicates the length of individual content files (segments) which - * are persisted to storage. Smaller segments provide lower archive playback latency but generate larger volume of - * storage transactions. Larger segments reduce the amount of storage transactions while increasing the archive - * playback latency. Value must be specified in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can - * vary between 30 seconds to 5 minutes, in 30 seconds increments. Changing this value after the initial call to - * create the video resource can lead to errors when uploading content to the archive. Default value is 30 seconds. - * This property is only allowed for topologies where "kind" is set to "live". - * - * @param segmentLength the segmentLength value to set. - * @return the VideoCreationProperties object itself. - */ - public VideoCreationProperties withSegmentLength(String segmentLength) { - this.segmentLength = segmentLength; - return this; - } - - /** - * Get the retentionPeriod property: Video retention period indicates how long the video is kept in storage. Value - * must be specified in ISO8601 duration format (i.e. "P1D" equals 1 day) and can vary between 1 day to 10 years, in - * 1 day increments. When absent (null), all video content is retained indefinitely. This property is only allowed - * for topologies where "kind" is set to "live". - * - * @return the retentionPeriod value. - */ - public String retentionPeriod() { - return this.retentionPeriod; - } - - /** - * Set the retentionPeriod property: Video retention period indicates how long the video is kept in storage. Value - * must be specified in ISO8601 duration format (i.e. "P1D" equals 1 day) and can vary between 1 day to 10 years, in - * 1 day increments. When absent (null), all video content is retained indefinitely. This property is only allowed - * for topologies where "kind" is set to "live". - * - * @param retentionPeriod the retentionPeriod value to set. - * @return the VideoCreationProperties object itself. - */ - public VideoCreationProperties withRetentionPeriod(String retentionPeriod) { - this.retentionPeriod = retentionPeriod; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEncoderBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEncoderBase.java deleted file mode 100644 index af5a420244a1..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEncoderBase.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Base type for all video encoding presets, which define the recipe or instructions on how the input video should be - * processed. - */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@type", - defaultImpl = VideoEncoderBase.class) -@JsonTypeName("VideoEncoderBase") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.VideoEncoderH264", value = VideoEncoderH264.class) }) -@Fluent -public class VideoEncoderBase { - /* - * The maximum bitrate, in kilobits per second or Kbps, at which video - * should be encoded. If omitted, encoder sets it automatically to try and - * match the quality of the input video. - */ - @JsonProperty(value = "bitrateKbps") - private String bitrateKbps; - - /* - * The frame rate (in frames per second) of the encoded video. The value - * must be greater than zero, and less than or equal to 300. If omitted, - * the encoder uses the average frame rate of the input video. - */ - @JsonProperty(value = "frameRate") - private String frameRate; - - /* - * Describes the resolution of the encoded video. If omitted, the encoder - * uses the resolution of the input video. - */ - @JsonProperty(value = "scale") - private VideoScale scale; - - /** - * Get the bitrateKbps property: The maximum bitrate, in kilobits per second or Kbps, at which video should be - * encoded. If omitted, encoder sets it automatically to try and match the quality of the input video. - * - * @return the bitrateKbps value. - */ - public String bitrateKbps() { - return this.bitrateKbps; - } - - /** - * Set the bitrateKbps property: The maximum bitrate, in kilobits per second or Kbps, at which video should be - * encoded. If omitted, encoder sets it automatically to try and match the quality of the input video. - * - * @param bitrateKbps the bitrateKbps value to set. - * @return the VideoEncoderBase object itself. - */ - public VideoEncoderBase withBitrateKbps(String bitrateKbps) { - this.bitrateKbps = bitrateKbps; - return this; - } - - /** - * Get the frameRate property: The frame rate (in frames per second) of the encoded video. The value must be greater - * than zero, and less than or equal to 300. If omitted, the encoder uses the average frame rate of the input video. - * - * @return the frameRate value. - */ - public String frameRate() { - return this.frameRate; - } - - /** - * Set the frameRate property: The frame rate (in frames per second) of the encoded video. The value must be greater - * than zero, and less than or equal to 300. If omitted, the encoder uses the average frame rate of the input video. - * - * @param frameRate the frameRate value to set. - * @return the VideoEncoderBase object itself. - */ - public VideoEncoderBase withFrameRate(String frameRate) { - this.frameRate = frameRate; - return this; - } - - /** - * Get the scale property: Describes the resolution of the encoded video. If omitted, the encoder uses the - * resolution of the input video. - * - * @return the scale value. - */ - public VideoScale scale() { - return this.scale; - } - - /** - * Set the scale property: Describes the resolution of the encoded video. If omitted, the encoder uses the - * resolution of the input video. - * - * @param scale the scale value to set. - * @return the VideoEncoderBase object itself. - */ - public VideoEncoderBase withScale(VideoScale scale) { - this.scale = scale; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scale() != null) { - scale().validate(); - } - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEncoderH264.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEncoderH264.java deleted file mode 100644 index abbf892b4943..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEncoderH264.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A custom preset for encoding video with the H.264 (AVC) codec. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.VideoEncoderH264") -@Fluent -public final class VideoEncoderH264 extends VideoEncoderBase { - /** {@inheritDoc} */ - @Override - public VideoEncoderH264 withBitrateKbps(String bitrateKbps) { - super.withBitrateKbps(bitrateKbps); - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoEncoderH264 withFrameRate(String frameRate) { - super.withFrameRate(frameRate); - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoEncoderH264 withScale(VideoScale scale) { - super.withScale(scale); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEntity.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEntity.java deleted file mode 100644 index 7f29c289a786..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEntity.java +++ /dev/null @@ -1,313 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoEntityInner; - -/** An immutable client-side representation of VideoEntity. */ -public interface VideoEntity { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the title property: Optional video title provided by the user. Value can be up to 256 characters long. - * - * @return the title value. - */ - String title(); - - /** - * Gets the description property: Optional video description provided by the user. Value can be up to 2048 - * characters long. - * - * @return the description value. - */ - String description(); - - /** - * Gets the typePropertiesType property: Video content type. Different content types are suitable for different - * applications and scenarios. - * - * @return the typePropertiesType value. - */ - VideoType typePropertiesType(); - - /** - * Gets the flags property: Video flags contain information about the available video actions and its dynamic - * properties based on the current video state. - * - * @return the flags value. - */ - VideoFlags flags(); - - /** - * Gets the contentUrls property: Set of URLs to the video content. - * - * @return the contentUrls value. - */ - VideoContentUrls contentUrls(); - - /** - * Gets the mediaInfo property: Contains information about the video and audio content. - * - * @return the mediaInfo value. - */ - VideoMediaInfo mediaInfo(); - - /** - * Gets the archival property: Video archival properties. - * - * @return the archival value. - */ - VideoArchival archival(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.VideoEntityInner object. - * - * @return the inner object. - */ - VideoEntityInner innerModel(); - - /** The entirety of the VideoEntity definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** The VideoEntity definition stages. */ - interface DefinitionStages { - /** The first stage of the VideoEntity definition. */ - interface Blank extends WithParentResource { - } - - /** The stage of the VideoEntity definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @return the next definition stage. - */ - WithCreate withExistingVideoAnalyzer(String resourceGroupName, String accountName); - } - - /** - * The stage of the VideoEntity 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.WithTitle, DefinitionStages.WithDescription, - DefinitionStages.WithMediaInfo, DefinitionStages.WithArchival { - /** - * Executes the create request. - * - * @return the created resource. - */ - VideoEntity create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - VideoEntity create(Context context); - } - - /** The stage of the VideoEntity definition allowing to specify title. */ - interface WithTitle { - /** - * Specifies the title property: Optional video title provided by the user. Value can be up to 256 - * characters long.. - * - * @param title Optional video title provided by the user. Value can be up to 256 characters long. - * @return the next definition stage. - */ - WithCreate withTitle(String title); - } - - /** The stage of the VideoEntity definition allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: Optional video description provided by the user. Value can be up to - * 2048 characters long.. - * - * @param description Optional video description provided by the user. Value can be up to 2048 characters - * long. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - - /** The stage of the VideoEntity definition allowing to specify mediaInfo. */ - interface WithMediaInfo { - /** - * Specifies the mediaInfo property: Contains information about the video and audio content.. - * - * @param mediaInfo Contains information about the video and audio content. - * @return the next definition stage. - */ - WithCreate withMediaInfo(VideoMediaInfo mediaInfo); - } - - /** The stage of the VideoEntity definition allowing to specify archival. */ - interface WithArchival { - /** - * Specifies the archival property: Video archival properties.. - * - * @param archival Video archival properties. - * @return the next definition stage. - */ - WithCreate withArchival(VideoArchival archival); - } - } - - /** - * Begins update for the VideoEntity resource. - * - * @return the stage of resource update. - */ - VideoEntity.Update update(); - - /** The template for VideoEntity update. */ - interface Update extends UpdateStages.WithTitle, UpdateStages.WithDescription, UpdateStages.WithMediaInfo, - UpdateStages.WithArchival { - /** - * Executes the update request. - * - * @return the updated resource. - */ - VideoEntity apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - VideoEntity apply(Context context); - } - - /** The VideoEntity update stages. */ - interface UpdateStages { - /** The stage of the VideoEntity update allowing to specify title. */ - interface WithTitle { - /** - * Specifies the title property: Optional video title provided by the user. Value can be up to 256 - * characters long.. - * - * @param title Optional video title provided by the user. Value can be up to 256 characters long. - * @return the next definition stage. - */ - Update withTitle(String title); - } - - /** The stage of the VideoEntity update allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: Optional video description provided by the user. Value can be up to - * 2048 characters long.. - * - * @param description Optional video description provided by the user. Value can be up to 2048 characters - * long. - * @return the next definition stage. - */ - Update withDescription(String description); - } - - /** The stage of the VideoEntity update allowing to specify mediaInfo. */ - interface WithMediaInfo { - /** - * Specifies the mediaInfo property: Contains information about the video and audio content.. - * - * @param mediaInfo Contains information about the video and audio content. - * @return the next definition stage. - */ - Update withMediaInfo(VideoMediaInfo mediaInfo); - } - - /** The stage of the VideoEntity update allowing to specify archival. */ - interface WithArchival { - /** - * Specifies the archival property: Video archival properties.. - * - * @param archival Video archival properties. - * @return the next definition stage. - */ - Update withArchival(VideoArchival archival); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - VideoEntity refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - VideoEntity refresh(Context context); - - /** - * Generates a streaming token which can be used for accessing content from video content URLs, for a video resource - * with the given name. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return "Video content token grants access to the video content URLs.". - */ - VideoContentToken listContentToken(); - - /** - * Generates a streaming token which can be used for accessing content from video content URLs, for a video resource - * with the given name. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return "Video content token grants access to the video content URLs." along with {@link Response}. - */ - Response listContentTokenWithResponse(Context context); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEntityCollection.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEntityCollection.java deleted file mode 100644 index c4c2f194ffac..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEntityCollection.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoEntityInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A collection of VideoEntity items. */ -@Fluent -public final class VideoEntityCollection { - /* - * A collection of VideoEntity items. - */ - @JsonProperty(value = "value") - private List value; - - /* - * A link to the next page of the collection (when the collection contains - * too many results to return in one response). - */ - @JsonProperty(value = "@nextLink") - private String nextLink; - - /** - * Get the value property: A collection of VideoEntity items. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A collection of VideoEntity items. - * - * @param value the value value to set. - * @return the VideoEntityCollection object itself. - */ - public VideoEntityCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @param nextLink the nextLink value to set. - * @return the VideoEntityCollection object itself. - */ - public VideoEntityCollection 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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoFlags.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoFlags.java deleted file mode 100644 index 33983fc9b1b4..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoFlags.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Video flags contain information about the available video actions and its dynamic properties based on the current - * video state. - */ -@Fluent -public final class VideoFlags { - /* - * Value indicating whether or not the video can be streamed. Only - * "archive" type videos can be streamed. - */ - @JsonProperty(value = "canStream", required = true) - private boolean canStream; - - /* - * Value indicating whether or not there has ever been data recorded or - * uploaded into the video. Newly created videos have this value set to - * false. - */ - @JsonProperty(value = "hasData", required = true) - private boolean hasData; - - /* - * Value indicating whether or not the video is currently being referenced - * be an active pipeline. The fact that is being referenced, doesn't - * necessarily indicate that data is being received. For example, video - * recording may be gated on events or camera may not be accessible at the - * time. - */ - @JsonProperty(value = "isInUse", required = true) - private boolean isInUse; - - /** - * Get the canStream property: Value indicating whether or not the video can be streamed. Only "archive" type videos - * can be streamed. - * - * @return the canStream value. - */ - public boolean canStream() { - return this.canStream; - } - - /** - * Set the canStream property: Value indicating whether or not the video can be streamed. Only "archive" type videos - * can be streamed. - * - * @param canStream the canStream value to set. - * @return the VideoFlags object itself. - */ - public VideoFlags withCanStream(boolean canStream) { - this.canStream = canStream; - return this; - } - - /** - * Get the hasData property: Value indicating whether or not there has ever been data recorded or uploaded into the - * video. Newly created videos have this value set to false. - * - * @return the hasData value. - */ - public boolean hasData() { - return this.hasData; - } - - /** - * Set the hasData property: Value indicating whether or not there has ever been data recorded or uploaded into the - * video. Newly created videos have this value set to false. - * - * @param hasData the hasData value to set. - * @return the VideoFlags object itself. - */ - public VideoFlags withHasData(boolean hasData) { - this.hasData = hasData; - return this; - } - - /** - * Get the isInUse property: Value indicating whether or not the video is currently being referenced be an active - * pipeline. The fact that is being referenced, doesn't necessarily indicate that data is being received. For - * example, video recording may be gated on events or camera may not be accessible at the time. - * - * @return the isInUse value. - */ - public boolean isInUse() { - return this.isInUse; - } - - /** - * Set the isInUse property: Value indicating whether or not the video is currently being referenced be an active - * pipeline. The fact that is being referenced, doesn't necessarily indicate that data is being received. For - * example, video recording may be gated on events or camera may not be accessible at the time. - * - * @param isInUse the isInUse value to set. - * @return the VideoFlags object itself. - */ - public VideoFlags withIsInUse(boolean isInUse) { - this.isInUse = isInUse; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoMediaInfo.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoMediaInfo.java deleted file mode 100644 index 891407ccadaf..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoMediaInfo.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Contains information about the video and audio content. */ -@Fluent -public final class VideoMediaInfo { - /* - * Video segment length indicates the length of individual video files - * (segments) which are persisted to storage. Smaller segments provide - * lower archive playback latency but generate larger volume of storage - * transactions. Larger segments reduce the amount of storage transactions - * while increasing the archive playback latency. Value must be specified - * in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can vary - * between 30 seconds to 5 minutes, in 30 seconds increments. - */ - @JsonProperty(value = "segmentLength") - private String segmentLength; - - /** - * Get the segmentLength property: Video segment length indicates the length of individual video files (segments) - * which are persisted to storage. Smaller segments provide lower archive playback latency but generate larger - * volume of storage transactions. Larger segments reduce the amount of storage transactions while increasing the - * archive playback latency. Value must be specified in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and - * can vary between 30 seconds to 5 minutes, in 30 seconds increments. - * - * @return the segmentLength value. - */ - public String segmentLength() { - return this.segmentLength; - } - - /** - * Set the segmentLength property: Video segment length indicates the length of individual video files (segments) - * which are persisted to storage. Smaller segments provide lower archive playback latency but generate larger - * volume of storage transactions. Larger segments reduce the amount of storage transactions while increasing the - * archive playback latency. Value must be specified in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and - * can vary between 30 seconds to 5 minutes, in 30 seconds increments. - * - * @param segmentLength the segmentLength value to set. - * @return the VideoMediaInfo object itself. - */ - public VideoMediaInfo withSegmentLength(String segmentLength) { - this.segmentLength = segmentLength; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoPreviewImageUrls.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoPreviewImageUrls.java deleted file mode 100644 index bbaed478896b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoPreviewImageUrls.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Video preview image URLs. These URLs can be used in conjunction with the video content authorization token to - * download the most recent still image from the video archive in different resolutions. They are available when the - * video type is 'archive' and preview images are enabled. - */ -@Fluent -public final class VideoPreviewImageUrls { - /* - * Low resolution preview image URL. - */ - @JsonProperty(value = "small") - private String small; - - /* - * Medium resolution preview image URL. - */ - @JsonProperty(value = "medium") - private String medium; - - /* - * High resolution preview image URL. - */ - @JsonProperty(value = "large") - private String large; - - /** - * Get the small property: Low resolution preview image URL. - * - * @return the small value. - */ - public String small() { - return this.small; - } - - /** - * Set the small property: Low resolution preview image URL. - * - * @param small the small value to set. - * @return the VideoPreviewImageUrls object itself. - */ - public VideoPreviewImageUrls withSmall(String small) { - this.small = small; - return this; - } - - /** - * Get the medium property: Medium resolution preview image URL. - * - * @return the medium value. - */ - public String medium() { - return this.medium; - } - - /** - * Set the medium property: Medium resolution preview image URL. - * - * @param medium the medium value to set. - * @return the VideoPreviewImageUrls object itself. - */ - public VideoPreviewImageUrls withMedium(String medium) { - this.medium = medium; - return this; - } - - /** - * Get the large property: High resolution preview image URL. - * - * @return the large value. - */ - public String large() { - return this.large; - } - - /** - * Set the large property: High resolution preview image URL. - * - * @param large the large value to set. - * @return the VideoPreviewImageUrls object itself. - */ - public VideoPreviewImageUrls withLarge(String large) { - this.large = large; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoPublishingOptions.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoPublishingOptions.java deleted file mode 100644 index defb250774ca..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoPublishingOptions.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Optional flags used to change how video is published. These are only allowed for topologies where "kind" is set to - * "live". - */ -@Fluent -public final class VideoPublishingOptions { - /* - * When set to 'true' content will not be archived or recorded. This is - * used, for example, when the topology is used only for low latency video - * streaming. Default is 'false'. If set to 'true', then - * "disableRtspPublishing" must be set to 'false'. - */ - @JsonProperty(value = "disableArchive") - private String disableArchive; - - /* - * When set to 'true' the RTSP playback URL will not be published, - * disabling low latency streaming. This is used, for example, when the - * topology is used only for archiving content. Default is 'false'. If set - * to 'true', then "disableArchive" must be set to 'false'. - */ - @JsonProperty(value = "disableRtspPublishing") - private String disableRtspPublishing; - - /** - * Get the disableArchive property: When set to 'true' content will not be archived or recorded. This is used, for - * example, when the topology is used only for low latency video streaming. Default is 'false'. If set to 'true', - * then "disableRtspPublishing" must be set to 'false'. - * - * @return the disableArchive value. - */ - public String disableArchive() { - return this.disableArchive; - } - - /** - * Set the disableArchive property: When set to 'true' content will not be archived or recorded. This is used, for - * example, when the topology is used only for low latency video streaming. Default is 'false'. If set to 'true', - * then "disableRtspPublishing" must be set to 'false'. - * - * @param disableArchive the disableArchive value to set. - * @return the VideoPublishingOptions object itself. - */ - public VideoPublishingOptions withDisableArchive(String disableArchive) { - this.disableArchive = disableArchive; - return this; - } - - /** - * Get the disableRtspPublishing property: When set to 'true' the RTSP playback URL will not be published, disabling - * low latency streaming. This is used, for example, when the topology is used only for archiving content. Default - * is 'false'. If set to 'true', then "disableArchive" must be set to 'false'. - * - * @return the disableRtspPublishing value. - */ - public String disableRtspPublishing() { - return this.disableRtspPublishing; - } - - /** - * Set the disableRtspPublishing property: When set to 'true' the RTSP playback URL will not be published, disabling - * low latency streaming. This is used, for example, when the topology is used only for archiving content. Default - * is 'false'. If set to 'true', then "disableArchive" must be set to 'false'. - * - * @param disableRtspPublishing the disableRtspPublishing value to set. - * @return the VideoPublishingOptions object itself. - */ - public VideoPublishingOptions withDisableRtspPublishing(String disableRtspPublishing) { - this.disableRtspPublishing = disableRtspPublishing; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoScale.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoScale.java deleted file mode 100644 index 757190d6b121..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoScale.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The video scaling information. */ -@Fluent -public final class VideoScale { - /* - * The desired output video height. - */ - @JsonProperty(value = "height") - private String height; - - /* - * The desired output video width. - */ - @JsonProperty(value = "width") - private String width; - - /* - * Describes the video scaling mode to be applied. Default mode is 'Pad'. - * If the mode is 'Pad' or 'Stretch' then both width and height must be - * specified. Else if the mode is 'PreserveAspectRatio' then only one of - * width or height need be provided. - */ - @JsonProperty(value = "mode") - private VideoScaleMode mode; - - /** - * Get the height property: The desired output video height. - * - * @return the height value. - */ - public String height() { - return this.height; - } - - /** - * Set the height property: The desired output video height. - * - * @param height the height value to set. - * @return the VideoScale object itself. - */ - public VideoScale withHeight(String height) { - this.height = height; - return this; - } - - /** - * Get the width property: The desired output video width. - * - * @return the width value. - */ - public String width() { - return this.width; - } - - /** - * Set the width property: The desired output video width. - * - * @param width the width value to set. - * @return the VideoScale object itself. - */ - public VideoScale withWidth(String width) { - this.width = width; - return this; - } - - /** - * Get the mode property: Describes the video scaling mode to be applied. Default mode is 'Pad'. If the mode is - * 'Pad' or 'Stretch' then both width and height must be specified. Else if the mode is 'PreserveAspectRatio' then - * only one of width or height need be provided. - * - * @return the mode value. - */ - public VideoScaleMode mode() { - return this.mode; - } - - /** - * Set the mode property: Describes the video scaling mode to be applied. Default mode is 'Pad'. If the mode is - * 'Pad' or 'Stretch' then both width and height must be specified. Else if the mode is 'PreserveAspectRatio' then - * only one of width or height need be provided. - * - * @param mode the mode value to set. - * @return the VideoScale object itself. - */ - public VideoScale withMode(VideoScaleMode mode) { - this.mode = mode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoScaleMode.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoScaleMode.java deleted file mode 100644 index 6ed56ed45624..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoScaleMode.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for VideoScaleMode. */ -public final class VideoScaleMode extends ExpandableStringEnum { - /** Static value Pad for VideoScaleMode. */ - public static final VideoScaleMode PAD = fromString("Pad"); - - /** Static value PreserveAspectRatio for VideoScaleMode. */ - public static final VideoScaleMode PRESERVE_ASPECT_RATIO = fromString("PreserveAspectRatio"); - - /** Static value Stretch for VideoScaleMode. */ - public static final VideoScaleMode STRETCH = fromString("Stretch"); - - /** - * Creates or finds a VideoScaleMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding VideoScaleMode. - */ - @JsonCreator - public static VideoScaleMode fromString(String name) { - return fromString(name, VideoScaleMode.class); - } - - /** - * Gets known VideoScaleMode values. - * - * @return known VideoScaleMode values. - */ - public static Collection values() { - return values(VideoScaleMode.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSequenceAbsoluteTimeMarkers.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSequenceAbsoluteTimeMarkers.java deleted file mode 100644 index 32064b455318..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSequenceAbsoluteTimeMarkers.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * A sequence of absolute datetime ranges as a string. The datetime values should follow IS08601, and the sum of the - * ranges should add up to 24 hours or less. Currently, there can be only one range specified in the sequence. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.VideoSequenceAbsoluteTimeMarkers") -@Fluent -public final class VideoSequenceAbsoluteTimeMarkers extends TimeSequenceBase { - /* - * The sequence of datetime ranges. Example: '[["2021-10-05T03:30:00Z", - * "2021-10-05T03:40:00Z"]]'. - */ - @JsonProperty(value = "ranges", required = true) - private String ranges; - - /** - * Get the ranges property: The sequence of datetime ranges. Example: '[["2021-10-05T03:30:00Z", - * "2021-10-05T03:40:00Z"]]'. - * - * @return the ranges value. - */ - public String ranges() { - return this.ranges; - } - - /** - * Set the ranges property: The sequence of datetime ranges. Example: '[["2021-10-05T03:30:00Z", - * "2021-10-05T03:40:00Z"]]'. - * - * @param ranges the ranges value to set. - * @return the VideoSequenceAbsoluteTimeMarkers object itself. - */ - public VideoSequenceAbsoluteTimeMarkers withRanges(String ranges) { - this.ranges = ranges; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (ranges() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property ranges in model VideoSequenceAbsoluteTimeMarkers")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VideoSequenceAbsoluteTimeMarkers.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSink.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSink.java deleted file mode 100644 index c688dc35c00a..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSink.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** - * Video sink in a live topology allows for video and audio to be captured, optionally archived, and published via a - * video resource. If archiving is enabled, this results in a video of type 'archive'. If used in a batch topology, this - * allows for video and audio to be stored as a file, and published via a video resource of type 'file'. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.VideoSink") -@Fluent -public final class VideoSink extends SinkNodeBase { - /* - * Name of a new or existing video resource used to capture and publish - * content. Note: if downstream of RTSP source, and if disableArchive is - * set to true, then no content is archived. - */ - @JsonProperty(value = "videoName", required = true) - private String videoName; - - /* - * Optional video properties to be used in case a new video resource needs - * to be created on the service. - */ - @JsonProperty(value = "videoCreationProperties") - private VideoCreationProperties videoCreationProperties; - - /* - * Options to change how the video sink publishes content via the video - * resource. This property is only allowed for topologies where "kind" is - * set to "live". - */ - @JsonProperty(value = "videoPublishingOptions") - private VideoPublishingOptions videoPublishingOptions; - - /** - * Get the videoName property: Name of a new or existing video resource used to capture and publish content. Note: - * if downstream of RTSP source, and if disableArchive is set to true, then no content is archived. - * - * @return the videoName value. - */ - public String videoName() { - return this.videoName; - } - - /** - * Set the videoName property: Name of a new or existing video resource used to capture and publish content. Note: - * if downstream of RTSP source, and if disableArchive is set to true, then no content is archived. - * - * @param videoName the videoName value to set. - * @return the VideoSink object itself. - */ - public VideoSink withVideoName(String videoName) { - this.videoName = videoName; - return this; - } - - /** - * Get the videoCreationProperties property: Optional video properties to be used in case a new video resource needs - * to be created on the service. - * - * @return the videoCreationProperties value. - */ - public VideoCreationProperties videoCreationProperties() { - return this.videoCreationProperties; - } - - /** - * Set the videoCreationProperties property: Optional video properties to be used in case a new video resource needs - * to be created on the service. - * - * @param videoCreationProperties the videoCreationProperties value to set. - * @return the VideoSink object itself. - */ - public VideoSink withVideoCreationProperties(VideoCreationProperties videoCreationProperties) { - this.videoCreationProperties = videoCreationProperties; - return this; - } - - /** - * Get the videoPublishingOptions property: Options to change how the video sink publishes content via the video - * resource. This property is only allowed for topologies where "kind" is set to "live". - * - * @return the videoPublishingOptions value. - */ - public VideoPublishingOptions videoPublishingOptions() { - return this.videoPublishingOptions; - } - - /** - * Set the videoPublishingOptions property: Options to change how the video sink publishes content via the video - * resource. This property is only allowed for topologies where "kind" is set to "live". - * - * @param videoPublishingOptions the videoPublishingOptions value to set. - * @return the VideoSink object itself. - */ - public VideoSink withVideoPublishingOptions(VideoPublishingOptions videoPublishingOptions) { - this.videoPublishingOptions = videoPublishingOptions; - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoSink withInputs(List inputs) { - super.withInputs(inputs); - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoSink withName(String name) { - super.withName(name); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (videoName() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property videoName in model VideoSink")); - } - if (videoCreationProperties() != null) { - videoCreationProperties().validate(); - } - if (videoPublishingOptions() != null) { - videoPublishingOptions().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VideoSink.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSource.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSource.java deleted file mode 100644 index 3b9dce940e67..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSource.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Video source allows for content from a Video Analyzer video resource to be ingested into a pipeline. Currently - * supported only with batch pipelines. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") -@JsonTypeName("#Microsoft.VideoAnalyzer.VideoSource") -@Fluent -public final class VideoSource extends SourceNodeBase { - /* - * Name of the Video Analyzer video resource to be used as the source. - */ - @JsonProperty(value = "videoName", required = true) - private String videoName; - - /* - * Describes a sequence of datetime ranges. The video source only picks up - * recorded media within these ranges. - */ - @JsonProperty(value = "timeSequences", required = true) - private TimeSequenceBase timeSequences; - - /** - * Get the videoName property: Name of the Video Analyzer video resource to be used as the source. - * - * @return the videoName value. - */ - public String videoName() { - return this.videoName; - } - - /** - * Set the videoName property: Name of the Video Analyzer video resource to be used as the source. - * - * @param videoName the videoName value to set. - * @return the VideoSource object itself. - */ - public VideoSource withVideoName(String videoName) { - this.videoName = videoName; - return this; - } - - /** - * Get the timeSequences property: Describes a sequence of datetime ranges. The video source only picks up recorded - * media within these ranges. - * - * @return the timeSequences value. - */ - public TimeSequenceBase timeSequences() { - return this.timeSequences; - } - - /** - * Set the timeSequences property: Describes a sequence of datetime ranges. The video source only picks up recorded - * media within these ranges. - * - * @param timeSequences the timeSequences value to set. - * @return the VideoSource object itself. - */ - public VideoSource withTimeSequences(TimeSequenceBase timeSequences) { - this.timeSequences = timeSequences; - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoSource withName(String name) { - super.withName(name); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (videoName() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property videoName in model VideoSource")); - } - if (timeSequences() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property timeSequences in model VideoSource")); - } else { - timeSequences().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VideoSource.class); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoType.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoType.java deleted file mode 100644 index fafda95f340b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoType.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for VideoType. */ -public final class VideoType extends ExpandableStringEnum { - /** Static value Archive for VideoType. */ - public static final VideoType ARCHIVE = fromString("Archive"); - - /** Static value File for VideoType. */ - public static final VideoType FILE = fromString("File"); - - /** - * Creates or finds a VideoType from its string representation. - * - * @param name a name to look for. - * @return the corresponding VideoType. - */ - @JsonCreator - public static VideoType fromString(String name) { - return fromString(name, VideoType.class); - } - - /** - * Gets known VideoType values. - * - * @return known VideoType values. - */ - public static Collection values() { - return values(VideoType.class); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Videos.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Videos.java deleted file mode 100644 index 394f8a7dd8a6..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Videos.java +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.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 Videos. */ -public interface Videos { - /** - * Retrieves a list of video resources that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoEntity items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Retrieves a list of video resources that have been created, along with their JSON representations. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param top Specifies a non-negative integer n that limits the number of items returned from a collection. The - * service returns the number of available items up to but not greater than the specified value n. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of VideoEntity items as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String accountName, Integer top, Context context); - - /** - * Retrieves an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer. - */ - VideoEntity get(String resourceGroupName, String accountName, String videoName); - - /** - * Retrieves an existing video resource with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String accountName, String videoName, - Context context); - - /** - * Deletes an existing video resource and its underlying data. This operation is irreversible. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String videoName); - - /** - * Deletes an existing video resource and its underlying data. This operation is irreversible. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String accountName, String videoName, Context context); - - /** - * Generates a streaming token which can be used for accessing content from video content URLs, for a video resource - * with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return "Video content token grants access to the video content URLs.". - */ - VideoContentToken listContentToken(String resourceGroupName, String accountName, String videoName); - - /** - * Generates a streaming token which can be used for accessing content from video content URLs, for a video resource - * with the given name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Azure Video Analyzer account name. - * @param videoName The Video name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return "Video content token grants access to the video content URLs." along with {@link Response}. - */ - Response listContentTokenWithResponse(String resourceGroupName, String accountName, - String videoName, Context context); - - /** - * Retrieves an existing video resource with the given name. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer along with {@link Response}. - */ - VideoEntity getById(String id); - - /** - * Retrieves an existing video resource with the given name. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a video resource within Azure Video Analyzer along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes an existing video resource and its underlying data. This operation is irreversible. - * - * @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 an existing video resource and its underlying data. This operation is irreversible. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new VideoEntity resource. - * - * @param name resource name. - * @return the first stage of the new VideoEntity definition. - */ - VideoEntity.DefinitionStages.Blank define(String name); -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/package-info.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/package-info.java deleted file mode 100644 index 11c2035e7d27..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the data models for VideoAnalyzerManagementClient. Azure Video Analyzer provides a platform for - * you to build intelligent video applications that span the edge and the cloud. - */ -package com.azure.resourcemanager.videoanalyzer.models; diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/package-info.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/package-info.java deleted file mode 100644 index 9c1dabe25f3d..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the classes for VideoAnalyzerManagementClient. Azure Video Analyzer provides a platform for you to - * build intelligent video applications that span the edge and the cloud. - */ -package com.azure.resourcemanager.videoanalyzer; diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/module-info.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/module-info.java deleted file mode 100644 index df08a9890bc0..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/module-info.java +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -module com.azure.resourcemanager.videoanalyzer { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.videoanalyzer; - exports com.azure.resourcemanager.videoanalyzer.fluent; - exports com.azure.resourcemanager.videoanalyzer.fluent.models; - exports com.azure.resourcemanager.videoanalyzer.models; - - opens com.azure.resourcemanager.videoanalyzer.fluent.models to com.azure.core, com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.videoanalyzer.models to com.azure.core, com.fasterxml.jackson.databind; -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/AccessPoliciesCreateOrUpdateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/AccessPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 080216bebdca..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/AccessPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicyEccAlgo; -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicyRsaAlgo; -import com.azure.resourcemanager.videoanalyzer.models.EccTokenKey; -import com.azure.resourcemanager.videoanalyzer.models.JwtAuthentication; -import com.azure.resourcemanager.videoanalyzer.models.RsaTokenKey; -import com.azure.resourcemanager.videoanalyzer.models.TokenClaim; -import java.util.Arrays; - -/** Samples for AccessPolicies CreateOrUpdate. */ -public final class AccessPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/access-policy-create.json - */ - /** - * Sample code: Register access policy entity. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void registerAccessPolicyEntity( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .accessPolicies() - .define("accessPolicyName1") - .withExistingVideoAnalyzer("testrg", "testaccount2") - .withAuthentication( - new JwtAuthentication() - .withIssuers(Arrays.asList("issuer1", "issuer2")) - .withAudiences(Arrays.asList("audience1")) - .withClaims( - Arrays - .asList( - new TokenClaim().withName("claimname1").withValue("claimvalue1"), - new TokenClaim().withName("claimname2").withValue("claimvalue2"))) - .withKeys( - Arrays - .asList( - new RsaTokenKey() - .withKid("123") - .withAlg(AccessPolicyRsaAlgo.RS256) - .withN("YmFzZTY0IQ==") - .withE("ZLFzZTY0IQ=="), - new EccTokenKey() - .withKid("124") - .withAlg(AccessPolicyEccAlgo.ES256) - .withX("XX==") - .withY("YY==")))) - .create(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/AccessPoliciesDeleteSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/AccessPoliciesDeleteSamples.java deleted file mode 100644 index 5212846918b8..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/AccessPoliciesDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for AccessPolicies Delete. */ -public final class AccessPoliciesDeleteSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/access-policy-delete.json - */ - /** - * Sample code: Deletes an access policy entity. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deletesAnAccessPolicyEntity( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.accessPolicies().deleteWithResponse("testrg", "testaccount2", "accessPolicyName1", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/AccessPoliciesGetSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/AccessPoliciesGetSamples.java deleted file mode 100644 index d3016b92b985..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/AccessPoliciesGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for AccessPolicies Get. */ -public final class AccessPoliciesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/access-policy-get.json - */ - /** - * Sample code: Gets an access policy entity. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getsAnAccessPolicyEntity(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.accessPolicies().getWithResponse("testrg", "testaccount2", "accessPolicyName1", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/AccessPoliciesListSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/AccessPoliciesListSamples.java deleted file mode 100644 index 5a741d8780b0..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/AccessPoliciesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for AccessPolicies List. */ -public final class AccessPoliciesListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/access-policy-list.json - */ - /** - * Sample code: Lists access policy entities. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listsAccessPolicyEntities(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.accessPolicies().list("testrg", "testaccount2", 2, Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/AccessPoliciesUpdateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/AccessPoliciesUpdateSamples.java deleted file mode 100644 index 63575108cb83..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/AccessPoliciesUpdateSamples.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicyEccAlgo; -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicyEntity; -import com.azure.resourcemanager.videoanalyzer.models.AccessPolicyRsaAlgo; -import com.azure.resourcemanager.videoanalyzer.models.EccTokenKey; -import com.azure.resourcemanager.videoanalyzer.models.JwtAuthentication; -import com.azure.resourcemanager.videoanalyzer.models.RsaTokenKey; -import com.azure.resourcemanager.videoanalyzer.models.TokenClaim; -import java.util.Arrays; - -/** Samples for AccessPolicies Update. */ -public final class AccessPoliciesUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/access-policy-patch.json - */ - /** - * Sample code: Update access policy entity. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void updateAccessPolicyEntity(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - AccessPolicyEntity resource = - manager - .accessPolicies() - .getWithResponse("testrg", "testaccount2", "accessPolicyName1", Context.NONE) - .getValue(); - resource - .update() - .withAuthentication( - new JwtAuthentication() - .withIssuers(Arrays.asList("issuer1", "issuer2")) - .withAudiences(Arrays.asList("audience1")) - .withClaims( - Arrays - .asList( - new TokenClaim().withName("claimname1").withValue("claimvalue1"), - new TokenClaim().withName("claimname2").withValue("claimvalue2"))) - .withKeys( - Arrays - .asList( - new RsaTokenKey() - .withKid("123") - .withAlg(AccessPolicyRsaAlgo.RS256) - .withN("YmFzZTY0IQ==") - .withE("ZLFzZTY0IQ=="), - new EccTokenKey() - .withKid("124") - .withAlg(AccessPolicyEccAlgo.ES256) - .withX("XX==") - .withY("YY==")))) - .apply(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesCreateOrUpdateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesCreateOrUpdateSamples.java deleted file mode 100644 index 900dfd47c642..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesCreateOrUpdateSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -/** Samples for EdgeModules CreateOrUpdate. */ -public final class EdgeModulesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/edge-modules-create.json - */ - /** - * Sample code: Registers an edge module. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void registersAnEdgeModule(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.edgeModules().define("edgeModule1").withExistingVideoAnalyzer("testrg", "testaccount2").create(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesDeleteSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesDeleteSamples.java deleted file mode 100644 index 59119851a4ab..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for EdgeModules Delete. */ -public final class EdgeModulesDeleteSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/edge-modules-delete.json - */ - /** - * Sample code: Deletes an edge module registration. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deletesAnEdgeModuleRegistration( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.edgeModules().deleteWithResponse("testrg", "testaccount2", "edgeModule1", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesGetSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesGetSamples.java deleted file mode 100644 index 932941b4408d..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for EdgeModules Get. */ -public final class EdgeModulesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/edge-modules-get.json - */ - /** - * Sample code: Gets edge module registration. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getsEdgeModuleRegistration( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.edgeModules().getWithResponse("testrg", "testaccount2", "edgeModule1", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesListProvisioningTokenSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesListProvisioningTokenSamples.java deleted file mode 100644 index 8eb9ffe8e102..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesListProvisioningTokenSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.ListProvisioningTokenInput; -import java.time.OffsetDateTime; - -/** Samples for EdgeModules ListProvisioningToken. */ -public final class EdgeModulesListProvisioningTokenSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/edge-modules-listProvisioningToken.json - */ - /** - * Sample code: Generate the Provisioning token for an edge module registration. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void generateTheProvisioningTokenForAnEdgeModuleRegistration( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .edgeModules() - .listProvisioningTokenWithResponse( - "testrg", - "testaccount2", - "edgeModule1", - new ListProvisioningTokenInput() - .withExpirationDate(OffsetDateTime.parse("2023-01-23T11:04:49.0526841-08:00")), - Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesListSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesListSamples.java deleted file mode 100644 index 78814597d32c..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/EdgeModulesListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for EdgeModules List. */ -public final class EdgeModulesListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/edge-modules-list.json - */ - /** - * Sample code: Lists the registered edge modules. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listsTheRegisteredEdgeModules( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.edgeModules().list("testrg", "testaccount2", null, Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelineOperationStatusesGetSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelineOperationStatusesGetSamples.java deleted file mode 100644 index 481209c2809f..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelineOperationStatusesGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for LivePipelineOperationStatuses Get. */ -public final class LivePipelineOperationStatusesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/live-pipeline-operation-status-get.json - */ - /** - * Sample code: Get the live pipeline operation status. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getTheLivePipelineOperationStatus( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .livePipelineOperationStatuses() - .getWithResponse( - "testrg", "testaccount2", "livePipeline1", "00000000-0000-0000-0000-000000000001", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesActivateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesActivateSamples.java deleted file mode 100644 index 1e5dbc09ce1e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesActivateSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for LivePipelines Activate. */ -public final class LivePipelinesActivateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/live-pipeline-activate.json - */ - /** - * Sample code: Activate live pipeline. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void activateLivePipeline(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.livePipelines().activate("testrg", "testaccount2", "livePipeline1", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesCreateOrUpdateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesCreateOrUpdateSamples.java deleted file mode 100644 index cea219fd3267..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesCreateOrUpdateSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.resourcemanager.videoanalyzer.models.ParameterDefinition; -import java.util.Arrays; - -/** Samples for LivePipelines CreateOrUpdate. */ -public final class LivePipelinesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/live-pipeline-create.json - */ - /** - * Sample code: Create or update a live pipeline. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void createOrUpdateALivePipeline( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .livePipelines() - .define("livePipeline1") - .withExistingVideoAnalyzer("testrg", "testaccount2") - .withTopologyName("pipelinetopology1") - .withDescription("Live Pipeline 1 Description") - .withBitrateKbps(500) - .withParameters( - Arrays - .asList( - new ParameterDefinition().withName("rtspUrlParameter").withValue("rtsp://contoso.com/stream"))) - .create(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesDeactivateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesDeactivateSamples.java deleted file mode 100644 index 32992e3d706b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesDeactivateSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for LivePipelines Deactivate. */ -public final class LivePipelinesDeactivateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/live-pipeline-deactivate.json - */ - /** - * Sample code: Deactivate Live pipeline. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deactivateLivePipeline(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.livePipelines().deactivate("testrg", "testaccount2", "livePipeline1", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesDeleteSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesDeleteSamples.java deleted file mode 100644 index 35318df2b582..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for LivePipelines Delete. */ -public final class LivePipelinesDeleteSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/live-pipeline-delete.json - */ - /** - * Sample code: Delete a live pipeline. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deleteALivePipeline(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.livePipelines().deleteWithResponse("testrg", "testaccount2", "livePipeline1", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesGetSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesGetSamples.java deleted file mode 100644 index 94f024f50e26..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for LivePipelines Get. */ -public final class LivePipelinesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/live-pipeline-get-by-name.json - */ - /** - * Sample code: Retrieves a specific live pipeline by name. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void retrievesASpecificLivePipelineByName( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.livePipelines().getWithResponse("testrg", "testaccount2", "livePipeline1", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesListSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesListSamples.java deleted file mode 100644 index efc9ae913377..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for LivePipelines List. */ -public final class LivePipelinesListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/live-pipeline-list.json - */ - /** - * Sample code: List live pipelines. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listLivePipelines(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.livePipelines().list("testrg", "testaccount2", null, 2, Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesUpdateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesUpdateSamples.java deleted file mode 100644 index 87506a7792dc..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LivePipelinesUpdateSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.LivePipeline; - -/** Samples for LivePipelines Update. */ -public final class LivePipelinesUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/live-pipeline-patch.json - */ - /** - * Sample code: Updates a live pipeline. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void updatesALivePipeline(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - LivePipeline resource = - manager.livePipelines().getWithResponse("testrg", "testaccount2", "livePipeline1", Context.NONE).getValue(); - resource.update().withDescription("Live Pipeline 1 Description").apply(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LocationsCheckNameAvailabilitySamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LocationsCheckNameAvailabilitySamples.java deleted file mode 100644 index 9a83d87ff9f7..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/LocationsCheckNameAvailabilitySamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.CheckNameAvailabilityRequest; - -/** Samples for Locations CheckNameAvailability. */ -public final class LocationsCheckNameAvailabilitySamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/accounts-check-name-availability.json - */ - /** - * Sample code: Check Name Availability. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void checkNameAvailability(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .locations() - .checkNameAvailabilityWithResponse( - "japanwest", - new CheckNameAvailabilityRequest().withName("contosotv").withType("videoAnalyzers"), - Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/OperationResultsGetSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/OperationResultsGetSamples.java deleted file mode 100644 index c8e58fb5a9f0..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/OperationResultsGetSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for OperationResults Get. */ -public final class OperationResultsGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-private-endpoint-connection-operation-result-by-id.json - */ - /** - * Sample code: Get status of private endpoint connection asynchronous operation. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getStatusOfPrivateEndpointConnectionAsynchronousOperation( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .operationResults() - .getWithResponse( - "contoso", - "contososports", - "6FBA62C4-99B5-4FF8-9826-FC4744A8864F", - "10000000-0000-0000-0000-000000000000", - Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/OperationStatusesGetSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/OperationStatusesGetSamples.java deleted file mode 100644 index 6e1dac6727e7..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/OperationStatusesGetSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for OperationStatuses Get. */ -public final class OperationStatusesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-private-endpoint-connection-operation-status-by-id-terminal-state.json - */ - /** - * Sample code: Get status of private endpoint asynchronous operation when it is completed. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getStatusOfPrivateEndpointAsynchronousOperationWhenItIsCompleted( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .operationStatuses() - .getWithResponse( - "contoso", - "contososports", - "D612C429-2526-49D5-961B-885AE11406FD", - "CDE44A33-DD32-4FFA-A1BC-601DC4D52B03", - Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/OperationsListSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/OperationsListSamples.java deleted file mode 100644 index 86e3e9b4c3e1..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/OperationsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for Operations List. */ -public final class OperationsListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/operations-list-all.json - */ - /** - * Sample code: List Operations. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listOperations(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.operations().listWithResponse(Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobOperationStatusesGetSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobOperationStatusesGetSamples.java deleted file mode 100644 index cde775563538..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobOperationStatusesGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for PipelineJobOperationStatuses Get. */ -public final class PipelineJobOperationStatusesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-job-operation-status-get.json - */ - /** - * Sample code: Get the pipeline job operation status. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getThePipelineJobOperationStatus( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .pipelineJobOperationStatuses() - .getWithResponse( - "testrg", "testaccount2", "pipelineJob1", "00000000-0000-0000-0000-000000000001", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsCancelSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsCancelSamples.java deleted file mode 100644 index e641f304812b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsCancelSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for PipelineJobs Cancel. */ -public final class PipelineJobsCancelSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-job-cancel.json - */ - /** - * Sample code: Cancels a pipeline job. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void cancelsAPipelineJob(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.pipelineJobs().cancel("testrg", "testaccount2", "pipelineJob1", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsCreateOrUpdateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsCreateOrUpdateSamples.java deleted file mode 100644 index eaa5cdd790da..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsCreateOrUpdateSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.resourcemanager.videoanalyzer.models.ParameterDefinition; -import java.util.Arrays; - -/** Samples for PipelineJobs CreateOrUpdate. */ -public final class PipelineJobsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-job-create.json - */ - /** - * Sample code: Create or update a pipeline job. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void createOrUpdateAPipelineJob( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .pipelineJobs() - .define("pipelineJob1") - .withExistingVideoAnalyzer("testrg", "testaccount2") - .withTopologyName("pipelinetopology1") - .withDescription("Pipeline Job 1 Dsecription") - .withParameters( - Arrays - .asList( - new ParameterDefinition() - .withName("timesequences") - .withValue("[[\"2020-10-05T03:30:00Z\", \"2020-10-05T04:30:00Z\"]]"), - new ParameterDefinition().withName("videoSourceName").withValue("camera001"))) - .create(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsDeleteSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsDeleteSamples.java deleted file mode 100644 index 206f477262ea..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for PipelineJobs Delete. */ -public final class PipelineJobsDeleteSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-job-delete.json - */ - /** - * Sample code: Deletes a pipeline job. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deletesAPipelineJob(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.pipelineJobs().deleteWithResponse("testrg", "testaccount2", "pipelineJob1", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsGetSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsGetSamples.java deleted file mode 100644 index f361b2a22489..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for PipelineJobs Get. */ -public final class PipelineJobsGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-job-get-by-name.json - */ - /** - * Sample code: Get a pipeline job by name. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getAPipelineJobByName(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.pipelineJobs().getWithResponse("testrg", "testaccount2", "pipelineJob1", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsListSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsListSamples.java deleted file mode 100644 index f91b61414ec7..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for PipelineJobs List. */ -public final class PipelineJobsListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-job-list.json - */ - /** - * Sample code: List all pipeline jobs. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listAllPipelineJobs(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.pipelineJobs().list("testrg", "testaccount2", null, 2, Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsUpdateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsUpdateSamples.java deleted file mode 100644 index 04b314adf23b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineJobsUpdateSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.PipelineJob; - -/** Samples for PipelineJobs Update. */ -public final class PipelineJobsUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-job-patch.json - */ - /** - * Sample code: Updates a pipeline job. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void updatesAPipelineJob(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - PipelineJob resource = - manager.pipelineJobs().getWithResponse("testrg", "testaccount2", "pipelineJob1", Context.NONE).getValue(); - resource.update().withDescription("Pipeline Job 1 description").apply(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesCreateOrUpdateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesCreateOrUpdateSamples.java deleted file mode 100644 index b0562c868600..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesCreateOrUpdateSamples.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.resourcemanager.videoanalyzer.models.Kind; -import com.azure.resourcemanager.videoanalyzer.models.NodeInput; -import com.azure.resourcemanager.videoanalyzer.models.ParameterDeclaration; -import com.azure.resourcemanager.videoanalyzer.models.ParameterType; -import com.azure.resourcemanager.videoanalyzer.models.RtspSource; -import com.azure.resourcemanager.videoanalyzer.models.RtspTransport; -import com.azure.resourcemanager.videoanalyzer.models.Sku; -import com.azure.resourcemanager.videoanalyzer.models.SkuName; -import com.azure.resourcemanager.videoanalyzer.models.UnsecuredEndpoint; -import com.azure.resourcemanager.videoanalyzer.models.UsernamePasswordCredentials; -import com.azure.resourcemanager.videoanalyzer.models.VideoCreationProperties; -import com.azure.resourcemanager.videoanalyzer.models.VideoPublishingOptions; -import com.azure.resourcemanager.videoanalyzer.models.VideoSink; -import java.util.Arrays; - -/** Samples for PipelineTopologies CreateOrUpdate. */ -public final class PipelineTopologiesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-topology-create.json - */ - /** - * Sample code: Create or update a pipeline topology with an Rtsp source and video sink. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void createOrUpdateAPipelineTopologyWithAnRtspSourceAndVideoSink( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .pipelineTopologies() - .define("pipelineTopology1") - .withExistingVideoAnalyzer("testrg", "testaccount2") - .withKind(Kind.LIVE) - .withSku(new Sku().withName(SkuName.LIVE_S1)) - .withDescription("Pipeline Topology 1 Description") - .withParameters( - Arrays - .asList( - new ParameterDeclaration() - .withName("rtspUrlParameter") - .withType(ParameterType.STRING) - .withDescription("rtsp source url parameter") - .withDefaultProperty("rtsp://microsoft.com/video.mp4"), - new ParameterDeclaration() - .withName("rtspPasswordParameter") - .withType(ParameterType.SECRET_STRING) - .withDescription("rtsp source password parameter") - .withDefaultProperty("password"))) - .withSources( - Arrays - .asList( - new RtspSource() - .withName("rtspSource") - .withTransport(RtspTransport.HTTP) - .withEndpoint( - new UnsecuredEndpoint() - .withCredentials( - new UsernamePasswordCredentials() - .withUsername("username") - .withPassword("${rtspPasswordParameter}")) - .withUrl("${rtspUrlParameter}")))) - .withSinks( - Arrays - .asList( - new VideoSink() - .withName("videoSink") - .withInputs(Arrays.asList(new NodeInput().withNodeName("rtspSource"))) - .withVideoName("camera001") - .withVideoCreationProperties( - new VideoCreationProperties() - .withTitle("Parking Lot (Camera 1)") - .withDescription("Parking lot south entrance") - .withSegmentLength("PT30S")) - .withVideoPublishingOptions( - new VideoPublishingOptions() - .withDisableArchive("false") - .withDisableRtspPublishing("true")))) - .create(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesDeleteSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesDeleteSamples.java deleted file mode 100644 index 40edcded9e54..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for PipelineTopologies Delete. */ -public final class PipelineTopologiesDeleteSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-topology-delete.json - */ - /** - * Sample code: Delete a pipeline topology. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deleteAPipelineTopology(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.pipelineTopologies().deleteWithResponse("testrg", "testaccount2", "pipelineTopology1", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesGetSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesGetSamples.java deleted file mode 100644 index 5b204137960c..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for PipelineTopologies Get. */ -public final class PipelineTopologiesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-topology-get-by-name.json - */ - /** - * Sample code: Get a pipeline topology by name. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getAPipelineTopologyByName( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.pipelineTopologies().getWithResponse("testrg", "testaccount2", "pipelineTopology1", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesListSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesListSamples.java deleted file mode 100644 index ed6e1961f47b..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for PipelineTopologies List. */ -public final class PipelineTopologiesListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-topology-list.json - */ - /** - * Sample code: List all pipeline topologies. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listAllPipelineTopologies(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.pipelineTopologies().list("testrg", "testaccount2", null, 2, Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesUpdateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesUpdateSamples.java deleted file mode 100644 index 4da3ec7b0bd7..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PipelineTopologiesUpdateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.PipelineTopology; - -/** Samples for PipelineTopologies Update. */ -public final class PipelineTopologiesUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/pipeline-topology-patch.json - */ - /** - * Sample code: Update pipeline topology. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void updatePipelineTopology(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - PipelineTopology resource = - manager - .pipelineTopologies() - .getWithResponse("testrg", "testaccount2", "pipelineTopology1", Context.NONE) - .getValue(); - resource.update().withDescription("Pipeline Topology 1 Description").apply(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java deleted file mode 100644 index 584163ec2a7e..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnection; -import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkServiceConnectionState; - -/** Samples for PrivateEndpointConnections CreateOrUpdate. */ -public final class PrivateEndpointConnectionsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-private-endpoint-connection-put.json - */ - /** - * Sample code: Update private endpoint connection. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void updatePrivateEndpointConnection( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - PrivateEndpointConnection resource = - manager - .privateEndpointConnections() - .getWithResponse("contoso", "contososports", "10000000-0000-0000-0000-000000000000", Context.NONE) - .getValue(); - resource - .update() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Test description.")) - .apply(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateEndpointConnectionsDeleteSamples.java deleted file mode 100644 index d7283d291dea..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateEndpointConnectionsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections Delete. */ -public final class PrivateEndpointConnectionsDeleteSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-private-endpoint-connection-delete.json - */ - /** - * Sample code: Delete private endpoint connection. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deletePrivateEndpointConnection( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .privateEndpointConnections() - .deleteWithResponse("contoso", "contososports", "connectionName1", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateEndpointConnectionsGetSamples.java deleted file mode 100644 index 81f3966c6b29..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateEndpointConnectionsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections Get. */ -public final class PrivateEndpointConnectionsGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-private-endpoint-connection-get-by-name.json - */ - /** - * Sample code: Get private endpoint connection. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getPrivateEndpointConnection( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .privateEndpointConnections() - .getWithResponse("contoso", "contososports", "10000000-0000-0000-0000-000000000000", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateEndpointConnectionsListSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateEndpointConnectionsListSamples.java deleted file mode 100644 index 8cbe557aa3c5..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateEndpointConnectionsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections List. */ -public final class PrivateEndpointConnectionsListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-private-endpoint-connection-list.json - */ - /** - * Sample code: Get all private endpoint connections. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getAllPrivateEndpointConnections( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.privateEndpointConnections().listWithResponse("contoso", "contososports", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateLinkResourcesGetSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateLinkResourcesGetSamples.java deleted file mode 100644 index 95a697c47417..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateLinkResourcesGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkResources Get. */ -public final class PrivateLinkResourcesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-private-link-resources-get-by-name.json - */ - /** - * Sample code: Get details of a group ID. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getDetailsOfAGroupID(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.privateLinkResources().getWithResponse("contoso", "contososports", "integration", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateLinkResourcesListSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateLinkResourcesListSamples.java deleted file mode 100644 index 14fdd06d0607..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/PrivateLinkResourcesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkResources List. */ -public final class PrivateLinkResourcesListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-private-link-resources-list.json - */ - /** - * Sample code: Get list of all group IDs. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getListOfAllGroupIDs(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.privateLinkResources().listWithResponse("contoso", "contososports", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzerOperationResultsGetSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzerOperationResultsGetSamples.java deleted file mode 100644 index c4f31b5fd6ae..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzerOperationResultsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for VideoAnalyzerOperationResults Get. */ -public final class VideoAnalyzerOperationResultsGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-operation-result-by-id.json - */ - /** - * Sample code: Get status of asynchronous operation. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getStatusOfAsynchronousOperation( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .videoAnalyzerOperationResults() - .getWithResponse("westus", "6FBA62C4-99B5-4FF8-9826-FC4744A8864F", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzerOperationStatusesGetSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzerOperationStatusesGetSamples.java deleted file mode 100644 index 2f5579923395..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzerOperationStatusesGetSamples.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for VideoAnalyzerOperationStatuses Get. */ -public final class VideoAnalyzerOperationStatusesGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-operation-status-by-id-non-terminal-state-failed.json - */ - /** - * Sample code: Get status of asynchronous operation when it is completed with error. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getStatusOfAsynchronousOperationWhenItIsCompletedWithError( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .videoAnalyzerOperationStatuses() - .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); - } - - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-operation-status-by-id-terminal-state.json - */ - /** - * Sample code: Get status of asynchronous operation when it is completed. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getStatusOfAsynchronousOperationWhenItIsCompleted( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .videoAnalyzerOperationStatuses() - .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); - } - - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-operation-status-by-id-non-terminal-state.json - */ - /** - * Sample code: Get status of asynchronous operation when it is ongoing. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getStatusOfAsynchronousOperationWhenItIsOngoing( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .videoAnalyzerOperationStatuses() - .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersCreateOrUpdateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersCreateOrUpdateSamples.java deleted file mode 100644 index 1491e323ca62..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersCreateOrUpdateSamples.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.resourcemanager.videoanalyzer.models.AccountEncryption; -import com.azure.resourcemanager.videoanalyzer.models.AccountEncryptionKeyType; -import com.azure.resourcemanager.videoanalyzer.models.IotHub; -import com.azure.resourcemanager.videoanalyzer.models.ResourceIdentity; -import com.azure.resourcemanager.videoanalyzer.models.StorageAccount; -import com.azure.resourcemanager.videoanalyzer.models.UserAssignedManagedIdentity; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for VideoAnalyzers CreateOrUpdate. */ -public final class VideoAnalyzersCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-accounts-create-or-update.json - */ - /** - * Sample code: Create a Video Analyzer account. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void createAVideoAnalyzerAccount( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .videoAnalyzers() - .define("contosotv") - .withRegion("South Central US") - .withExistingResourceGroup("contoso") - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withIdentity( - new VideoAnalyzerIdentity() - .withType("UserAssigned") - .withUserAssignedIdentities( - mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", - new UserAssignedManagedIdentity(), - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2", - new UserAssignedManagedIdentity(), - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id3", - new UserAssignedManagedIdentity()))) - .withStorageAccounts( - Arrays - .asList( - new StorageAccount() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/storage1") - .withIdentity( - new ResourceIdentity() - .withUserAssignedIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2")))) - .withEncryption(new AccountEncryption().withType(AccountEncryptionKeyType.SYSTEM_KEY)) - .withIotHubs( - Arrays - .asList( - new IotHub() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Devices/IotHubs/hub1") - .withIdentity( - new ResourceIdentity() - .withUserAssignedIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id3")), - new IotHub() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Devices/IotHubs/hub2") - .withIdentity( - new ResourceIdentity() - .withUserAssignedIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id3")))) - .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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersDeleteSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersDeleteSamples.java deleted file mode 100644 index 2741bf3f5e0d..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for VideoAnalyzers Delete. */ -public final class VideoAnalyzersDeleteSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-accounts-delete.json - */ - /** - * Sample code: Delete a Video Analyzer account. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deleteAVideoAnalyzerAccount( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.videoAnalyzers().deleteWithResponse("contoso", "contosotv", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersGetByResourceGroupSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersGetByResourceGroupSamples.java deleted file mode 100644 index ee6869effdf4..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersGetByResourceGroupSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for VideoAnalyzers GetByResourceGroup. */ -public final class VideoAnalyzersGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-accounts-get-by-name.json - */ - /** - * Sample code: Get a Video Analyzer account by name. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getAVideoAnalyzerAccountByName( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.videoAnalyzers().getByResourceGroupWithResponse("contoso", "contosotv", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersListBySubscriptionSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersListBySubscriptionSamples.java deleted file mode 100644 index 0586d30d2946..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersListBySubscriptionSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for VideoAnalyzers ListBySubscription. */ -public final class VideoAnalyzersListBySubscriptionSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-accounts-subscription-list-all-accounts.json - */ - /** - * Sample code: List all Video Analyzer accounts in the specified subscription. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listAllVideoAnalyzerAccountsInTheSpecifiedSubscription( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.videoAnalyzers().listBySubscriptionWithResponse(Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersListSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersListSamples.java deleted file mode 100644 index 865e351933e8..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for VideoAnalyzers List. */ -public final class VideoAnalyzersListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-accounts-list-all-accounts.json - */ - /** - * Sample code: List all Video Analyzer accounts. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listAllVideoAnalyzerAccounts( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.videoAnalyzers().listWithResponse("contoso", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersUpdateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersUpdateSamples.java deleted file mode 100644 index 0de83b79702c..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideoAnalyzersUpdateSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzer; -import java.util.HashMap; -import java.util.Map; - -/** Samples for VideoAnalyzers Update. */ -public final class VideoAnalyzersUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-accounts-update.json - */ - /** - * Sample code: Update a Video Analyzer accounts. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void updateAVideoAnalyzerAccounts( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - VideoAnalyzer resource = - manager.videoAnalyzers().getByResourceGroupWithResponse("contoso", "contosotv", Context.NONE).getValue(); - resource.update().withTags(mapOf("key1", "value3")).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/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosCreateOrUpdateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosCreateOrUpdateSamples.java deleted file mode 100644 index ed2c16c29035..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosCreateOrUpdateSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -/** Samples for Videos CreateOrUpdate. */ -public final class VideosCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-create.json - */ - /** - * Sample code: Register video entity. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void registerVideoEntity(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager - .videos() - .define("video1") - .withExistingVideoAnalyzer("testrg", "testaccount2") - .withTitle("Sample Title 1") - .withDescription("Sample Description 1") - .create(); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosDeleteSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosDeleteSamples.java deleted file mode 100644 index 92ec082c143d..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for Videos Delete. */ -public final class VideosDeleteSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-delete.json - */ - /** - * Sample code: Deletes a video entity. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void deletesAVideoEntity(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.videos().deleteWithResponse("testrg", "testaccount2", "video1", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosGetSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosGetSamples.java deleted file mode 100644 index 88d2f72c2150..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for Videos Get. */ -public final class VideosGetSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-get.json - */ - /** - * Sample code: Gets a video entity. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void getsAVideoEntity(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.videos().getWithResponse("testrg", "testaccount2", "video1", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosListContentTokenSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosListContentTokenSamples.java deleted file mode 100644 index 006d041d47b1..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosListContentTokenSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for Videos ListContentToken. */ -public final class VideosListContentTokenSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-listContentToken.json - */ - /** - * Sample code: Generate a content token for media endpoint authorization. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void generateAContentTokenForMediaEndpointAuthorization( - com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.videos().listContentTokenWithResponse("testrg", "testaccount2", "video3", Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosListSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosListSamples.java deleted file mode 100644 index 76ae83f0b9cd..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; - -/** Samples for Videos List. */ -public final class VideosListSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-list.json - */ - /** - * Sample code: Lists video entities. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void listsVideoEntities(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - manager.videos().list("testrg", "testaccount2", 2, Context.NONE); - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosUpdateSamples.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosUpdateSamples.java deleted file mode 100644 index 6fc3cc65eb04..000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/samples/java/com/azure/resourcemanager/videoanalyzer/generated/VideosUpdateSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.videoanalyzer.models.VideoEntity; - -/** Samples for Videos Update. */ -public final class VideosUpdateSamples { - /* - * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-patch.json - */ - /** - * Sample code: Update video entity. - * - * @param manager Entry point to VideoAnalyzerManager. - */ - public static void updateVideoEntity(com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) { - VideoEntity resource = - manager.videos().getWithResponse("testrg", "testaccount2", "video1", Context.NONE).getValue(); - resource.update().withDescription("Parking Lot East Entrance").apply(); - } -} diff --git a/sdk/videoanalyzer/ci.yml b/sdk/videoanalyzer/ci.yml deleted file mode 100644 index 97f6e4a6b6ea..000000000000 --- a/sdk/videoanalyzer/ci.yml +++ /dev/null @@ -1,43 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - -trigger: - branches: - include: - - main - - hotfix/* - - release/* - paths: - include: - - sdk/videoanalyzer/ - exclude: - - sdk/videoanalyzer/pom.xml - - sdk/videoanalyzer/azure-media-videoanalyzer-edge/pom.xml - - sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/pom.xml - -pr: - branches: - include: - - main - - feature/* - - hotfix/* - - release/* - paths: - include: - - sdk/videoanalyzer/ - exclude: - - sdk/videoanalyzer/pom.xml - - sdk/videoanalyzer/azure-media-videoanalyzer-edge/pom.xml - - sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/pom.xml - -extends: - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: videoanalyzer - Artifacts: - - name: azure-resourcemanager-videoanalyzer - groupId: com.azure.resourcemanager - safeName: azureresourcemanagervideoanalyzer - - - name: azure-media-videoanalyzer-edge - groupId: com.azure - safeName: azuremediavideoanalyzeredge diff --git a/sdk/videoanalyzer/pom.xml b/sdk/videoanalyzer/pom.xml deleted file mode 100644 index 160cd190d447..000000000000 --- a/sdk/videoanalyzer/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - com.azure - azure-videoanalyzer-service - pom - 1.0.0 - - azure-media-videoanalyzer-edge - azure-resourcemanager-videoanalyzer - -