diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md b/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md index b1ab8bca2dc2d..f76ea4480b543 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.1.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2021-06-24) +- Azure Resource Manager MediaServices client library for Java. This package contains Microsoft Azure SDK for MediaServices Management SDK. This Swagger was generated by the API Framework. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.1.0-beta.1 (2021-04-30) diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md b/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md index 1e611e6962451..8670f6b68f3a8 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md @@ -2,7 +2,7 @@ Azure Resource Manager MediaServices client library for Java. -This package contains Microsoft Azure SDK for MediaServices Management SDK. This Swagger was generated by the API Framework. Package tag package-2021-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for MediaServices Management SDK. This Swagger was generated by the API Framework. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-mediaservices - 1.1.0-beta.1 + 1.1.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -74,13 +74,15 @@ See [API design][design] for general introduction on design and key concepts on ## 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). +For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/master/CONTRIBUTING.md). 1. Fork it 1. Create your feature branch (`git checkout -b my-new-feature`) @@ -93,7 +95,7 @@ For details on contributing to this repository, see the [contributing guide](htt [docs]: https://azure.github.io/azure-sdk-for-java/ [jdk]: https://docs.microsoft.com/java/azure/jdk/ [azure_subscription]: https://azure.microsoft.com/free/ -[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity -[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty -[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md -[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity +[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core-http-netty +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/DESIGN.md diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml index f23669b4f481f..cf3529f93ceca 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml @@ -1,75 +1,86 @@ - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + - com.azure.resourcemanager - azure-resourcemanager-mediaservices - 1.1.0-beta.2 - jar + com.azure.resourcemanager + azure-resourcemanager-mediaservices + 1.1.0-beta.2 + jar - Microsoft Azure SDK for MediaServices Management - This package contains Microsoft Azure SDK for MediaServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. This Swagger was generated by the API Framework. Package tag package-2021-05. - https://github.com/Azure/azure-sdk-for-java + Microsoft Azure SDK for MediaServices Management + This package contains Microsoft Azure SDK for MediaServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. This Swagger was generated by the API Framework. Package tag package-2021-06. + https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - + + + 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 - - - - - com.azure - azure-core - 1.17.0 - - - com.azure - azure-core-management - 1.3.0 - - - - - - org.jacoco - jacoco-maven-plugin - 0.8.5 - - true - - - - org.revapi - revapi-maven-plugin - 0.11.2 - - true - - - - + + 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 + + + + + com.azure + azure-core + 1.17.0 + + + com.azure + azure-core-management + 1.3.0 + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.5 + + true + + + + org.revapi + revapi-maven-plugin + 0.11.2 + + + + + java.method.addedToInterface + + + true + .* + com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)* + + + + + + + diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/MediaServicesManager.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/MediaServicesManager.java index 389f94ec0fd36..3b6c98db1b3a6 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/MediaServicesManager.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/MediaServicesManager.java @@ -9,7 +9,6 @@ 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; @@ -17,6 +16,7 @@ import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; @@ -26,7 +26,6 @@ import com.azure.resourcemanager.mediaservices.implementation.AssetsImpl; import com.azure.resourcemanager.mediaservices.implementation.AzureMediaServicesBuilder; import com.azure.resourcemanager.mediaservices.implementation.ContentKeyPoliciesImpl; -import com.azure.resourcemanager.mediaservices.implementation.JobsImpl; import com.azure.resourcemanager.mediaservices.implementation.LiveEventsImpl; import com.azure.resourcemanager.mediaservices.implementation.LiveOutputsImpl; import com.azure.resourcemanager.mediaservices.implementation.LocationsImpl; @@ -37,12 +36,10 @@ import com.azure.resourcemanager.mediaservices.implementation.StreamingEndpointsImpl; import com.azure.resourcemanager.mediaservices.implementation.StreamingLocatorsImpl; import com.azure.resourcemanager.mediaservices.implementation.StreamingPoliciesImpl; -import com.azure.resourcemanager.mediaservices.implementation.TransformsImpl; import com.azure.resourcemanager.mediaservices.models.AccountFilters; import com.azure.resourcemanager.mediaservices.models.AssetFilters; import com.azure.resourcemanager.mediaservices.models.Assets; import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicies; -import com.azure.resourcemanager.mediaservices.models.Jobs; import com.azure.resourcemanager.mediaservices.models.LiveEvents; import com.azure.resourcemanager.mediaservices.models.LiveOutputs; import com.azure.resourcemanager.mediaservices.models.Locations; @@ -53,7 +50,6 @@ import com.azure.resourcemanager.mediaservices.models.StreamingEndpoints; import com.azure.resourcemanager.mediaservices.models.StreamingLocators; import com.azure.resourcemanager.mediaservices.models.StreamingPolicies; -import com.azure.resourcemanager.mediaservices.models.Transforms; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -62,8 +58,6 @@ /** Entry point to MediaServicesManager. This Swagger was generated by the API Framework. */ public final class MediaServicesManager { - private AccountFilters accountFilters; - private Operations operations; private Mediaservices mediaservices; @@ -74,16 +68,14 @@ public final class MediaServicesManager { private Locations locations; + private AccountFilters accountFilters; + private Assets assets; private AssetFilters assetFilters; private ContentKeyPolicies contentKeyPolicies; - private Transforms transforms; - - private Jobs jobs; - private StreamingPolicies streamingPolicies; private StreamingLocators streamingLocators; @@ -137,6 +129,7 @@ public static final class Configurable { private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; private Duration defaultPollInterval; @@ -176,6 +169,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) { 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. * @@ -218,7 +222,7 @@ public MediaServicesManager authenticate(TokenCredential credential, AzureProfil .append("-") .append("com.azure.resourcemanager.mediaservices") .append("/") - .append("1.1.0-beta.1"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -232,6 +236,9 @@ public MediaServicesManager authenticate(TokenCredential credential, AzureProfil userAgentBuilder.append(" (auto-generated)"); } + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } if (retryPolicy == null) { retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); } @@ -241,10 +248,7 @@ public MediaServicesManager authenticate(TokenCredential credential, AzureProfil HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); @@ -257,14 +261,6 @@ public MediaServicesManager authenticate(TokenCredential credential, AzureProfil } } - /** @return Resource collection API of AccountFilters. */ - public AccountFilters accountFilters() { - if (this.accountFilters == null) { - this.accountFilters = new AccountFiltersImpl(clientObject.getAccountFilters(), this); - } - return accountFilters; - } - /** @return Resource collection API of Operations. */ public Operations operations() { if (this.operations == null) { @@ -306,6 +302,14 @@ public Locations locations() { return locations; } + /** @return Resource collection API of AccountFilters. */ + public AccountFilters accountFilters() { + if (this.accountFilters == null) { + this.accountFilters = new AccountFiltersImpl(clientObject.getAccountFilters(), this); + } + return accountFilters; + } + /** @return Resource collection API of Assets. */ public Assets assets() { if (this.assets == null) { @@ -330,22 +334,6 @@ public ContentKeyPolicies contentKeyPolicies() { return contentKeyPolicies; } - /** @return Resource collection API of Transforms. */ - public Transforms transforms() { - if (this.transforms == null) { - this.transforms = new TransformsImpl(clientObject.getTransforms(), this); - } - return transforms; - } - - /** @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 StreamingPolicies. */ public StreamingPolicies streamingPolicies() { if (this.streamingPolicies == null) { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AzureMediaServices.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AzureMediaServices.java index 0371eb663c9d7..67a36e0cf272f 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AzureMediaServices.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AzureMediaServices.java @@ -23,6 +23,13 @@ public interface AzureMediaServices { */ String getEndpoint(); + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + /** * Gets The HTTP pipeline to send requests through. * @@ -37,13 +44,6 @@ public interface AzureMediaServices { */ Duration getDefaultPollInterval(); - /** - * Gets the AccountFiltersClient object to access its operations. - * - * @return the AccountFiltersClient object. - */ - AccountFiltersClient getAccountFilters(); - /** * Gets the OperationsClient object to access its operations. * @@ -79,6 +79,13 @@ public interface AzureMediaServices { */ LocationsClient getLocations(); + /** + * Gets the AccountFiltersClient object to access its operations. + * + * @return the AccountFiltersClient object. + */ + AccountFiltersClient getAccountFilters(); + /** * Gets the AssetsClient object to access its operations. * @@ -100,20 +107,6 @@ public interface AzureMediaServices { */ ContentKeyPoliciesClient getContentKeyPolicies(); - /** - * Gets the TransformsClient object to access its operations. - * - * @return the TransformsClient object. - */ - TransformsClient getTransforms(); - - /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. - */ - JobsClient getJobs(); - /** * Gets the StreamingPoliciesClient object to access its operations. * diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/JobsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/JobsClient.java deleted file mode 100644 index df4d5e3565592..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/JobsClient.java +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices.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.mediaservices.fluent.models.JobInner; - -/** An instance of this class provides access to all the operations defined in JobsClient. */ -public interface JobsClient { - /** - * Lists all of the Jobs for the Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 Job items. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, String transformName); - - /** - * Lists all of the Jobs for the Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param filter Restricts the set of items returned. - * @param orderby Specifies the key by which the result collection should be ordered. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 Job items. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String accountName, - String transformName, - String filter, - String orderby, - Context context); - - /** - * Gets a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner get(String resourceGroupName, String accountName, String transformName, String jobName); - - /** - * Gets a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String accountName, String transformName, String jobName, Context context); - - /** - * Creates a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner create( - String resourceGroupName, String accountName, String transformName, String jobName, JobInner parameters); - - /** - * Creates a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String accountName, - String transformName, - String jobName, - JobInner parameters, - Context context); - - /** - * Deletes a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 transformName, String jobName); - - /** - * Deletes a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String accountName, String transformName, String jobName, Context context); - - /** - * Update is only supported for description and priority. Updating Priority will take effect when the Job state is - * Queued or Scheduled and depending on the timing the priority update may be ignored. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner update( - String resourceGroupName, String accountName, String transformName, String jobName, JobInner parameters); - - /** - * Update is only supported for description and priority. Updating Priority will take effect when the Job state is - * Queued or Scheduled and depending on the timing the priority update may be ignored. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String accountName, - String transformName, - String jobName, - JobInner parameters, - Context context); - - /** - * Cancel a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 cancelJob(String resourceGroupName, String accountName, String transformName, String jobName); - - /** - * Cancel a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response cancelJobWithResponse( - String resourceGroupName, String accountName, String transformName, String jobName, Context context); -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationsClient.java index 052bb9e5c7531..d6b4ee0aff031 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationsClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationsClient.java @@ -6,9 +6,9 @@ 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.mediaservices.fluent.models.OperationInner; +import com.azure.resourcemanager.mediaservices.fluent.models.OperationCollectionInner; /** An instance of this class provides access to all the operations defined in OperationsClient. */ public interface OperationsClient { @@ -19,8 +19,8 @@ public interface OperationsClient { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a collection of Operation items. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + @ServiceMethod(returns = ReturnType.SINGLE) + OperationCollectionInner list(); /** * Lists all the Media Services operations. @@ -31,6 +31,6 @@ public interface OperationsClient { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a collection of Operation items. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse(Context context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/TransformsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/TransformsClient.java deleted file mode 100644 index 93fa7e220a7f4..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/TransformsClient.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.mediaservices.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.mediaservices.fluent.models.TransformInner; - -/** An instance of this class provides access to all the operations defined in TransformsClient. */ -public interface TransformsClient { - /** - * Lists the Transforms in the account. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services 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 Transform items. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Lists the Transforms in the account. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param filter Restricts the set of items returned. - * @param orderby Specifies the key by which the result collection should be ordered. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 Transform items. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String accountName, String filter, String orderby, Context context); - - /** - * Gets a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 Transform. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - TransformInner get(String resourceGroupName, String accountName, String transformName); - - /** - * Gets a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 a Transform. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String accountName, String transformName, Context context); - - /** - * Creates or updates a new Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - TransformInner createOrUpdate( - String resourceGroupName, String accountName, String transformName, TransformInner parameters); - - /** - * Creates or updates a new Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String accountName, String transformName, TransformInner parameters, Context context); - - /** - * Deletes a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 transformName); - - /** - * Deletes a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String accountName, String transformName, Context context); - - /** - * Updates a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - TransformInner update( - String resourceGroupName, String accountName, String transformName, TransformInner parameters); - - /** - * Updates a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String accountName, String transformName, TransformInner parameters, Context context); -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/JobInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/JobInner.java deleted file mode 100644 index b048a694c7e49..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/JobInner.java +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.mediaservices.models.JobInput; -import com.azure.resourcemanager.mediaservices.models.JobOutput; -import com.azure.resourcemanager.mediaservices.models.JobState; -import com.azure.resourcemanager.mediaservices.models.Priority; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** - * A Job resource type. The progress and state can be obtained by polling a Job or subscribing to events using - * EventGrid. - */ -@JsonFlatten -@Fluent -public class JobInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobInner.class); - - /* - * The system metadata relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /* - * The UTC date and time when the customer has created the Job, in - * 'YYYY-MM-DDThh:mm:ssZ' format. - */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime created; - - /* - * The current state of the job. - */ - @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) - private JobState state; - - /* - * Optional customer supplied description of the Job. - */ - @JsonProperty(value = "properties.description") - private String description; - - /* - * The inputs for the Job. - */ - @JsonProperty(value = "properties.input") - private JobInput input; - - /* - * The UTC date and time when the customer has last updated the Job, in - * 'YYYY-MM-DDThh:mm:ssZ' format. - */ - @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModified; - - /* - * The outputs for the Job. - */ - @JsonProperty(value = "properties.outputs") - private List outputs; - - /* - * Priority with which the job should be processed. Higher priority jobs - * are processed before lower priority jobs. If not set, the default is - * normal. - */ - @JsonProperty(value = "properties.priority") - private Priority priority; - - /* - * Customer provided key, value pairs that will be returned in Job and - * JobOutput state events. - */ - @JsonProperty(value = "properties.correlationData") - private Map correlationData; - - /* - * The UTC date and time at which this Job began processing. - */ - @JsonProperty(value = "properties.startTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startTime; - - /* - * The UTC date and time at which this Job finished processing. - */ - @JsonProperty(value = "properties.endTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endTime; - - /** - * Get the systemData property: The system metadata relating to this resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the created property: The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ' - * format. - * - * @return the created value. - */ - public OffsetDateTime created() { - return this.created; - } - - /** - * Get the state property: The current state of the job. - * - * @return the state value. - */ - public JobState state() { - return this.state; - } - - /** - * Get the description property: Optional customer supplied description of the Job. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Optional customer supplied description of the Job. - * - * @param description the description value to set. - * @return the JobInner object itself. - */ - public JobInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the input property: The inputs for the Job. - * - * @return the input value. - */ - public JobInput input() { - return this.input; - } - - /** - * Set the input property: The inputs for the Job. - * - * @param input the input value to set. - * @return the JobInner object itself. - */ - public JobInner withInput(JobInput input) { - this.input = input; - return this; - } - - /** - * Get the lastModified property: The UTC date and time when the customer has last updated the Job, in - * 'YYYY-MM-DDThh:mm:ssZ' format. - * - * @return the lastModified value. - */ - public OffsetDateTime lastModified() { - return this.lastModified; - } - - /** - * Get the outputs property: The outputs for the Job. - * - * @return the outputs value. - */ - public List outputs() { - return this.outputs; - } - - /** - * Set the outputs property: The outputs for the Job. - * - * @param outputs the outputs value to set. - * @return the JobInner object itself. - */ - public JobInner withOutputs(List outputs) { - this.outputs = outputs; - return this; - } - - /** - * Get the priority property: Priority with which the job should be processed. Higher priority jobs are processed - * before lower priority jobs. If not set, the default is normal. - * - * @return the priority value. - */ - public Priority priority() { - return this.priority; - } - - /** - * Set the priority property: Priority with which the job should be processed. Higher priority jobs are processed - * before lower priority jobs. If not set, the default is normal. - * - * @param priority the priority value to set. - * @return the JobInner object itself. - */ - public JobInner withPriority(Priority priority) { - this.priority = priority; - return this; - } - - /** - * Get the correlationData property: Customer provided key, value pairs that will be returned in Job and JobOutput - * state events. - * - * @return the correlationData value. - */ - public Map correlationData() { - return this.correlationData; - } - - /** - * Set the correlationData property: Customer provided key, value pairs that will be returned in Job and JobOutput - * state events. - * - * @param correlationData the correlationData value to set. - * @return the JobInner object itself. - */ - public JobInner withCorrelationData(Map correlationData) { - this.correlationData = correlationData; - return this; - } - - /** - * Get the startTime property: The UTC date and time at which this Job began processing. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the endTime property: The UTC date and time at which this Job finished processing. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (input() != null) { - input().validate(); - } - if (outputs() != null) { - outputs().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveOutputInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveOutputInner.java index 1b51b55a390c5..6d9be1687e7da 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveOutputInner.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveOutputInner.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mediaservices.models.Hls; import com.azure.resourcemanager.mediaservices.models.LiveOutputResourceState; @@ -21,6 +22,12 @@ public class LiveOutputInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(LiveOutputInner.class); + /* + * The system metadata relating to this resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /* * The description of the live output. */ @@ -87,6 +94,15 @@ public class LiveOutputInner extends ProxyResource { @JsonProperty(value = "properties.resourceState", access = JsonProperty.Access.WRITE_ONLY) private LiveOutputResourceState resourceState; + /** + * Get the systemData property: The system metadata relating to this resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the description property: The description of the live output. * diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceInner.java index 037d2aa8ad677..b5d2c57d143b6 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceInner.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceInner.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.mediaservices.models.AccountEncryption; import com.azure.resourcemanager.mediaservices.models.KeyDelivery; import com.azure.resourcemanager.mediaservices.models.MediaServiceIdentity; +import com.azure.resourcemanager.mediaservices.models.PublicNetworkAccess; import com.azure.resourcemanager.mediaservices.models.StorageAccount; import com.azure.resourcemanager.mediaservices.models.StorageAuthentication; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -68,6 +69,13 @@ public class MediaServiceInner extends Resource { @JsonProperty(value = "properties.keyDelivery") private KeyDelivery keyDelivery; + /* + * Whether or not public network access is allowed for resources under the + * Media Services account. + */ + @JsonProperty(value = "properties.publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + /** * Get the identity property: The Managed Identity for the Media Services account. * @@ -186,6 +194,28 @@ public MediaServiceInner withKeyDelivery(KeyDelivery keyDelivery) { return this; } + /** + * Get the publicNetworkAccess property: Whether or not public network access is allowed for resources under the + * Media Services 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 + * Media Services account. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the MediaServiceInner object itself. + */ + public MediaServiceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + /** {@inheritDoc} */ @Override public MediaServiceInner withLocation(String location) { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/OperationCollectionInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/OperationCollectionInner.java new file mode 100644 index 0000000000000..a601225f9f430 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/OperationCollectionInner.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mediaservices.models.Operation; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A collection of Operation items. */ +@Fluent +public final class OperationCollectionInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationCollectionInner.class); + + /* + * 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/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/OperationInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/OperationInner.java deleted file mode 100644 index b600e9eeaef24..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/OperationInner.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.mediaservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.mediaservices.models.ActionType; -import com.azure.resourcemanager.mediaservices.models.OperationDisplay; -import com.azure.resourcemanager.mediaservices.models.Properties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** An operation. */ -@Fluent -public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - - /* - * 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 OperationInner object itself. - */ - public OperationInner 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 OperationInner object itself. - */ - public OperationInner 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 OperationInner object itself. - */ - public OperationInner 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 OperationInner object itself. - */ - public OperationInner 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 OperationInner object itself. - */ - public OperationInner 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 OperationInner object itself. - */ - public OperationInner 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 OperationInner")); - } - if (display() != null) { - display().validate(); - } - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/TransformInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/TransformInner.java deleted file mode 100644 index bcbc457b633fe..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/TransformInner.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.mediaservices.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.mediaservices.models.TransformOutput; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * A Transform encapsulates the rules or instructions for generating desired outputs from input media, such as by - * transcoding or by extracting insights. After the Transform is created, it can be applied to input media by creating - * Jobs. - */ -@JsonFlatten -@Fluent -public class TransformInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransformInner.class); - - /* - * The system metadata relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /* - * The UTC date and time when the Transform was created, in - * 'YYYY-MM-DDThh:mm:ssZ' format. - */ - @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime created; - - /* - * An optional verbose description of the Transform. - */ - @JsonProperty(value = "properties.description") - private String description; - - /* - * The UTC date and time when the Transform was last updated, in - * 'YYYY-MM-DDThh:mm:ssZ' format. - */ - @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModified; - - /* - * An array of one or more TransformOutputs that the Transform should - * generate. - */ - @JsonProperty(value = "properties.outputs") - private List outputs; - - /** - * Get the systemData property: The system metadata relating to this resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the created property: The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format. - * - * @return the created value. - */ - public OffsetDateTime created() { - return this.created; - } - - /** - * Get the description property: An optional verbose description of the Transform. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: An optional verbose description of the Transform. - * - * @param description the description value to set. - * @return the TransformInner object itself. - */ - public TransformInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the lastModified property: The UTC date and time when the Transform was last updated, in - * 'YYYY-MM-DDThh:mm:ssZ' format. - * - * @return the lastModified value. - */ - public OffsetDateTime lastModified() { - return this.lastModified; - } - - /** - * Get the outputs property: An array of one or more TransformOutputs that the Transform should generate. - * - * @return the outputs value. - */ - public List outputs() { - return this.outputs; - } - - /** - * Set the outputs property: An array of one or more TransformOutputs that the Transform should generate. - * - * @param outputs the outputs value to set. - * @return the TransformInner object itself. - */ - public TransformInner withOutputs(List outputs) { - this.outputs = outputs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (outputs() != null) { - outputs().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AccountFiltersClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AccountFiltersClientImpl.java index 48356ab8f7879..76d824182bc56 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AccountFiltersClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AccountFiltersClientImpl.java @@ -186,7 +186,6 @@ private Mono> listSinglePageAsync(String resou if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -197,7 +196,7 @@ private Mono> listSinglePageAsync(String resou this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context)) .>map( @@ -245,7 +244,6 @@ private Mono> listSinglePageAsync( if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -254,7 +252,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context) .map( @@ -369,7 +367,6 @@ private Mono> getWithResponseAsync( if (filterName == null) { return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -381,7 +378,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, filterName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -424,7 +421,6 @@ private Mono> getWithResponseAsync( if (filterName == null) { return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -434,7 +430,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, filterName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -539,7 +535,6 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -551,7 +546,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, accountName, filterName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -605,7 +600,6 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -615,7 +609,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, accountName, filterName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -724,7 +718,6 @@ private Mono> deleteWithResponseAsync( if (filterName == null) { return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -736,7 +729,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, filterName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -779,7 +772,6 @@ private Mono> deleteWithResponseAsync( if (filterName == null) { return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -789,7 +781,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, filterName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -886,7 +878,6 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -898,7 +889,7 @@ private Mono> updateWithResponseAsync( resourceGroupName, accountName, filterName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -952,7 +943,6 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -962,7 +952,7 @@ private Mono> updateWithResponseAsync( resourceGroupName, accountName, filterName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersClientImpl.java index 63eb81cd9fc08..dadf89fae0195 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersClientImpl.java @@ -196,7 +196,6 @@ private Mono> listSinglePageAsync( if (assetName == null) { return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -208,7 +207,7 @@ private Mono> listSinglePageAsync( resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), accept, context)) .>map( @@ -260,7 +259,6 @@ private Mono> listSinglePageAsync( if (assetName == null) { return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -270,7 +268,7 @@ private Mono> listSinglePageAsync( resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), accept, context) .map( @@ -396,7 +394,6 @@ private Mono> getWithResponseAsync( if (filterName == null) { return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -409,7 +406,7 @@ private Mono> getWithResponseAsync( accountName, assetName, filterName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -456,7 +453,6 @@ private Mono> getWithResponseAsync( if (filterName == null) { return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -467,7 +463,7 @@ private Mono> getWithResponseAsync( accountName, assetName, filterName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -584,7 +580,6 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -597,7 +592,7 @@ private Mono> createOrUpdateWithResponseAsync( accountName, assetName, filterName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -656,7 +651,6 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -667,7 +661,7 @@ private Mono> createOrUpdateWithResponseAsync( accountName, assetName, filterName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -794,7 +788,6 @@ private Mono> deleteWithResponseAsync( if (filterName == null) { return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -807,7 +800,7 @@ private Mono> deleteWithResponseAsync( accountName, assetName, filterName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -854,7 +847,6 @@ private Mono> deleteWithResponseAsync( if (filterName == null) { return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -865,7 +857,7 @@ private Mono> deleteWithResponseAsync( accountName, assetName, filterName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -973,7 +965,6 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -986,7 +977,7 @@ private Mono> updateWithResponseAsync( accountName, assetName, filterName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -1045,7 +1036,6 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1056,7 +1046,7 @@ private Mono> updateWithResponseAsync( accountName, assetName, filterName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsClientImpl.java index 2a2a50977c9f0..ea7553186a957 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsClientImpl.java @@ -247,7 +247,6 @@ private Mono> listSinglePageAsync( if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -258,7 +257,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), filter, top, orderby, @@ -313,7 +312,6 @@ private Mono> listSinglePageAsync( if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -322,7 +320,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), filter, top, orderby, @@ -479,7 +477,6 @@ private Mono> getWithResponseAsync( if (assetName == null) { return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -491,7 +488,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -534,7 +531,6 @@ private Mono> getWithResponseAsync( if (assetName == null) { return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -544,7 +540,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -649,7 +645,6 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -661,7 +656,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -711,7 +706,6 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -721,7 +715,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -826,7 +820,6 @@ private Mono> deleteWithResponseAsync( if (assetName == null) { return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -838,7 +831,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -881,7 +874,6 @@ private Mono> deleteWithResponseAsync( if (assetName == null) { return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -891,7 +883,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -988,7 +980,6 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1000,7 +991,7 @@ private Mono> updateWithResponseAsync( resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -1050,7 +1041,6 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1060,7 +1050,7 @@ private Mono> updateWithResponseAsync( resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -1171,7 +1161,6 @@ private Mono> listContainerSasWithResponseAsync } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1183,7 +1172,7 @@ private Mono> listContainerSasWithResponseAsync resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -1238,7 +1227,6 @@ private Mono> listContainerSasWithResponseAsync } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1248,7 +1236,7 @@ private Mono> listContainerSasWithResponseAsync resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -1361,7 +1349,6 @@ private Mono> getEncryptionKe if (assetName == null) { return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1373,7 +1360,7 @@ private Mono> getEncryptionKe resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1416,7 +1403,6 @@ private Mono> getEncryptionKe if (assetName == null) { return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1426,7 +1412,7 @@ private Mono> getEncryptionKe resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -1527,7 +1513,6 @@ private Mono> listStreamingLocators if (assetName == null) { return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1539,7 +1524,7 @@ private Mono> listStreamingLocators resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1582,7 +1567,6 @@ private Mono> listStreamingLocators if (assetName == null) { return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1592,7 +1576,7 @@ private Mono> listStreamingLocators resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), accept, context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AzureMediaServicesImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AzureMediaServicesImpl.java index d316d8fd8d832..792d7559cd2fc 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AzureMediaServicesImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AzureMediaServicesImpl.java @@ -26,7 +26,6 @@ import com.azure.resourcemanager.mediaservices.fluent.AssetsClient; import com.azure.resourcemanager.mediaservices.fluent.AzureMediaServices; import com.azure.resourcemanager.mediaservices.fluent.ContentKeyPoliciesClient; -import com.azure.resourcemanager.mediaservices.fluent.JobsClient; import com.azure.resourcemanager.mediaservices.fluent.LiveEventsClient; import com.azure.resourcemanager.mediaservices.fluent.LiveOutputsClient; import com.azure.resourcemanager.mediaservices.fluent.LocationsClient; @@ -37,7 +36,6 @@ import com.azure.resourcemanager.mediaservices.fluent.StreamingEndpointsClient; import com.azure.resourcemanager.mediaservices.fluent.StreamingLocatorsClient; import com.azure.resourcemanager.mediaservices.fluent.StreamingPoliciesClient; -import com.azure.resourcemanager.mediaservices.fluent.TransformsClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -77,6 +75,18 @@ 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; @@ -113,18 +123,6 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The AccountFiltersClient object to access its operations. */ - private final AccountFiltersClient accountFilters; - - /** - * Gets the AccountFiltersClient object to access its operations. - * - * @return the AccountFiltersClient object. - */ - public AccountFiltersClient getAccountFilters() { - return this.accountFilters; - } - /** The OperationsClient object to access its operations. */ private final OperationsClient operations; @@ -185,6 +183,18 @@ public LocationsClient getLocations() { return this.locations; } + /** The AccountFiltersClient object to access its operations. */ + private final AccountFiltersClient accountFilters; + + /** + * Gets the AccountFiltersClient object to access its operations. + * + * @return the AccountFiltersClient object. + */ + public AccountFiltersClient getAccountFilters() { + return this.accountFilters; + } + /** The AssetsClient object to access its operations. */ private final AssetsClient assets; @@ -221,30 +231,6 @@ public ContentKeyPoliciesClient getContentKeyPolicies() { return this.contentKeyPolicies; } - /** The TransformsClient object to access its operations. */ - private final TransformsClient transforms; - - /** - * Gets the TransformsClient object to access its operations. - * - * @return the TransformsClient object. - */ - public TransformsClient getTransforms() { - return this.transforms; - } - - /** 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 StreamingPoliciesClient object to access its operations. */ private final StreamingPoliciesClient streamingPolicies; @@ -327,17 +313,16 @@ public StreamingEndpointsClient getStreamingEndpoints() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.accountFilters = new AccountFiltersClientImpl(this); + this.apiVersion = "2021-06-01"; this.operations = new OperationsClientImpl(this); this.mediaservices = new MediaservicesClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.locations = new LocationsClientImpl(this); + this.accountFilters = new AccountFiltersClientImpl(this); this.assets = new AssetsClientImpl(this); this.assetFilters = new AssetFiltersClientImpl(this); this.contentKeyPolicies = new ContentKeyPoliciesClientImpl(this); - this.transforms = new TransformsClientImpl(this); - this.jobs = new JobsClientImpl(this); this.streamingPolicies = new StreamingPoliciesClientImpl(this); this.streamingLocators = new StreamingLocatorsClientImpl(this); this.liveEvents = new LiveEventsClientImpl(this); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPoliciesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPoliciesClientImpl.java index 748ce1c2737bf..8ce5526600b4d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPoliciesClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPoliciesClientImpl.java @@ -153,7 +153,7 @@ Mono> update( @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" + "/{accountName}/contentKeyPolicies/{contentKeyPolicyName}/getPolicyPropertiesWithSecrets") - @ExpectedResponses({200, 404}) + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getPolicyPropertiesWithSecrets( @HostParam("$host") String endpoint, @@ -212,7 +212,6 @@ private Mono> listSinglePageAsync( if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -223,7 +222,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), filter, top, orderby, @@ -278,7 +277,6 @@ private Mono> listSinglePageAsync( if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -287,7 +285,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), filter, top, orderby, @@ -445,7 +443,6 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -457,7 +454,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, contentKeyPolicyName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -501,7 +498,6 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -511,7 +507,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, contentKeyPolicyName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -618,7 +614,6 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -630,7 +625,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, accountName, contentKeyPolicyName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -685,7 +680,6 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -695,7 +689,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, accountName, contentKeyPolicyName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -807,7 +801,6 @@ private Mono> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -819,7 +812,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, contentKeyPolicyName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -863,7 +856,6 @@ private Mono> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -873,7 +865,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, contentKeyPolicyName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -971,7 +963,6 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -983,7 +974,7 @@ private Mono> updateWithResponseAsync( resourceGroupName, accountName, contentKeyPolicyName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -1038,7 +1029,6 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1048,7 +1038,7 @@ private Mono> updateWithResponseAsync( resourceGroupName, accountName, contentKeyPolicyName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -1159,7 +1149,6 @@ private Mono> getPolicyPropertiesWithS return Mono .error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1171,7 +1160,7 @@ private Mono> getPolicyPropertiesWithS resourceGroupName, accountName, contentKeyPolicyName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1215,7 +1204,6 @@ private Mono> getPolicyPropertiesWithS return Mono .error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1225,7 +1213,7 @@ private Mono> getPolicyPropertiesWithS resourceGroupName, accountName, contentKeyPolicyName, - apiVersion, + this.client.getApiVersion(), accept, context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobImpl.java deleted file mode 100644 index 379872b2fb623..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobImpl.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.mediaservices.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.mediaservices.fluent.models.JobInner; -import com.azure.resourcemanager.mediaservices.models.Job; -import com.azure.resourcemanager.mediaservices.models.JobInput; -import com.azure.resourcemanager.mediaservices.models.JobOutput; -import com.azure.resourcemanager.mediaservices.models.JobState; -import com.azure.resourcemanager.mediaservices.models.Priority; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class JobImpl implements Job, Job.Definition, Job.Update { - private JobInner innerObject; - - private final com.azure.resourcemanager.mediaservices.MediaServicesManager 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 OffsetDateTime created() { - return this.innerModel().created(); - } - - public JobState state() { - return this.innerModel().state(); - } - - public String description() { - return this.innerModel().description(); - } - - public JobInput input() { - return this.innerModel().input(); - } - - public OffsetDateTime lastModified() { - return this.innerModel().lastModified(); - } - - public List outputs() { - List inner = this.innerModel().outputs(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Priority priority() { - return this.innerModel().priority(); - } - - public Map correlationData() { - Map inner = this.innerModel().correlationData(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public OffsetDateTime startTime() { - return this.innerModel().startTime(); - } - - public OffsetDateTime endTime() { - return this.innerModel().endTime(); - } - - public JobInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String transformName; - - private String jobName; - - public JobImpl withExistingTransform(String resourceGroupName, String accountName, String transformName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - this.transformName = transformName; - return this; - } - - public Job create() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .createWithResponse( - resourceGroupName, accountName, transformName, jobName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Job create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .createWithResponse(resourceGroupName, accountName, transformName, jobName, this.innerModel(), context) - .getValue(); - return this; - } - - JobImpl(String name, com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) { - this.innerObject = new JobInner(); - this.serviceManager = serviceManager; - this.jobName = name; - } - - public JobImpl update() { - return this; - } - - public Job apply() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .updateWithResponse( - resourceGroupName, accountName, transformName, jobName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Job apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .updateWithResponse(resourceGroupName, accountName, transformName, jobName, this.innerModel(), context) - .getValue(); - return this; - } - - JobImpl(JobInner innerObject, com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "mediaServices"); - this.transformName = Utils.getValueFromIdByName(innerObject.id(), "transforms"); - this.jobName = Utils.getValueFromIdByName(innerObject.id(), "jobs"); - } - - public Job refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .getWithResponse(resourceGroupName, accountName, transformName, jobName, Context.NONE) - .getValue(); - return this; - } - - public Job refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .getWithResponse(resourceGroupName, accountName, transformName, jobName, context) - .getValue(); - return this; - } - - public void cancelJob() { - serviceManager.jobs().cancelJob(resourceGroupName, accountName, transformName, jobName); - } - - public Response cancelJobWithResponse(Context context) { - return serviceManager - .jobs() - .cancelJobWithResponse(resourceGroupName, accountName, transformName, jobName, context); - } - - public JobImpl withDescription(String description) { - this.innerModel().withDescription(description); - return this; - } - - public JobImpl withInput(JobInput input) { - this.innerModel().withInput(input); - return this; - } - - public JobImpl withOutputs(List outputs) { - this.innerModel().withOutputs(outputs); - return this; - } - - public JobImpl withPriority(Priority priority) { - this.innerModel().withPriority(priority); - return this; - } - - public JobImpl withCorrelationData(Map correlationData) { - this.innerModel().withCorrelationData(correlationData); - return this; - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsClientImpl.java deleted file mode 100644 index 733501187c2f4..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsClientImpl.java +++ /dev/null @@ -1,1436 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices.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.core.util.logging.ClientLogger; -import com.azure.resourcemanager.mediaservices.fluent.JobsClient; -import com.azure.resourcemanager.mediaservices.fluent.models.JobInner; -import com.azure.resourcemanager.mediaservices.models.JobCollection; -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 AzureMediaServicesImpl client; - - /** - * Initializes an instance of JobsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - JobsClientImpl(AzureMediaServicesImpl client) { - this.service = RestProxy.create(JobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMediaServicesJobs to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMediaServicesJo") - private interface JobsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" - + "/{accountName}/transforms/{transformName}/jobs") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("transformName") String transformName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, - @QueryParam("$orderby") String orderby, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" - + "/{accountName}/transforms/{transformName}/jobs/{jobName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("transformName") String transformName, - @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" - + "/{accountName}/transforms/{transformName}/jobs/{jobName}") - @ExpectedResponses({201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("transformName") String transformName, - @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" - + "/{accountName}/transforms/{transformName}/jobs/{jobName}") - @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("transformName") String transformName, - @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" - + "/{accountName}/transforms/{transformName}/jobs/{jobName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("transformName") String transformName, - @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" - + "/{accountName}/transforms/{transformName}/jobs/{jobName}/cancelJob") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> cancelJob( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("transformName") String transformName, - @PathParam("jobName") String jobName, - @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 all of the Jobs for the Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param filter Restricts the set of items returned. - * @param orderby Specifies the key by which the result collection should be ordered. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Job items. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String accountName, String transformName, String filter, String 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null.")); - } - final String apiVersion = "2020-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - apiVersion, - filter, - orderby, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().odataNextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the Jobs for the Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param filter Restricts the set of items returned. - * @param orderby Specifies the key by which the result collection should be ordered. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Job items. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String accountName, - String transformName, - String filter, - String 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null.")); - } - final String apiVersion = "2020-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - apiVersion, - filter, - orderby, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().odataNextLink(), - null)); - } - - /** - * Lists all of the Jobs for the Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param filter Restricts the set of items returned. - * @param orderby Specifies the key by which the result collection should be ordered. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Job items. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String accountName, String transformName, String filter, String orderby) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, accountName, transformName, filter, orderby), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the Jobs for the Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 Job items. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, String transformName) { - final String filter = null; - final String orderby = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, accountName, transformName, filter, orderby), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the Jobs for the Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param filter Restricts the set of items returned. - * @param orderby Specifies the key by which the result collection should be ordered. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Job items. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String accountName, - String transformName, - String filter, - String orderby, - Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, accountName, transformName, filter, orderby, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the Jobs for the Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 Job items. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, String transformName) { - final String filter = null; - final String orderby = null; - return new PagedIterable<>(listAsync(resourceGroupName, accountName, transformName, filter, orderby)); - } - - /** - * Lists all of the Jobs for the Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param filter Restricts the set of items returned. - * @param orderby Specifies the key by which the result collection should be ordered. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Job items. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String accountName, - String transformName, - String filter, - String orderby, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, transformName, filter, orderby, context)); - } - - /** - * Gets a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, String transformName, String jobName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String apiVersion = "2020-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - jobName, - apiVersion, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, String transformName, 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 (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String apiVersion = "2020-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - jobName, - apiVersion, - accept, - context); - } - - /** - * Gets a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String accountName, String transformName, String jobName) { - return getWithResponseAsync(resourceGroupName, accountName, transformName, jobName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner get(String resourceGroupName, String accountName, String transformName, String jobName) { - return getAsync(resourceGroupName, accountName, transformName, jobName).block(); - } - - /** - * Gets a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String accountName, String transformName, String jobName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, transformName, jobName, context).block(); - } - - /** - * Creates a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String accountName, String transformName, String jobName, JobInner 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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName 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 apiVersion = "2020-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - jobName, - apiVersion, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String accountName, - String transformName, - String jobName, - JobInner 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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName 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 apiVersion = "2020-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - jobName, - apiVersion, - parameters, - accept, - context); - } - - /** - * Creates a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String accountName, String transformName, String jobName, JobInner parameters) { - return createWithResponseAsync(resourceGroupName, accountName, transformName, jobName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner create( - String resourceGroupName, String accountName, String transformName, String jobName, JobInner parameters) { - return createAsync(resourceGroupName, accountName, transformName, jobName, parameters).block(); - } - - /** - * Creates a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String accountName, - String transformName, - String jobName, - JobInner parameters, - Context context) { - return createWithResponseAsync(resourceGroupName, accountName, transformName, jobName, parameters, context) - .block(); - } - - /** - * Deletes a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String accountName, String transformName, String jobName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String apiVersion = "2020-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - jobName, - apiVersion, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String accountName, String transformName, 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 (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String apiVersion = "2020-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - jobName, - apiVersion, - accept, - context); - } - - /** - * Deletes a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String transformName, String jobName) { - return deleteWithResponseAsync(resourceGroupName, accountName, transformName, jobName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 transformName, String jobName) { - deleteAsync(resourceGroupName, accountName, transformName, jobName).block(); - } - - /** - * Deletes a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String accountName, String transformName, String jobName, Context context) { - return deleteWithResponseAsync(resourceGroupName, accountName, transformName, jobName, context).block(); - } - - /** - * Update is only supported for description and priority. Updating Priority will take effect when the Job state is - * Queued or Scheduled and depending on the timing the priority update may be ignored. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String accountName, String transformName, String jobName, JobInner 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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName 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 apiVersion = "2020-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - jobName, - apiVersion, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update is only supported for description and priority. Updating Priority will take effect when the Job state is - * Queued or Scheduled and depending on the timing the priority update may be ignored. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String accountName, - String transformName, - String jobName, - JobInner 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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName 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 apiVersion = "2020-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - jobName, - apiVersion, - parameters, - accept, - context); - } - - /** - * Update is only supported for description and priority. Updating Priority will take effect when the Job state is - * Queued or Scheduled and depending on the timing the priority update may be ignored. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String accountName, String transformName, String jobName, JobInner parameters) { - return updateWithResponseAsync(resourceGroupName, accountName, transformName, jobName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update is only supported for description and priority. Updating Priority will take effect when the Job state is - * Queued or Scheduled and depending on the timing the priority update may be ignored. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner update( - String resourceGroupName, String accountName, String transformName, String jobName, JobInner parameters) { - return updateAsync(resourceGroupName, accountName, transformName, jobName, parameters).block(); - } - - /** - * Update is only supported for description and priority. Updating Priority will take effect when the Job state is - * Queued or Scheduled and depending on the timing the priority update may be ignored. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job resource type. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String accountName, - String transformName, - String jobName, - JobInner parameters, - Context context) { - return updateWithResponseAsync(resourceGroupName, accountName, transformName, jobName, parameters, context) - .block(); - } - - /** - * Cancel a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> cancelJobWithResponseAsync( - String resourceGroupName, String accountName, String transformName, String jobName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String apiVersion = "2020-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .cancelJob( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - jobName, - apiVersion, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Cancel a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> cancelJobWithResponseAsync( - String resourceGroupName, String accountName, String transformName, 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 (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String apiVersion = "2020-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .cancelJob( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - jobName, - apiVersion, - accept, - context); - } - - /** - * Cancel a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelJobAsync( - String resourceGroupName, String accountName, String transformName, String jobName) { - return cancelJobWithResponseAsync(resourceGroupName, accountName, transformName, jobName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Cancel a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 cancelJob(String resourceGroupName, String accountName, String transformName, String jobName) { - cancelJobAsync(resourceGroupName, accountName, transformName, jobName).block(); - } - - /** - * Cancel a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response cancelJobWithResponse( - String resourceGroupName, String accountName, String transformName, String jobName, Context context) { - return cancelJobWithResponseAsync(resourceGroupName, accountName, transformName, 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 a collection of Job items. - */ - @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().odataNextLink(), - 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 Job items. - */ - @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().odataNextLink(), - null)); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsImpl.java deleted file mode 100644 index cdf45eebc40be..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsImpl.java +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices.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.mediaservices.fluent.JobsClient; -import com.azure.resourcemanager.mediaservices.fluent.models.JobInner; -import com.azure.resourcemanager.mediaservices.models.Job; -import com.azure.resourcemanager.mediaservices.models.Jobs; -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.mediaservices.MediaServicesManager serviceManager; - - public JobsImpl( - JobsClient innerClient, com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String accountName, String transformName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, transformName); - return Utils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String accountName, - String transformName, - String filter, - String orderby, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, accountName, transformName, filter, orderby, context); - return Utils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); - } - - public Job get(String resourceGroupName, String accountName, String transformName, String jobName) { - JobInner inner = this.serviceClient().get(resourceGroupName, accountName, transformName, jobName); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String accountName, String transformName, String jobName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, accountName, transformName, jobName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new JobImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String transformName, String jobName) { - this.serviceClient().delete(resourceGroupName, accountName, transformName, jobName); - } - - public Response deleteWithResponse( - String resourceGroupName, String accountName, String transformName, String jobName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, transformName, jobName, context); - } - - public void cancelJob(String resourceGroupName, String accountName, String transformName, String jobName) { - this.serviceClient().cancelJob(resourceGroupName, accountName, transformName, jobName); - } - - public Response cancelJobWithResponse( - String resourceGroupName, String accountName, String transformName, String jobName, Context context) { - return this - .serviceClient() - .cancelJobWithResponse(resourceGroupName, accountName, transformName, 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 accountName = Utils.getValueFromIdByName(id, "mediaServices"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id))); - } - String transformName = Utils.getValueFromIdByName(id, "transforms"); - if (transformName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'transforms'.", 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, accountName, transformName, 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 accountName = Utils.getValueFromIdByName(id, "mediaServices"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id))); - } - String transformName = Utils.getValueFromIdByName(id, "transforms"); - if (transformName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'transforms'.", 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, accountName, transformName, 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 accountName = Utils.getValueFromIdByName(id, "mediaServices"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id))); - } - String transformName = Utils.getValueFromIdByName(id, "transforms"); - if (transformName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'transforms'.", 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.deleteWithResponse(resourceGroupName, accountName, transformName, jobName, 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 accountName = Utils.getValueFromIdByName(id, "mediaServices"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id))); - } - String transformName = Utils.getValueFromIdByName(id, "transforms"); - if (transformName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'transforms'.", 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.deleteWithResponse(resourceGroupName, accountName, transformName, jobName, context); - } - - private JobsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() { - return this.serviceManager; - } - - public JobImpl define(String name) { - return new JobImpl(name, this.manager()); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveEventsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveEventsClientImpl.java index 0b4a2a3ce0444..8182f925da399 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveEventsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveEventsClientImpl.java @@ -259,7 +259,6 @@ private Mono> listSinglePageAsync(String resourceG if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -270,7 +269,7 @@ private Mono> listSinglePageAsync(String resourceG this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context)) .>map( @@ -318,7 +317,6 @@ private Mono> listSinglePageAsync( if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -327,7 +325,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context) .map( @@ -442,7 +440,6 @@ private Mono> getWithResponseAsync( if (liveEventName == null) { return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -454,7 +451,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -497,7 +494,6 @@ private Mono> getWithResponseAsync( if (liveEventName == null) { return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -507,7 +503,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -617,7 +613,6 @@ private Mono>> createWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -629,7 +624,7 @@ private Mono>> createWithResponseAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), autoStart, parameters, accept, @@ -686,7 +681,6 @@ private Mono>> createWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -696,7 +690,7 @@ private Mono>> createWithResponseAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), autoStart, parameters, accept, @@ -993,7 +987,6 @@ private Mono>> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1005,7 +998,7 @@ private Mono>> updateWithResponseAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -1059,7 +1052,6 @@ private Mono>> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1069,7 +1061,7 @@ private Mono>> updateWithResponseAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -1290,7 +1282,6 @@ private Mono>> deleteWithResponseAsync( if (liveEventName == null) { return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1302,7 +1293,7 @@ private Mono>> deleteWithResponseAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1345,7 +1336,6 @@ private Mono>> deleteWithResponseAsync( if (liveEventName == null) { return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1355,7 +1345,7 @@ private Mono>> deleteWithResponseAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -1543,7 +1533,6 @@ private Mono>> allocateWithResponseAsync( if (liveEventName == null) { return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1555,7 +1544,7 @@ private Mono>> allocateWithResponseAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1598,7 +1587,6 @@ private Mono>> allocateWithResponseAsync( if (liveEventName == null) { return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1608,7 +1596,7 @@ private Mono>> allocateWithResponseAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -1797,7 +1785,6 @@ private Mono>> startWithResponseAsync( if (liveEventName == null) { return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1809,7 +1796,7 @@ private Mono>> startWithResponseAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1852,7 +1839,6 @@ private Mono>> startWithResponseAsync( if (liveEventName == null) { return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1862,7 +1848,7 @@ private Mono>> startWithResponseAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -2055,7 +2041,6 @@ private Mono>> stopWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2067,7 +2052,7 @@ private Mono>> stopWithResponseAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -2121,7 +2106,6 @@ private Mono>> stopWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2131,7 +2115,7 @@ private Mono>> stopWithResponseAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -2350,7 +2334,6 @@ private Mono>> resetWithResponseAsync( if (liveEventName == null) { return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2362,7 +2345,7 @@ private Mono>> resetWithResponseAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -2407,7 +2390,6 @@ private Mono>> resetWithResponseAsync( if (liveEventName == null) { return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2417,7 +2399,7 @@ private Mono>> resetWithResponseAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), accept, context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputImpl.java index 14263b8bba43f..905ffe617c950 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.mediaservices.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.fluent.models.LiveOutputInner; import com.azure.resourcemanager.mediaservices.models.Hls; @@ -35,6 +36,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String description() { return this.innerModel().description(); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputsClientImpl.java index 55a6960be7a32..59357c3e0e788 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputsClientImpl.java @@ -182,7 +182,6 @@ private Mono> listSinglePageAsync( if (liveEventName == null) { return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -194,7 +193,7 @@ private Mono> listSinglePageAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), accept, context)) .>map( @@ -246,7 +245,6 @@ private Mono> listSinglePageAsync( if (liveEventName == null) { return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -256,7 +254,7 @@ private Mono> listSinglePageAsync( resourceGroupName, accountName, liveEventName, - apiVersion, + this.client.getApiVersion(), accept, context) .map( @@ -382,7 +380,6 @@ private Mono> getWithResponseAsync( if (liveOutputName == null) { return Mono.error(new IllegalArgumentException("Parameter liveOutputName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -395,7 +392,7 @@ private Mono> getWithResponseAsync( accountName, liveEventName, liveOutputName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -442,7 +439,6 @@ private Mono> getWithResponseAsync( if (liveOutputName == null) { return Mono.error(new IllegalArgumentException("Parameter liveOutputName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -453,7 +449,7 @@ private Mono> getWithResponseAsync( accountName, liveEventName, liveOutputName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -571,7 +567,6 @@ private Mono>> createWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -584,7 +579,7 @@ private Mono>> createWithResponseAsync( accountName, liveEventName, liveOutputName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -643,7 +638,6 @@ private Mono>> createWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -654,7 +648,7 @@ private Mono>> createWithResponseAsync( accountName, liveEventName, liveOutputName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -909,7 +903,6 @@ private Mono>> deleteWithResponseAsync( if (liveOutputName == null) { return Mono.error(new IllegalArgumentException("Parameter liveOutputName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -922,7 +915,7 @@ private Mono>> deleteWithResponseAsync( accountName, liveEventName, liveOutputName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -969,7 +962,6 @@ private Mono>> deleteWithResponseAsync( if (liveOutputName == null) { return Mono.error(new IllegalArgumentException("Parameter liveOutputName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -980,7 +972,7 @@ private Mono>> deleteWithResponseAsync( accountName, liveEventName, liveOutputName, - apiVersion, + this.client.getApiVersion(), accept, context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LocationsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LocationsClientImpl.java index 6c9f0aafb37e5..3cfa950cbd97f 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LocationsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LocationsClientImpl.java @@ -104,7 +104,6 @@ private Mono> checkNameAvailabi } else { parameters.validate(); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -114,7 +113,7 @@ private Mono> checkNameAvailabi this.client.getEndpoint(), this.client.getSubscriptionId(), locationName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -155,7 +154,6 @@ private Mono> checkNameAvailabi } else { parameters.validate(); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -163,7 +161,7 @@ private Mono> checkNameAvailabi this.client.getEndpoint(), this.client.getSubscriptionId(), locationName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceImpl.java index fda25e248d1bf..6ba1c7bbfb0ae 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceImpl.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.mediaservices.models.MediaService; import com.azure.resourcemanager.mediaservices.models.MediaServiceIdentity; import com.azure.resourcemanager.mediaservices.models.MediaServiceUpdate; +import com.azure.resourcemanager.mediaservices.models.PublicNetworkAccess; import com.azure.resourcemanager.mediaservices.models.StorageAccount; import com.azure.resourcemanager.mediaservices.models.StorageAuthentication; import com.azure.resourcemanager.mediaservices.models.SyncStorageKeysInput; @@ -87,6 +88,10 @@ public KeyDelivery keyDelivery() { return this.innerModel().keyDelivery(); } + public PublicNetworkAccess publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -283,6 +288,16 @@ public MediaServiceImpl withKeyDelivery(KeyDelivery keyDelivery) { } } + public MediaServiceImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + if (isInCreateMode()) { + this.innerModel().withPublicNetworkAccess(publicNetworkAccess); + return this; + } else { + this.updateParameters.withPublicNetworkAccess(publicNetworkAccess); + return this; + } + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesClientImpl.java index 0b93f8b1d7a8e..aa82a318be8b9 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesClientImpl.java @@ -235,7 +235,6 @@ private Mono> listByResourceGroupSinglePageAsyn return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -245,7 +244,7 @@ private Mono> listByResourceGroupSinglePageAsyn this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - apiVersion, + this.client.getApiVersion(), accept, context)) .>map( @@ -289,7 +288,6 @@ private Mono> listByResourceGroupSinglePageAsyn return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -297,7 +295,7 @@ private Mono> listByResourceGroupSinglePageAsyn this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - apiVersion, + this.client.getApiVersion(), accept, context) .map( @@ -404,7 +402,6 @@ private Mono> getByResourceGroupWithResponseAsync( if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -415,7 +412,7 @@ private Mono> getByResourceGroupWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -454,7 +451,6 @@ private Mono> getByResourceGroupWithResponseAsync( if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -463,7 +459,7 @@ private Mono> getByResourceGroupWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -561,7 +557,6 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -572,7 +567,7 @@ private Mono> createOrUpdateWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -618,7 +613,6 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -627,7 +621,7 @@ private Mono> createOrUpdateWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -724,7 +718,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -735,7 +728,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -774,7 +767,6 @@ private Mono> deleteWithResponseAsync( if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -783,7 +775,7 @@ private Mono> deleteWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -871,7 +863,6 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -882,7 +873,7 @@ private Mono> updateWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -928,7 +919,6 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -937,7 +927,7 @@ private Mono> updateWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -1040,7 +1030,6 @@ private Mono> syncStorageKeysWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1051,7 +1040,7 @@ private Mono> syncStorageKeysWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -1097,7 +1086,6 @@ private Mono> syncStorageKeysWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1106,7 +1094,7 @@ private Mono> syncStorageKeysWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -1201,7 +1189,6 @@ private Mono> listEdgePoliciesWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1212,7 +1199,7 @@ private Mono> listEdgePoliciesWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -1258,7 +1245,6 @@ private Mono> listEdgePoliciesWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1267,7 +1253,7 @@ private Mono> listEdgePoliciesWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -1354,13 +1340,17 @@ private Mono> listSinglePageAsync() { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( context -> service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context)) + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) .>map( res -> new PagedResponseBase<>( @@ -1396,11 +1386,15 @@ private Mono> listSinglePageAsync(Context conte new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) .map( res -> new PagedResponseBase<>( diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationCollectionImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationCollectionImpl.java new file mode 100644 index 0000000000000..b0761d250ed78 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationCollectionImpl.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.implementation; + +import com.azure.resourcemanager.mediaservices.fluent.models.OperationCollectionInner; +import com.azure.resourcemanager.mediaservices.models.Operation; +import com.azure.resourcemanager.mediaservices.models.OperationCollection; +import java.util.Collections; +import java.util.List; + +public final class OperationCollectionImpl implements OperationCollection { + private OperationCollectionInner innerObject; + + private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager; + + OperationCollectionImpl( + OperationCollectionInner innerObject, + com.azure.resourcemanager.mediaservices.MediaServicesManager 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.mediaservices.MediaServicesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationImpl.java deleted file mode 100644 index b7a1d9f6fc758..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationImpl.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.mediaservices.implementation; - -import com.azure.resourcemanager.mediaservices.fluent.models.OperationInner; -import com.azure.resourcemanager.mediaservices.models.ActionType; -import com.azure.resourcemanager.mediaservices.models.Operation; -import com.azure.resourcemanager.mediaservices.models.OperationDisplay; -import com.azure.resourcemanager.mediaservices.models.Properties; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager; - - OperationImpl( - OperationInner innerObject, com.azure.resourcemanager.mediaservices.MediaServicesManager 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 Properties properties() { - return this.innerModel().properties(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public ActionType actionType() { - return this.innerModel().actionType(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationsClientImpl.java index 4ccae7ab1d580..115d729abbad4 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationsClientImpl.java @@ -10,16 +10,11 @@ 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; @@ -27,8 +22,7 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mediaservices.fluent.OperationsClient; -import com.azure.resourcemanager.mediaservices.fluent.models.OperationInner; -import com.azure.resourcemanager.mediaservices.models.OperationCollection; +import com.azure.resourcemanager.mediaservices.fluent.models.OperationCollectionInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in OperationsClient. */ @@ -63,21 +57,11 @@ private interface OperationsService { @Get("/providers/Microsoft.Media/operations") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( + 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); } /** @@ -88,26 +72,17 @@ Mono> listNext( * @return a collection of Operation items. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + 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 apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().odataNextLink(), - null)) + .withContext( + context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -121,121 +96,53 @@ private Mono> listSinglePageAsync() { * @return a collection of Operation items. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + 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 apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().odataNextLink(), - null)); - } - - /** - * Lists all the Media Services 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.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); } /** * Lists all the Media Services 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. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the Media Services 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.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAsync() { + return listWithResponseAsync() + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); } /** * Lists all the Media Services 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. - */ - @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 a collection of Operation items. */ @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().odataNextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public OperationCollectionInner list() { + return listAsync().block(); } /** - * Get the next page of items. + * Lists all the Media Services operations. * - * @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. @@ -243,28 +150,7 @@ private Mono> listNextSinglePageAsync(String nextL * @return a collection of Operation items. */ @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().odataNextLink(), - null)); + public Response listWithResponse(Context context) { + return listWithResponseAsync(context).block(); } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationsImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationsImpl.java index e4c1719f7bf0f..74d84df7f2680 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationsImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationsImpl.java @@ -4,12 +4,13 @@ package com.azure.resourcemanager.mediaservices.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.mediaservices.fluent.OperationsClient; -import com.azure.resourcemanager.mediaservices.fluent.models.OperationInner; -import com.azure.resourcemanager.mediaservices.models.Operation; +import com.azure.resourcemanager.mediaservices.fluent.models.OperationCollectionInner; +import com.azure.resourcemanager.mediaservices.models.OperationCollection; import com.azure.resourcemanager.mediaservices.models.Operations; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -26,14 +27,26 @@ public OperationsImpl( this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + public OperationCollection list() { + OperationCollectionInner inner = this.serviceClient().list(); + if (inner != null) { + return new OperationCollectionImpl(inner, this.manager()); + } else { + return null; + } } - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + 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() { diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateEndpointConnectionsClientImpl.java index 521570eea1b52..dfa817581b9b1 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateEndpointConnectionsClientImpl.java @@ -112,7 +112,7 @@ Mono> createOrUpdate( @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices" + "/{accountName}/privateEndpointConnections/{name}") - @ExpectedResponses({200}) + @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @HostParam("$host") String endpoint, @@ -157,7 +157,6 @@ private Mono> listWithRespons if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -168,7 +167,7 @@ private Mono> listWithRespons this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -207,7 +206,6 @@ private Mono> listWithRespons if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -216,7 +214,7 @@ private Mono> listWithRespons this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -312,7 +310,6 @@ private Mono> getWithResponseAsync( if (name == null) { return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -324,7 +321,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, name, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -367,7 +364,6 @@ private Mono> getWithResponseAsync( if (name == null) { return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -377,7 +373,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, name, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -482,7 +478,6 @@ private Mono> createOrUpdateWithRespons } else { parameters.validate(); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -494,7 +489,7 @@ private Mono> createOrUpdateWithRespons resourceGroupName, accountName, name, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -548,7 +543,6 @@ private Mono> createOrUpdateWithRespons } else { parameters.validate(); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -558,7 +552,7 @@ private Mono> createOrUpdateWithRespons resourceGroupName, accountName, name, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -666,7 +660,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (name == null) { return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -678,7 +671,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S resourceGroupName, accountName, name, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -721,7 +714,6 @@ private Mono> deleteWithResponseAsync( if (name == null) { return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -731,7 +723,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, name, - apiVersion, + this.client.getApiVersion(), accept, context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateLinkResourcesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateLinkResourcesClientImpl.java index eed462388c86a..c92e334c5afaa 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateLinkResourcesClientImpl.java @@ -120,7 +120,6 @@ private Mono> listWithResponseAsync if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -131,7 +130,7 @@ private Mono> listWithResponseAsync this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -170,7 +169,6 @@ private Mono> listWithResponseAsync if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -179,7 +177,7 @@ private Mono> listWithResponseAsync this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -275,7 +273,6 @@ private Mono> getWithResponseAsync( if (name == null) { return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -287,7 +284,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, name, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -330,7 +327,6 @@ private Mono> getWithResponseAsync( if (name == null) { return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); } - final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -340,7 +336,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, name, - apiVersion, + this.client.getApiVersion(), accept, context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointsClientImpl.java index 7d3ca3b077371..9ac0ad4ae1ecb 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointsClientImpl.java @@ -244,7 +244,6 @@ private Mono> listSinglePageAsync( if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -255,7 +254,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context)) .>map( @@ -303,7 +302,6 @@ private Mono> listSinglePageAsync( if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -312,7 +310,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context) .map( @@ -428,7 +426,6 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -440,7 +437,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -484,7 +481,6 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -494,7 +490,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -606,7 +602,6 @@ private Mono>> createWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -618,7 +613,7 @@ private Mono>> createWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), autoStart, parameters, accept, @@ -676,7 +671,6 @@ private Mono>> createWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -686,7 +680,7 @@ private Mono>> createWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), autoStart, parameters, accept, @@ -995,7 +989,6 @@ private Mono>> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1007,7 +1000,7 @@ private Mono>> updateWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -1062,7 +1055,6 @@ private Mono>> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1072,7 +1064,7 @@ private Mono>> updateWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -1303,7 +1295,6 @@ private Mono>> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1315,7 +1306,7 @@ private Mono>> deleteWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1359,7 +1350,6 @@ private Mono>> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1369,7 +1359,7 @@ private Mono>> deleteWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -1559,7 +1549,6 @@ private Mono>> startWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1571,7 +1560,7 @@ private Mono>> startWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1615,7 +1604,6 @@ private Mono>> startWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1625,7 +1613,7 @@ private Mono>> startWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -1815,7 +1803,6 @@ private Mono>> stopWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1827,7 +1814,7 @@ private Mono>> stopWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1871,7 +1858,6 @@ private Mono>> stopWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1881,7 +1867,7 @@ private Mono>> stopWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -2080,7 +2066,6 @@ private Mono>> scaleWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2092,7 +2077,7 @@ private Mono>> scaleWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -2147,7 +2132,6 @@ private Mono>> scaleWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2157,7 +2141,7 @@ private Mono>> scaleWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorsClientImpl.java index 2d63c12be19fa..6dd8c6b5ae752 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorsClientImpl.java @@ -211,7 +211,6 @@ private Mono> listSinglePageAsync( if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -222,7 +221,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), filter, top, orderby, @@ -277,7 +276,6 @@ private Mono> listSinglePageAsync( if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -286,7 +284,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), filter, top, orderby, @@ -444,7 +442,6 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingLocatorName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -456,7 +453,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -500,7 +497,6 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingLocatorName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -510,7 +506,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -617,7 +613,6 @@ private Mono> createWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -629,7 +624,7 @@ private Mono> createWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -684,7 +679,6 @@ private Mono> createWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -694,7 +688,7 @@ private Mono> createWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -805,7 +799,6 @@ private Mono> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingLocatorName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -817,7 +810,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -861,7 +854,6 @@ private Mono> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingLocatorName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -871,7 +863,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -963,7 +955,6 @@ private Mono> listContentKeysWithResponse return Mono .error(new IllegalArgumentException("Parameter streamingLocatorName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -975,7 +966,7 @@ private Mono> listContentKeysWithResponse resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1019,7 +1010,6 @@ private Mono> listContentKeysWithResponse return Mono .error(new IllegalArgumentException("Parameter streamingLocatorName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1029,7 +1019,7 @@ private Mono> listContentKeysWithResponse resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -1131,7 +1121,6 @@ private Mono> listPathsWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingLocatorName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1143,7 +1132,7 @@ private Mono> listPathsWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1187,7 +1176,6 @@ private Mono> listPathsWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingLocatorName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1197,7 +1185,7 @@ private Mono> listPathsWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), accept, context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingPoliciesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingPoliciesClientImpl.java index a9faa8afdd6bb..9659b88cf3a9d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingPoliciesClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingPoliciesClientImpl.java @@ -176,7 +176,6 @@ private Mono> listSinglePageAsync( if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -187,7 +186,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), filter, top, orderby, @@ -242,7 +241,6 @@ private Mono> listSinglePageAsync( if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -251,7 +249,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), filter, top, orderby, @@ -409,7 +407,6 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingPolicyName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -421,7 +418,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -465,7 +462,6 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingPolicyName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -475,7 +471,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -582,7 +578,6 @@ private Mono> createWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -594,7 +589,7 @@ private Mono> createWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -649,7 +644,6 @@ private Mono> createWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -659,7 +653,7 @@ private Mono> createWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -770,7 +764,6 @@ private Mono> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingPolicyName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -782,7 +775,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -826,7 +819,6 @@ private Mono> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingPolicyName is required and cannot be null.")); } - final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -836,7 +828,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - apiVersion, + this.client.getApiVersion(), accept, context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformImpl.java deleted file mode 100644 index 74d4cd5866a5e..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformImpl.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.mediaservices.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.mediaservices.fluent.models.TransformInner; -import com.azure.resourcemanager.mediaservices.models.Transform; -import com.azure.resourcemanager.mediaservices.models.TransformOutput; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class TransformImpl implements Transform, Transform.Definition, Transform.Update { - private TransformInner innerObject; - - private final com.azure.resourcemanager.mediaservices.MediaServicesManager 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 OffsetDateTime created() { - return this.innerModel().created(); - } - - public String description() { - return this.innerModel().description(); - } - - public OffsetDateTime lastModified() { - return this.innerModel().lastModified(); - } - - public List outputs() { - List inner = this.innerModel().outputs(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public TransformInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String transformName; - - public TransformImpl withExistingMediaService(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public Transform create() { - this.innerObject = - serviceManager - .serviceClient() - .getTransforms() - .createOrUpdateWithResponse( - resourceGroupName, accountName, transformName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Transform create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getTransforms() - .createOrUpdateWithResponse(resourceGroupName, accountName, transformName, this.innerModel(), context) - .getValue(); - return this; - } - - TransformImpl(String name, com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) { - this.innerObject = new TransformInner(); - this.serviceManager = serviceManager; - this.transformName = name; - } - - public TransformImpl update() { - return this; - } - - public Transform apply() { - this.innerObject = - serviceManager - .serviceClient() - .getTransforms() - .updateWithResponse(resourceGroupName, accountName, transformName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public Transform apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getTransforms() - .updateWithResponse(resourceGroupName, accountName, transformName, this.innerModel(), context) - .getValue(); - return this; - } - - TransformImpl( - TransformInner innerObject, com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "mediaServices"); - this.transformName = Utils.getValueFromIdByName(innerObject.id(), "transforms"); - } - - public Transform refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getTransforms() - .getWithResponse(resourceGroupName, accountName, transformName, Context.NONE) - .getValue(); - return this; - } - - public Transform refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getTransforms() - .getWithResponse(resourceGroupName, accountName, transformName, context) - .getValue(); - return this; - } - - public TransformImpl withDescription(String description) { - this.innerModel().withDescription(description); - return this; - } - - public TransformImpl withOutputs(List outputs) { - this.innerModel().withOutputs(outputs); - return this; - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsClientImpl.java deleted file mode 100644 index e06a648fe2fce..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsClientImpl.java +++ /dev/null @@ -1,1161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices.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.core.util.logging.ClientLogger; -import com.azure.resourcemanager.mediaservices.fluent.TransformsClient; -import com.azure.resourcemanager.mediaservices.fluent.models.TransformInner; -import com.azure.resourcemanager.mediaservices.models.TransformCollection; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in TransformsClient. */ -public final class TransformsClientImpl implements TransformsClient { - private final ClientLogger logger = new ClientLogger(TransformsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final TransformsService service; - - /** The service client containing this operation class. */ - private final AzureMediaServicesImpl client; - - /** - * Initializes an instance of TransformsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - TransformsClientImpl(AzureMediaServicesImpl client) { - this.service = - RestProxy.create(TransformsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMediaServicesTransforms to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMediaServicesTr") - private interface TransformsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" - + "/{accountName}/transforms") - @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("$orderby") String orderby, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" - + "/{accountName}/transforms/{transformName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("transformName") String transformName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" - + "/{accountName}/transforms/{transformName}") - @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("transformName") String transformName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") TransformInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" - + "/{accountName}/transforms/{transformName}") - @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("transformName") String transformName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices" - + "/{accountName}/transforms/{transformName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @PathParam("transformName") String transformName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") TransformInner 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); - } - - /** - * Lists the Transforms in the account. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param filter Restricts the set of items returned. - * @param orderby Specifies the key by which the result collection should be ordered. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Transform items. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String accountName, String filter, String 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String apiVersion = "2020-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - apiVersion, - filter, - orderby, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().odataNextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists the Transforms in the account. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param filter Restricts the set of items returned. - * @param orderby Specifies the key by which the result collection should be ordered. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Transform items. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String accountName, String filter, String 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String apiVersion = "2020-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - apiVersion, - filter, - orderby, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().odataNextLink(), - null)); - } - - /** - * Lists the Transforms in the account. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param filter Restricts the set of items returned. - * @param orderby Specifies the key by which the result collection should be ordered. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Transform items. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String accountName, String filter, String orderby) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, accountName, filter, orderby), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists the Transforms in the account. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services 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 Transform items. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName) { - final String filter = null; - final String orderby = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, accountName, filter, orderby), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists the Transforms in the account. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param filter Restricts the set of items returned. - * @param orderby Specifies the key by which the result collection should be ordered. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Transform items. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String accountName, String filter, String orderby, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, accountName, filter, orderby, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the Transforms in the account. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services 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 Transform items. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName) { - final String filter = null; - final String orderby = null; - return new PagedIterable<>(listAsync(resourceGroupName, accountName, filter, orderby)); - } - - /** - * Lists the Transforms in the account. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param filter Restricts the set of items returned. - * @param orderby Specifies the key by which the result collection should be ordered. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 Transform items. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String accountName, String filter, String orderby, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, filter, orderby, context)); - } - - /** - * Gets a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 Transform. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, String transformName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null.")); - } - final String apiVersion = "2020-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - apiVersion, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 Transform. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String accountName, String transformName, 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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null.")); - } - final String apiVersion = "2020-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - apiVersion, - accept, - context); - } - - /** - * Gets a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 Transform. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String transformName) { - return getWithResponseAsync(resourceGroupName, accountName, transformName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 Transform. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TransformInner get(String resourceGroupName, String accountName, String transformName) { - return getAsync(resourceGroupName, accountName, transformName).block(); - } - - /** - * Gets a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 Transform. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String accountName, String transformName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, transformName, context).block(); - } - - /** - * Creates or updates a new Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String accountName, String transformName, TransformInner 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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName 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 apiVersion = "2020-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - apiVersion, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a new Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String accountName, - String transformName, - TransformInner 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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName 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 apiVersion = "2020-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - apiVersion, - parameters, - accept, - context); - } - - /** - * Creates or updates a new Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String accountName, String transformName, TransformInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, transformName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates or updates a new Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TransformInner createOrUpdate( - String resourceGroupName, String accountName, String transformName, TransformInner parameters) { - return createOrUpdateAsync(resourceGroupName, accountName, transformName, parameters).block(); - } - - /** - * Creates or updates a new Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String accountName, - String transformName, - TransformInner parameters, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, transformName, parameters, context) - .block(); - } - - /** - * Deletes a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String accountName, String transformName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null.")); - } - final String apiVersion = "2020-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - apiVersion, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String accountName, String transformName, 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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null.")); - } - final String apiVersion = "2020-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - apiVersion, - accept, - context); - } - - /** - * Deletes a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String transformName) { - return deleteWithResponseAsync(resourceGroupName, accountName, transformName) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Deletes a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 transformName) { - deleteAsync(resourceGroupName, accountName, transformName).block(); - } - - /** - * Deletes a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String accountName, String transformName, Context context) { - return deleteWithResponseAsync(resourceGroupName, accountName, transformName, context).block(); - } - - /** - * Updates a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String accountName, String transformName, TransformInner 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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName 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 apiVersion = "2020-05-01"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - apiVersion, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String accountName, - String transformName, - TransformInner 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 (transformName == null) { - return Mono.error(new IllegalArgumentException("Parameter transformName 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 apiVersion = "2020-05-01"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - transformName, - apiVersion, - parameters, - accept, - context); - } - - /** - * Updates a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String accountName, String transformName, TransformInner parameters) { - return updateWithResponseAsync(resourceGroupName, accountName, transformName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TransformInner update( - String resourceGroupName, String accountName, String transformName, TransformInner parameters) { - return updateAsync(resourceGroupName, accountName, transformName, parameters).block(); - } - - /** - * Updates a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such - * as by transcoding or by extracting insights. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String accountName, - String transformName, - TransformInner parameters, - Context context) { - return updateWithResponseAsync(resourceGroupName, accountName, transformName, 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 Transform items. - */ - @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().odataNextLink(), - 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 Transform items. - */ - @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().odataNextLink(), - null)); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsImpl.java deleted file mode 100644 index 1f35bcf6877a3..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsImpl.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.mediaservices.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.mediaservices.fluent.TransformsClient; -import com.azure.resourcemanager.mediaservices.fluent.models.TransformInner; -import com.azure.resourcemanager.mediaservices.models.Transform; -import com.azure.resourcemanager.mediaservices.models.Transforms; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class TransformsImpl implements Transforms { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransformsImpl.class); - - private final TransformsClient innerClient; - - private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager; - - public TransformsImpl( - TransformsClient innerClient, com.azure.resourcemanager.mediaservices.MediaServicesManager 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 TransformImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String accountName, String filter, String orderby, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, accountName, filter, orderby, context); - return Utils.mapPage(inner, inner1 -> new TransformImpl(inner1, this.manager())); - } - - public Transform get(String resourceGroupName, String accountName, String transformName) { - TransformInner inner = this.serviceClient().get(resourceGroupName, accountName, transformName); - if (inner != null) { - return new TransformImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String accountName, String transformName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, accountName, transformName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new TransformImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String transformName) { - this.serviceClient().delete(resourceGroupName, accountName, transformName); - } - - public Response deleteWithResponse( - String resourceGroupName, String accountName, String transformName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, transformName, context); - } - - public Transform 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, "mediaServices"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id))); - } - String transformName = Utils.getValueFromIdByName(id, "transforms"); - if (transformName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'transforms'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, transformName, 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, "mediaServices"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id))); - } - String transformName = Utils.getValueFromIdByName(id, "transforms"); - if (transformName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'transforms'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, transformName, 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, "mediaServices"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id))); - } - String transformName = Utils.getValueFromIdByName(id, "transforms"); - if (transformName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'transforms'.", id))); - } - this.deleteWithResponse(resourceGroupName, accountName, transformName, 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 accountName = Utils.getValueFromIdByName(id, "mediaServices"); - if (accountName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id))); - } - String transformName = Utils.getValueFromIdByName(id, "transforms"); - if (transformName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'transforms'.", id))); - } - return this.deleteWithResponse(resourceGroupName, accountName, transformName, context); - } - - private TransformsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() { - return this.serviceManager; - } - - public TransformImpl define(String name) { - return new TransformImpl(name, this.manager()); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AacAudio.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AacAudio.java deleted file mode 100644 index 3d1849b019f34..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AacAudio.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes Advanced Audio Codec (AAC) audio encoding settings. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.AacAudio") -@JsonFlatten -@Fluent -public class AacAudio extends Audio { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AacAudio.class); - - /* - * The encoding profile to be used when encoding audio with AAC. - */ - @JsonProperty(value = "profile") - private AacAudioProfile profile; - - /** - * Get the profile property: The encoding profile to be used when encoding audio with AAC. - * - * @return the profile value. - */ - public AacAudioProfile profile() { - return this.profile; - } - - /** - * Set the profile property: The encoding profile to be used when encoding audio with AAC. - * - * @param profile the profile value to set. - * @return the AacAudio object itself. - */ - public AacAudio withProfile(AacAudioProfile profile) { - this.profile = profile; - return this; - } - - /** {@inheritDoc} */ - @Override - public AacAudio withChannels(Integer channels) { - super.withChannels(channels); - return this; - } - - /** {@inheritDoc} */ - @Override - public AacAudio withSamplingRate(Integer samplingRate) { - super.withSamplingRate(samplingRate); - return this; - } - - /** {@inheritDoc} */ - @Override - public AacAudio withBitrate(Integer bitrate) { - super.withBitrate(bitrate); - return this; - } - - /** {@inheritDoc} */ - @Override - public AacAudio withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AacAudioProfile.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AacAudioProfile.java deleted file mode 100644 index 25a1b3c2d7f8c..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AacAudioProfile.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AacAudioProfile. */ -public final class AacAudioProfile extends ExpandableStringEnum { - /** Static value AacLc for AacAudioProfile. */ - public static final AacAudioProfile AAC_LC = fromString("AacLc"); - - /** Static value HeAacV1 for AacAudioProfile. */ - public static final AacAudioProfile HE_AAC_V1 = fromString("HeAacV1"); - - /** Static value HeAacV2 for AacAudioProfile. */ - public static final AacAudioProfile HE_AAC_V2 = fromString("HeAacV2"); - - /** - * Creates or finds a AacAudioProfile from its string representation. - * - * @param name a name to look for. - * @return the corresponding AacAudioProfile. - */ - @JsonCreator - public static AacAudioProfile fromString(String name) { - return fromString(name, AacAudioProfile.class); - } - - /** @return known AacAudioProfile values. */ - public static Collection values() { - return values(AacAudioProfile.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AbsoluteClipTime.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AbsoluteClipTime.java deleted file mode 100644 index 7ef886029bf95..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AbsoluteClipTime.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; - -/** - * Specifies the clip time as an absolute time position in the media file. The absolute time can point to a different - * position depending on whether the media file starts from a timestamp of zero or not. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.AbsoluteClipTime") -@JsonFlatten -@Fluent -public class AbsoluteClipTime extends ClipTime { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AbsoluteClipTime.class); - - /* - * The time position on the timeline of the input media. It is usually - * specified as an ISO8601 period. e.g PT30S for 30 seconds. - */ - @JsonProperty(value = "time", required = true) - private Duration time; - - /** - * Get the time property: The time position on the timeline of the input media. It is usually specified as an - * ISO8601 period. e.g PT30S for 30 seconds. - * - * @return the time value. - */ - public Duration time() { - return this.time; - } - - /** - * Set the time property: The time position on the timeline of the input media. It is usually specified as an - * ISO8601 period. e.g PT30S for 30 seconds. - * - * @param time the time value to set. - * @return the AbsoluteClipTime object itself. - */ - public AbsoluteClipTime withTime(Duration time) { - this.time = time; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (time() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property time in model AbsoluteClipTime")); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AccountEncryption.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AccountEncryption.java index 55456658f5c17..3404be745abfc 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AccountEncryption.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AccountEncryption.java @@ -26,6 +26,18 @@ public final class AccountEncryption { @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. * @@ -66,6 +78,35 @@ public AccountEncryption withKeyVaultProperties(KeyVaultProperties keyVaultPrope 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. * @@ -80,5 +121,8 @@ public void validate() { if (keyVaultProperties() != null) { keyVaultProperties().validate(); } + if (identity() != null) { + identity().validate(); + } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AnalysisResolution.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AnalysisResolution.java deleted file mode 100644 index 68631ad108112..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AnalysisResolution.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AnalysisResolution. */ -public final class AnalysisResolution extends ExpandableStringEnum { - /** Static value SourceResolution for AnalysisResolution. */ - public static final AnalysisResolution SOURCE_RESOLUTION = fromString("SourceResolution"); - - /** Static value StandardDefinition for AnalysisResolution. */ - public static final AnalysisResolution STANDARD_DEFINITION = fromString("StandardDefinition"); - - /** - * Creates or finds a AnalysisResolution from its string representation. - * - * @param name a name to look for. - * @return the corresponding AnalysisResolution. - */ - @JsonCreator - public static AnalysisResolution fromString(String name) { - return fromString(name, AnalysisResolution.class); - } - - /** @return known AnalysisResolution values. */ - public static Collection values() { - return values(AnalysisResolution.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AttributeFilter.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AttributeFilter.java deleted file mode 100644 index 22efd8c3113b2..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AttributeFilter.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AttributeFilter. */ -public final class AttributeFilter extends ExpandableStringEnum { - /** Static value All for AttributeFilter. */ - public static final AttributeFilter ALL = fromString("All"); - - /** Static value Top for AttributeFilter. */ - public static final AttributeFilter TOP = fromString("Top"); - - /** Static value Bottom for AttributeFilter. */ - public static final AttributeFilter BOTTOM = fromString("Bottom"); - - /** Static value ValueEquals for AttributeFilter. */ - public static final AttributeFilter VALUE_EQUALS = fromString("ValueEquals"); - - /** - * Creates or finds a AttributeFilter from its string representation. - * - * @param name a name to look for. - * @return the corresponding AttributeFilter. - */ - @JsonCreator - public static AttributeFilter fromString(String name) { - return fromString(name, AttributeFilter.class); - } - - /** @return known AttributeFilter values. */ - public static Collection values() { - return values(AttributeFilter.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Audio.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Audio.java deleted file mode 100644 index e7bbd4fbaa274..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Audio.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Defines the common properties for all audio codecs. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = Audio.class) -@JsonTypeName("#Microsoft.Media.Audio") -@JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.Media.AacAudio", value = AacAudio.class)}) -@JsonFlatten -@Fluent -public class Audio extends Codec { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Audio.class); - - /* - * The number of channels in the audio. - */ - @JsonProperty(value = "channels") - private Integer channels; - - /* - * The sampling rate to use for encoding in hertz. - */ - @JsonProperty(value = "samplingRate") - private Integer samplingRate; - - /* - * The bitrate, in bits per second, of the output encoded audio. - */ - @JsonProperty(value = "bitrate") - private Integer bitrate; - - /** - * Get the channels property: The number of channels in the audio. - * - * @return the channels value. - */ - public Integer channels() { - return this.channels; - } - - /** - * Set the channels property: The number of channels in the audio. - * - * @param channels the channels value to set. - * @return the Audio object itself. - */ - public Audio withChannels(Integer channels) { - this.channels = channels; - return this; - } - - /** - * Get the samplingRate property: The sampling rate to use for encoding in hertz. - * - * @return the samplingRate value. - */ - public Integer samplingRate() { - return this.samplingRate; - } - - /** - * Set the samplingRate property: The sampling rate to use for encoding in hertz. - * - * @param samplingRate the samplingRate value to set. - * @return the Audio object itself. - */ - public Audio withSamplingRate(Integer samplingRate) { - this.samplingRate = samplingRate; - return this; - } - - /** - * Get the bitrate property: The bitrate, in bits per second, of the output encoded audio. - * - * @return the bitrate value. - */ - public Integer bitrate() { - return this.bitrate; - } - - /** - * Set the bitrate property: The bitrate, in bits per second, of the output encoded audio. - * - * @param bitrate the bitrate value to set. - * @return the Audio object itself. - */ - public Audio withBitrate(Integer bitrate) { - this.bitrate = bitrate; - return this; - } - - /** {@inheritDoc} */ - @Override - public Audio withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioAnalysisMode.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioAnalysisMode.java deleted file mode 100644 index 49f85e4a59137..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioAnalysisMode.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AudioAnalysisMode. */ -public final class AudioAnalysisMode extends ExpandableStringEnum { - /** Static value Standard for AudioAnalysisMode. */ - public static final AudioAnalysisMode STANDARD = fromString("Standard"); - - /** Static value Basic for AudioAnalysisMode. */ - public static final AudioAnalysisMode BASIC = fromString("Basic"); - - /** - * Creates or finds a AudioAnalysisMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding AudioAnalysisMode. - */ - @JsonCreator - public static AudioAnalysisMode fromString(String name) { - return fromString(name, AudioAnalysisMode.class); - } - - /** @return known AudioAnalysisMode values. */ - public static Collection values() { - return values(AudioAnalysisMode.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioAnalyzerPreset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioAnalyzerPreset.java deleted file mode 100644 index 74082352cb394..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioAnalyzerPreset.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** - * The Audio Analyzer preset applies a pre-defined set of AI-based analysis operations, including speech transcription. - * Currently, the preset supports processing of content with a single audio track. - */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = AudioAnalyzerPreset.class) -@JsonTypeName("#Microsoft.Media.AudioAnalyzerPreset") -@JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.Media.VideoAnalyzerPreset", value = VideoAnalyzerPreset.class)}) -@JsonFlatten -@Fluent -public class AudioAnalyzerPreset extends Preset { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AudioAnalyzerPreset.class); - - /* - * The language for the audio payload in the input using the BCP-47 format - * of 'language tag-region' (e.g: 'en-US'). If you know the language of - * your content, it is recommended that you specify it. The language must - * be specified explicitly for AudioAnalysisMode::Basic, since automatic - * language detection is not included in basic mode. If the language isn't - * specified or set to null, automatic language detection will choose the - * first language detected and process with the selected language for the - * duration of the file. It does not currently support dynamically - * switching between languages after the first language is detected. The - * automatic detection works best with audio recordings with clearly - * discernable speech. If automatic detection fails to find the language, - * transcription would fallback to 'en-US'." The list of supported - * languages is available here: - * https://go.microsoft.com/fwlink/?linkid=2109463 - */ - @JsonProperty(value = "audioLanguage") - private String audioLanguage; - - /* - * Determines the set of audio analysis operations to be performed. If - * unspecified, the Standard AudioAnalysisMode would be chosen. - */ - @JsonProperty(value = "mode") - private AudioAnalysisMode mode; - - /* - * Dictionary containing key value pairs for parameters not exposed in the - * preset itself - */ - @JsonProperty(value = "experimentalOptions") - private Map experimentalOptions; - - /** - * Get the audioLanguage property: The language for the audio payload in the input using the BCP-47 format of - * 'language tag-region' (e.g: 'en-US'). If you know the language of your content, it is recommended that you - * specify it. The language must be specified explicitly for AudioAnalysisMode::Basic, since automatic language - * detection is not included in basic mode. If the language isn't specified or set to null, automatic language - * detection will choose the first language detected and process with the selected language for the duration of the - * file. It does not currently support dynamically switching between languages after the first language is detected. - * The automatic detection works best with audio recordings with clearly discernable speech. If automatic detection - * fails to find the language, transcription would fallback to 'en-US'." The list of supported languages is - * available here: https://go.microsoft.com/fwlink/?linkid=2109463. - * - * @return the audioLanguage value. - */ - public String audioLanguage() { - return this.audioLanguage; - } - - /** - * Set the audioLanguage property: The language for the audio payload in the input using the BCP-47 format of - * 'language tag-region' (e.g: 'en-US'). If you know the language of your content, it is recommended that you - * specify it. The language must be specified explicitly for AudioAnalysisMode::Basic, since automatic language - * detection is not included in basic mode. If the language isn't specified or set to null, automatic language - * detection will choose the first language detected and process with the selected language for the duration of the - * file. It does not currently support dynamically switching between languages after the first language is detected. - * The automatic detection works best with audio recordings with clearly discernable speech. If automatic detection - * fails to find the language, transcription would fallback to 'en-US'." The list of supported languages is - * available here: https://go.microsoft.com/fwlink/?linkid=2109463. - * - * @param audioLanguage the audioLanguage value to set. - * @return the AudioAnalyzerPreset object itself. - */ - public AudioAnalyzerPreset withAudioLanguage(String audioLanguage) { - this.audioLanguage = audioLanguage; - return this; - } - - /** - * Get the mode property: Determines the set of audio analysis operations to be performed. If unspecified, the - * Standard AudioAnalysisMode would be chosen. - * - * @return the mode value. - */ - public AudioAnalysisMode mode() { - return this.mode; - } - - /** - * Set the mode property: Determines the set of audio analysis operations to be performed. If unspecified, the - * Standard AudioAnalysisMode would be chosen. - * - * @param mode the mode value to set. - * @return the AudioAnalyzerPreset object itself. - */ - public AudioAnalyzerPreset withMode(AudioAnalysisMode mode) { - this.mode = mode; - return this; - } - - /** - * Get the experimentalOptions property: Dictionary containing key value pairs for parameters not exposed in the - * preset itself. - * - * @return the experimentalOptions value. - */ - public Map experimentalOptions() { - return this.experimentalOptions; - } - - /** - * Set the experimentalOptions property: Dictionary containing key value pairs for parameters not exposed in the - * preset itself. - * - * @param experimentalOptions the experimentalOptions value to set. - * @return the AudioAnalyzerPreset object itself. - */ - public AudioAnalyzerPreset withExperimentalOptions(Map experimentalOptions) { - this.experimentalOptions = experimentalOptions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioOverlay.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioOverlay.java deleted file mode 100644 index 0fc5c84453f82..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioOverlay.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.mediaservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -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; -import java.time.Duration; - -/** Describes the properties of an audio overlay. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.AudioOverlay") -@JsonFlatten -@Immutable -public class AudioOverlay extends Overlay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AudioOverlay.class); - - /** {@inheritDoc} */ - @Override - public AudioOverlay withInputLabel(String inputLabel) { - super.withInputLabel(inputLabel); - return this; - } - - /** {@inheritDoc} */ - @Override - public AudioOverlay withStart(Duration start) { - super.withStart(start); - return this; - } - - /** {@inheritDoc} */ - @Override - public AudioOverlay withEnd(Duration end) { - super.withEnd(end); - return this; - } - - /** {@inheritDoc} */ - @Override - public AudioOverlay withFadeInDuration(Duration fadeInDuration) { - super.withFadeInDuration(fadeInDuration); - return this; - } - - /** {@inheritDoc} */ - @Override - public AudioOverlay withFadeOutDuration(Duration fadeOutDuration) { - super.withFadeOutDuration(fadeOutDuration); - return this; - } - - /** {@inheritDoc} */ - @Override - public AudioOverlay withAudioGainLevel(Double audioGainLevel) { - super.withAudioGainLevel(audioGainLevel); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioTrackDescriptor.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioTrackDescriptor.java deleted file mode 100644 index e6b5c5dcaecbb..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AudioTrackDescriptor.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A TrackSelection to select audio tracks. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = AudioTrackDescriptor.class) -@JsonTypeName("#Microsoft.Media.AudioTrackDescriptor") -@JsonSubTypes({ - @JsonSubTypes.Type( - name = "#Microsoft.Media.SelectAudioTrackByAttribute", - value = SelectAudioTrackByAttribute.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.SelectAudioTrackById", value = SelectAudioTrackById.class) -}) -@JsonFlatten -@Fluent -public class AudioTrackDescriptor extends TrackDescriptor { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AudioTrackDescriptor.class); - - /* - * Optional designation for single channel audio tracks. Can be used to - * combine the tracks into stereo or multi-channel audio tracks. - */ - @JsonProperty(value = "channelMapping") - private ChannelMapping channelMapping; - - /** - * Get the channelMapping property: Optional designation for single channel audio tracks. Can be used to combine the - * tracks into stereo or multi-channel audio tracks. - * - * @return the channelMapping value. - */ - public ChannelMapping channelMapping() { - return this.channelMapping; - } - - /** - * Set the channelMapping property: Optional designation for single channel audio tracks. Can be used to combine the - * tracks into stereo or multi-channel audio tracks. - * - * @param channelMapping the channelMapping value to set. - * @return the AudioTrackDescriptor object itself. - */ - public AudioTrackDescriptor withChannelMapping(ChannelMapping channelMapping) { - this.channelMapping = channelMapping; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/BlurType.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/BlurType.java deleted file mode 100644 index 378737354dec6..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/BlurType.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for BlurType. */ -public final class BlurType extends ExpandableStringEnum { - /** Static value Box for BlurType. */ - public static final BlurType BOX = fromString("Box"); - - /** Static value Low for BlurType. */ - public static final BlurType LOW = fromString("Low"); - - /** Static value Med for BlurType. */ - public static final BlurType MED = fromString("Med"); - - /** Static value High for BlurType. */ - public static final BlurType HIGH = fromString("High"); - - /** Static value Black for BlurType. */ - public static final BlurType BLACK = fromString("Black"); - - /** - * Creates or finds a BlurType from its string representation. - * - * @param name a name to look for. - * @return the corresponding BlurType. - */ - @JsonCreator - public static BlurType fromString(String name) { - return fromString(name, BlurType.class); - } - - /** @return known BlurType values. */ - public static Collection values() { - return values(BlurType.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/BuiltInStandardEncoderPreset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/BuiltInStandardEncoderPreset.java deleted file mode 100644 index c6200610e55b0..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/BuiltInStandardEncoderPreset.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.resourcemanager.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes a built-in preset for encoding the input video with the Standard Encoder. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.BuiltInStandardEncoderPreset") -@JsonFlatten -@Fluent -public class BuiltInStandardEncoderPreset extends Preset { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BuiltInStandardEncoderPreset.class); - - /* - * The built-in preset to be used for encoding videos. - */ - @JsonProperty(value = "presetName", required = true) - private EncoderNamedPreset presetName; - - /** - * Get the presetName property: The built-in preset to be used for encoding videos. - * - * @return the presetName value. - */ - public EncoderNamedPreset presetName() { - return this.presetName; - } - - /** - * Set the presetName property: The built-in preset to be used for encoding videos. - * - * @param presetName the presetName value to set. - * @return the BuiltInStandardEncoderPreset object itself. - */ - public BuiltInStandardEncoderPreset withPresetName(EncoderNamedPreset presetName) { - this.presetName = presetName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (presetName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property presetName in model BuiltInStandardEncoderPreset")); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ChannelMapping.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ChannelMapping.java deleted file mode 100644 index be3090d000b54..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ChannelMapping.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ChannelMapping. */ -public final class ChannelMapping extends ExpandableStringEnum { - /** Static value FrontLeft for ChannelMapping. */ - public static final ChannelMapping FRONT_LEFT = fromString("FrontLeft"); - - /** Static value FrontRight for ChannelMapping. */ - public static final ChannelMapping FRONT_RIGHT = fromString("FrontRight"); - - /** Static value Center for ChannelMapping. */ - public static final ChannelMapping CENTER = fromString("Center"); - - /** Static value LowFrequencyEffects for ChannelMapping. */ - public static final ChannelMapping LOW_FREQUENCY_EFFECTS = fromString("LowFrequencyEffects"); - - /** Static value BackLeft for ChannelMapping. */ - public static final ChannelMapping BACK_LEFT = fromString("BackLeft"); - - /** Static value BackRight for ChannelMapping. */ - public static final ChannelMapping BACK_RIGHT = fromString("BackRight"); - - /** Static value StereoLeft for ChannelMapping. */ - public static final ChannelMapping STEREO_LEFT = fromString("StereoLeft"); - - /** Static value StereoRight for ChannelMapping. */ - public static final ChannelMapping STEREO_RIGHT = fromString("StereoRight"); - - /** - * Creates or finds a ChannelMapping from its string representation. - * - * @param name a name to look for. - * @return the corresponding ChannelMapping. - */ - @JsonCreator - public static ChannelMapping fromString(String name) { - return fromString(name, ChannelMapping.class); - } - - /** @return known ChannelMapping values. */ - public static Collection values() { - return values(ChannelMapping.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ClipTime.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ClipTime.java deleted file mode 100644 index 6de88134d1f76..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ClipTime.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.mediaservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base class for specifying a clip time. Use sub classes of this class to specify the time position in the media. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = ClipTime.class) -@JsonTypeName("ClipTime") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.Media.AbsoluteClipTime", value = AbsoluteClipTime.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.UtcClipTime", value = UtcClipTime.class) -}) -@JsonFlatten -@Immutable -public class ClipTime { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClipTime.class); - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Codec.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Codec.java deleted file mode 100644 index b7eb3c2e4d2d9..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Codec.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes the basic properties of all codecs. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = Codec.class) -@JsonTypeName("Codec") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.Media.Audio", value = Audio.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.Video", value = Video.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.CopyVideo", value = CopyVideo.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.CopyAudio", value = CopyAudio.class) -}) -@JsonFlatten -@Fluent -public class Codec { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Codec.class); - - /* - * An optional label for the codec. The label can be used to control muxing - * behavior. - */ - @JsonProperty(value = "label") - private String label; - - /** - * Get the label property: An optional label for the codec. The label can be used to control muxing behavior. - * - * @return the label value. - */ - public String label() { - return this.label; - } - - /** - * Set the label property: An optional label for the codec. The label can be used to control muxing behavior. - * - * @param label the label value to set. - * @return the Codec object itself. - */ - public Codec withLabel(String label) { - this.label = label; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/CopyAudio.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/CopyAudio.java deleted file mode 100644 index e44ade33fb05b..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/CopyAudio.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.mediaservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -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 codec flag, which tells the encoder to copy the input audio bitstream. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.CopyAudio") -@JsonFlatten -@Immutable -public class CopyAudio extends Codec { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CopyAudio.class); - - /** {@inheritDoc} */ - @Override - public CopyAudio withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/CopyVideo.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/CopyVideo.java deleted file mode 100644 index dee453d101fc5..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/CopyVideo.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.mediaservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -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 codec flag, which tells the encoder to copy the input video bitstream without re-encoding. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.CopyVideo") -@JsonFlatten -@Immutable -public class CopyVideo extends Codec { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CopyVideo.class); - - /** {@inheritDoc} */ - @Override - public CopyVideo withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Deinterlace.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Deinterlace.java deleted file mode 100644 index 3323f10f77599..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Deinterlace.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.mediaservices.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 de-interlacing settings. */ -@Fluent -public final class Deinterlace { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Deinterlace.class); - - /* - * The field parity for de-interlacing, defaults to Auto. - */ - @JsonProperty(value = "parity") - private DeinterlaceParity parity; - - /* - * The deinterlacing mode. Defaults to AutoPixelAdaptive. - */ - @JsonProperty(value = "mode") - private DeinterlaceMode mode; - - /** - * Get the parity property: The field parity for de-interlacing, defaults to Auto. - * - * @return the parity value. - */ - public DeinterlaceParity parity() { - return this.parity; - } - - /** - * Set the parity property: The field parity for de-interlacing, defaults to Auto. - * - * @param parity the parity value to set. - * @return the Deinterlace object itself. - */ - public Deinterlace withParity(DeinterlaceParity parity) { - this.parity = parity; - return this; - } - - /** - * Get the mode property: The deinterlacing mode. Defaults to AutoPixelAdaptive. - * - * @return the mode value. - */ - public DeinterlaceMode mode() { - return this.mode; - } - - /** - * Set the mode property: The deinterlacing mode. Defaults to AutoPixelAdaptive. - * - * @param mode the mode value to set. - * @return the Deinterlace object itself. - */ - public Deinterlace withMode(DeinterlaceMode 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/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/DeinterlaceMode.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/DeinterlaceMode.java deleted file mode 100644 index c4e03ad88fea0..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/DeinterlaceMode.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DeinterlaceMode. */ -public final class DeinterlaceMode extends ExpandableStringEnum { - /** Static value Off for DeinterlaceMode. */ - public static final DeinterlaceMode OFF = fromString("Off"); - - /** Static value AutoPixelAdaptive for DeinterlaceMode. */ - public static final DeinterlaceMode AUTO_PIXEL_ADAPTIVE = fromString("AutoPixelAdaptive"); - - /** - * Creates or finds a DeinterlaceMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeinterlaceMode. - */ - @JsonCreator - public static DeinterlaceMode fromString(String name) { - return fromString(name, DeinterlaceMode.class); - } - - /** @return known DeinterlaceMode values. */ - public static Collection values() { - return values(DeinterlaceMode.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/DeinterlaceParity.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/DeinterlaceParity.java deleted file mode 100644 index e656dd50c7302..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/DeinterlaceParity.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DeinterlaceParity. */ -public final class DeinterlaceParity extends ExpandableStringEnum { - /** Static value Auto for DeinterlaceParity. */ - public static final DeinterlaceParity AUTO = fromString("Auto"); - - /** Static value TopFieldFirst for DeinterlaceParity. */ - public static final DeinterlaceParity TOP_FIELD_FIRST = fromString("TopFieldFirst"); - - /** Static value BottomFieldFirst for DeinterlaceParity. */ - public static final DeinterlaceParity BOTTOM_FIELD_FIRST = fromString("BottomFieldFirst"); - - /** - * Creates or finds a DeinterlaceParity from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeinterlaceParity. - */ - @JsonCreator - public static DeinterlaceParity fromString(String name) { - return fromString(name, DeinterlaceParity.class); - } - - /** @return known DeinterlaceParity values. */ - public static Collection values() { - return values(DeinterlaceParity.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/EncoderNamedPreset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/EncoderNamedPreset.java deleted file mode 100644 index b40ed251611d9..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/EncoderNamedPreset.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EncoderNamedPreset. */ -public final class EncoderNamedPreset extends ExpandableStringEnum { - /** Static value H264SingleBitrateSD for EncoderNamedPreset. */ - public static final EncoderNamedPreset H264SINGLE_BITRATE_SD = fromString("H264SingleBitrateSD"); - - /** Static value H264SingleBitrate720p for EncoderNamedPreset. */ - public static final EncoderNamedPreset H264SINGLE_BITRATE720P = fromString("H264SingleBitrate720p"); - - /** Static value H264SingleBitrate1080p for EncoderNamedPreset. */ - public static final EncoderNamedPreset H264SINGLE_BITRATE1080P = fromString("H264SingleBitrate1080p"); - - /** Static value AdaptiveStreaming for EncoderNamedPreset. */ - public static final EncoderNamedPreset ADAPTIVE_STREAMING = fromString("AdaptiveStreaming"); - - /** Static value AACGoodQualityAudio for EncoderNamedPreset. */ - public static final EncoderNamedPreset AACGOOD_QUALITY_AUDIO = fromString("AACGoodQualityAudio"); - - /** Static value ContentAwareEncodingExperimental for EncoderNamedPreset. */ - public static final EncoderNamedPreset CONTENT_AWARE_ENCODING_EXPERIMENTAL = - fromString("ContentAwareEncodingExperimental"); - - /** Static value ContentAwareEncoding for EncoderNamedPreset. */ - public static final EncoderNamedPreset CONTENT_AWARE_ENCODING = fromString("ContentAwareEncoding"); - - /** Static value CopyAllBitrateNonInterleaved for EncoderNamedPreset. */ - public static final EncoderNamedPreset COPY_ALL_BITRATE_NON_INTERLEAVED = - fromString("CopyAllBitrateNonInterleaved"); - - /** Static value H264MultipleBitrate1080p for EncoderNamedPreset. */ - public static final EncoderNamedPreset H264MULTIPLE_BITRATE1080P = fromString("H264MultipleBitrate1080p"); - - /** Static value H264MultipleBitrate720p for EncoderNamedPreset. */ - public static final EncoderNamedPreset H264MULTIPLE_BITRATE720P = fromString("H264MultipleBitrate720p"); - - /** Static value H264MultipleBitrateSD for EncoderNamedPreset. */ - public static final EncoderNamedPreset H264MULTIPLE_BITRATE_SD = fromString("H264MultipleBitrateSD"); - - /** Static value H265ContentAwareEncoding for EncoderNamedPreset. */ - public static final EncoderNamedPreset H265CONTENT_AWARE_ENCODING = fromString("H265ContentAwareEncoding"); - - /** Static value H265AdaptiveStreaming for EncoderNamedPreset. */ - public static final EncoderNamedPreset H265ADAPTIVE_STREAMING = fromString("H265AdaptiveStreaming"); - - /** Static value H265SingleBitrate720p for EncoderNamedPreset. */ - public static final EncoderNamedPreset H265SINGLE_BITRATE720P = fromString("H265SingleBitrate720p"); - - /** Static value H265SingleBitrate1080p for EncoderNamedPreset. */ - public static final EncoderNamedPreset H265SINGLE_BITRATE1080P = fromString("H265SingleBitrate1080p"); - - /** Static value H265SingleBitrate4K for EncoderNamedPreset. */ - public static final EncoderNamedPreset H265SINGLE_BITRATE4K = fromString("H265SingleBitrate4K"); - - /** - * Creates or finds a EncoderNamedPreset from its string representation. - * - * @param name a name to look for. - * @return the corresponding EncoderNamedPreset. - */ - @JsonCreator - public static EncoderNamedPreset fromString(String name) { - return fromString(name, EncoderNamedPreset.class); - } - - /** @return known EncoderNamedPreset values. */ - public static Collection values() { - return values(EncoderNamedPreset.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/EntropyMode.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/EntropyMode.java deleted file mode 100644 index d1cdb255181df..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/EntropyMode.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EntropyMode. */ -public final class EntropyMode extends ExpandableStringEnum { - /** Static value Cabac for EntropyMode. */ - public static final EntropyMode CABAC = fromString("Cabac"); - - /** Static value Cavlc for EntropyMode. */ - public static final EntropyMode CAVLC = fromString("Cavlc"); - - /** - * Creates or finds a EntropyMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding EntropyMode. - */ - @JsonCreator - public static EntropyMode fromString(String name) { - return fromString(name, EntropyMode.class); - } - - /** @return known EntropyMode values. */ - public static Collection values() { - return values(EntropyMode.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FaceDetectorPreset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FaceDetectorPreset.java deleted file mode 100644 index 36aee3d6d06ec..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FaceDetectorPreset.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** - * Describes all the settings to be used when analyzing a video in order to detect (and optionally redact) all the faces - * present. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.FaceDetectorPreset") -@JsonFlatten -@Fluent -public class FaceDetectorPreset extends Preset { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FaceDetectorPreset.class); - - /* - * Specifies the maximum resolution at which your video is analyzed. The - * default behavior is "SourceResolution," which will keep the input video - * at its original resolution when analyzed. Using "StandardDefinition" - * will resize input videos to standard definition while preserving the - * appropriate aspect ratio. It will only resize if the video is of higher - * resolution. For example, a 1920x1080 input would be scaled to 640x360 - * before processing. Switching to "StandardDefinition" will reduce the - * time it takes to process high resolution video. It may also reduce the - * cost of using this component (see - * https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics - * for details). However, faces that end up being too small in the resized - * video may not be detected. - */ - @JsonProperty(value = "resolution") - private AnalysisResolution resolution; - - /* - * This mode provides the ability to choose between the following settings: - * 1) Analyze - For detection only.This mode generates a metadata JSON file - * marking appearances of faces throughout the video.Where possible, - * appearances of the same person are assigned the same ID. 2) Combined - - * Additionally redacts(blurs) detected faces. 3) Redact - This enables a - * 2-pass process, allowing for selective redaction of a subset of detected - * faces.It takes in the metadata file from a prior analyze pass, along - * with the source video, and a user-selected subset of IDs that require - * redaction. - */ - @JsonProperty(value = "mode") - private FaceRedactorMode mode; - - /* - * Blur type - */ - @JsonProperty(value = "blurType") - private BlurType blurType; - - /* - * Dictionary containing key value pairs for parameters not exposed in the - * preset itself - */ - @JsonProperty(value = "experimentalOptions") - private Map experimentalOptions; - - /** - * Get the resolution property: Specifies the maximum resolution at which your video is analyzed. The default - * behavior is "SourceResolution," which will keep the input video at its original resolution when analyzed. Using - * "StandardDefinition" will resize input videos to standard definition while preserving the appropriate aspect - * ratio. It will only resize if the video is of higher resolution. For example, a 1920x1080 input would be scaled - * to 640x360 before processing. Switching to "StandardDefinition" will reduce the time it takes to process high - * resolution video. It may also reduce the cost of using this component (see - * https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics for details). However, faces that end - * up being too small in the resized video may not be detected. - * - * @return the resolution value. - */ - public AnalysisResolution resolution() { - return this.resolution; - } - - /** - * Set the resolution property: Specifies the maximum resolution at which your video is analyzed. The default - * behavior is "SourceResolution," which will keep the input video at its original resolution when analyzed. Using - * "StandardDefinition" will resize input videos to standard definition while preserving the appropriate aspect - * ratio. It will only resize if the video is of higher resolution. For example, a 1920x1080 input would be scaled - * to 640x360 before processing. Switching to "StandardDefinition" will reduce the time it takes to process high - * resolution video. It may also reduce the cost of using this component (see - * https://azure.microsoft.com/en-us/pricing/details/media-services/#analytics for details). However, faces that end - * up being too small in the resized video may not be detected. - * - * @param resolution the resolution value to set. - * @return the FaceDetectorPreset object itself. - */ - public FaceDetectorPreset withResolution(AnalysisResolution resolution) { - this.resolution = resolution; - return this; - } - - /** - * Get the mode property: This mode provides the ability to choose between the following settings: 1) Analyze - For - * detection only.This mode generates a metadata JSON file marking appearances of faces throughout the video.Where - * possible, appearances of the same person are assigned the same ID. 2) Combined - Additionally redacts(blurs) - * detected faces. 3) Redact - This enables a 2-pass process, allowing for selective redaction of a subset of - * detected faces.It takes in the metadata file from a prior analyze pass, along with the source video, and a - * user-selected subset of IDs that require redaction. - * - * @return the mode value. - */ - public FaceRedactorMode mode() { - return this.mode; - } - - /** - * Set the mode property: This mode provides the ability to choose between the following settings: 1) Analyze - For - * detection only.This mode generates a metadata JSON file marking appearances of faces throughout the video.Where - * possible, appearances of the same person are assigned the same ID. 2) Combined - Additionally redacts(blurs) - * detected faces. 3) Redact - This enables a 2-pass process, allowing for selective redaction of a subset of - * detected faces.It takes in the metadata file from a prior analyze pass, along with the source video, and a - * user-selected subset of IDs that require redaction. - * - * @param mode the mode value to set. - * @return the FaceDetectorPreset object itself. - */ - public FaceDetectorPreset withMode(FaceRedactorMode mode) { - this.mode = mode; - return this; - } - - /** - * Get the blurType property: Blur type. - * - * @return the blurType value. - */ - public BlurType blurType() { - return this.blurType; - } - - /** - * Set the blurType property: Blur type. - * - * @param blurType the blurType value to set. - * @return the FaceDetectorPreset object itself. - */ - public FaceDetectorPreset withBlurType(BlurType blurType) { - this.blurType = blurType; - return this; - } - - /** - * Get the experimentalOptions property: Dictionary containing key value pairs for parameters not exposed in the - * preset itself. - * - * @return the experimentalOptions value. - */ - public Map experimentalOptions() { - return this.experimentalOptions; - } - - /** - * Set the experimentalOptions property: Dictionary containing key value pairs for parameters not exposed in the - * preset itself. - * - * @param experimentalOptions the experimentalOptions value to set. - * @return the FaceDetectorPreset object itself. - */ - public FaceDetectorPreset withExperimentalOptions(Map experimentalOptions) { - this.experimentalOptions = experimentalOptions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FaceRedactorMode.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FaceRedactorMode.java deleted file mode 100644 index 064bf139c5c68..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FaceRedactorMode.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for FaceRedactorMode. */ -public final class FaceRedactorMode extends ExpandableStringEnum { - /** Static value Analyze for FaceRedactorMode. */ - public static final FaceRedactorMode ANALYZE = fromString("Analyze"); - - /** Static value Redact for FaceRedactorMode. */ - public static final FaceRedactorMode REDACT = fromString("Redact"); - - /** Static value Combined for FaceRedactorMode. */ - public static final FaceRedactorMode COMBINED = fromString("Combined"); - - /** - * Creates or finds a FaceRedactorMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding FaceRedactorMode. - */ - @JsonCreator - public static FaceRedactorMode fromString(String name) { - return fromString(name, FaceRedactorMode.class); - } - - /** @return known FaceRedactorMode values. */ - public static Collection values() { - return values(FaceRedactorMode.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Filters.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Filters.java deleted file mode 100644 index 065b1f4a5a6d4..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Filters.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.mediaservices.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; - -/** - * Describes all the filtering operations, such as de-interlacing, rotation etc. that are to be applied to the input - * media before encoding. - */ -@Fluent -public final class Filters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Filters.class); - - /* - * The de-interlacing settings. - */ - @JsonProperty(value = "deinterlace") - private Deinterlace deinterlace; - - /* - * The rotation, if any, to be applied to the input video, before it is - * encoded. Default is Auto - */ - @JsonProperty(value = "rotation") - private Rotation rotation; - - /* - * The parameters for the rectangular window with which to crop the input - * video. - */ - @JsonProperty(value = "crop") - private Rectangle crop; - - /* - * The properties of overlays to be applied to the input video. These could - * be audio, image or video overlays. - */ - @JsonProperty(value = "overlays") - private List overlays; - - /** - * Get the deinterlace property: The de-interlacing settings. - * - * @return the deinterlace value. - */ - public Deinterlace deinterlace() { - return this.deinterlace; - } - - /** - * Set the deinterlace property: The de-interlacing settings. - * - * @param deinterlace the deinterlace value to set. - * @return the Filters object itself. - */ - public Filters withDeinterlace(Deinterlace deinterlace) { - this.deinterlace = deinterlace; - return this; - } - - /** - * Get the rotation property: The rotation, if any, to be applied to the input video, before it is encoded. Default - * is Auto. - * - * @return the rotation value. - */ - public Rotation rotation() { - return this.rotation; - } - - /** - * Set the rotation property: The rotation, if any, to be applied to the input video, before it is encoded. Default - * is Auto. - * - * @param rotation the rotation value to set. - * @return the Filters object itself. - */ - public Filters withRotation(Rotation rotation) { - this.rotation = rotation; - return this; - } - - /** - * Get the crop property: The parameters for the rectangular window with which to crop the input video. - * - * @return the crop value. - */ - public Rectangle crop() { - return this.crop; - } - - /** - * Set the crop property: The parameters for the rectangular window with which to crop the input video. - * - * @param crop the crop value to set. - * @return the Filters object itself. - */ - public Filters withCrop(Rectangle crop) { - this.crop = crop; - return this; - } - - /** - * Get the overlays property: The properties of overlays to be applied to the input video. These could be audio, - * image or video overlays. - * - * @return the overlays value. - */ - public List overlays() { - return this.overlays; - } - - /** - * Set the overlays property: The properties of overlays to be applied to the input video. These could be audio, - * image or video overlays. - * - * @param overlays the overlays value to set. - * @return the Filters object itself. - */ - public Filters withOverlays(List overlays) { - this.overlays = overlays; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (deinterlace() != null) { - deinterlace().validate(); - } - if (crop() != null) { - crop().validate(); - } - if (overlays() != null) { - overlays().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Format.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Format.java deleted file mode 100644 index 95284990c07a5..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Format.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base class for output. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = Format.class) -@JsonTypeName("Format") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.Media.ImageFormat", value = ImageFormat.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.MultiBitrateFormat", value = MultiBitrateFormat.class) -}) -@JsonFlatten -@Fluent -public class Format { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Format.class); - - /* - * The pattern of the file names for the generated output files. The - * following macros are supported in the file name: {Basename} - An - * expansion macro that will use the name of the input video file. If the - * base name(the file suffix is not included) of the input video file is - * less than 32 characters long, the base name of input video files will be - * used. If the length of base name of the input video file exceeds 32 - * characters, the base name is truncated to the first 32 characters in - * total length. {Extension} - The appropriate extension for this format. - * {Label} - The label assigned to the codec/layer. {Index} - A unique - * index for thumbnails. Only applicable to thumbnails. {Bitrate} - The - * audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of - * the audio/video codec. {Resolution} - The video resolution. Any - * unsubstituted macros will be collapsed and removed from the filename. - */ - @JsonProperty(value = "filenamePattern", required = true) - private String filenamePattern; - - /** - * Get the filenamePattern property: The pattern of the file names for the generated output files. The following - * macros are supported in the file name: {Basename} - An expansion macro that will use the name of the input video - * file. If the base name(the file suffix is not included) of the input video file is less than 32 characters long, - * the base name of input video files will be used. If the length of base name of the input video file exceeds 32 - * characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate - * extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for - * thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. - * {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted macros will - * be collapsed and removed from the filename. - * - * @return the filenamePattern value. - */ - public String filenamePattern() { - return this.filenamePattern; - } - - /** - * Set the filenamePattern property: The pattern of the file names for the generated output files. The following - * macros are supported in the file name: {Basename} - An expansion macro that will use the name of the input video - * file. If the base name(the file suffix is not included) of the input video file is less than 32 characters long, - * the base name of input video files will be used. If the length of base name of the input video file exceeds 32 - * characters, the base name is truncated to the first 32 characters in total length. {Extension} - The appropriate - * extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for - * thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. - * {Codec} - The type of the audio/video codec. {Resolution} - The video resolution. Any unsubstituted macros will - * be collapsed and removed from the filename. - * - * @param filenamePattern the filenamePattern value to set. - * @return the Format object itself. - */ - public Format withFilenamePattern(String filenamePattern) { - this.filenamePattern = filenamePattern; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (filenamePattern() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property filenamePattern in model Format")); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FromAllInputFile.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FromAllInputFile.java deleted file mode 100644 index 24d79f8fbef14..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FromAllInputFile.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.mediaservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -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; -import java.util.List; - -/** - * An InputDefinition that looks across all of the files provided to select tracks specified by the IncludedTracks - * property. Generally used with the AudioTrackByAttribute and VideoTrackByAttribute to allow selection of a single - * track across a set of input files. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.FromAllInputFile") -@JsonFlatten -@Immutable -public class FromAllInputFile extends InputDefinition { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FromAllInputFile.class); - - /** {@inheritDoc} */ - @Override - public FromAllInputFile withIncludedTracks(List includedTracks) { - super.withIncludedTracks(includedTracks); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FromEachInputFile.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FromEachInputFile.java deleted file mode 100644 index ded085fa54afb..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/FromEachInputFile.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.mediaservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -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; -import java.util.List; - -/** - * An InputDefinition that looks at each input file provided to select tracks specified by the IncludedTracks property. - * Generally used with the AudioTrackByAttribute and VideoTrackByAttribute to select tracks from each file given. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.FromEachInputFile") -@JsonFlatten -@Immutable -public class FromEachInputFile extends InputDefinition { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FromEachInputFile.class); - - /** {@inheritDoc} */ - @Override - public FromEachInputFile withIncludedTracks(List includedTracks) { - super.withIncludedTracks(includedTracks); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Complexity.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Complexity.java deleted file mode 100644 index 8603c6215da2c..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Complexity.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for H264Complexity. */ -public final class H264Complexity extends ExpandableStringEnum { - /** Static value Speed for H264Complexity. */ - public static final H264Complexity SPEED = fromString("Speed"); - - /** Static value Balanced for H264Complexity. */ - public static final H264Complexity BALANCED = fromString("Balanced"); - - /** Static value Quality for H264Complexity. */ - public static final H264Complexity QUALITY = fromString("Quality"); - - /** - * Creates or finds a H264Complexity from its string representation. - * - * @param name a name to look for. - * @return the corresponding H264Complexity. - */ - @JsonCreator - public static H264Complexity fromString(String name) { - return fromString(name, H264Complexity.class); - } - - /** @return known H264Complexity values. */ - public static Collection values() { - return values(H264Complexity.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Layer.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Layer.java deleted file mode 100644 index 6b0553f461924..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Layer.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; - -/** - * Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.264 - * video codec. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.H264Layer") -@JsonFlatten -@Fluent -public class H264Layer extends VideoLayer { - @JsonIgnore private final ClientLogger logger = new ClientLogger(H264Layer.class); - - /* - * We currently support Baseline, Main, High, High422, High444. Default is - * Auto. - */ - @JsonProperty(value = "profile") - private H264VideoProfile profile; - - /* - * We currently support Level up to 6.2. The value can be Auto, or a number - * that matches the H.264 profile. If not specified, the default is Auto, - * which lets the encoder choose the Level that is appropriate for this - * layer. - */ - @JsonProperty(value = "level") - private String level; - - /* - * The VBV buffer window length. The value should be in ISO 8601 format. - * The value should be in the range [0.1-100] seconds. The default is 5 - * seconds (for example, PT5S). - */ - @JsonProperty(value = "bufferWindow") - private Duration bufferWindow; - - /* - * The number of reference frames to be used when encoding this layer. If - * not specified, the encoder determines an appropriate number based on the - * encoder complexity setting. - */ - @JsonProperty(value = "referenceFrames") - private Integer referenceFrames; - - /* - * The entropy mode to be used for this layer. If not specified, the - * encoder chooses the mode that is appropriate for the profile and level. - */ - @JsonProperty(value = "entropyMode") - private EntropyMode entropyMode; - - /** - * Get the profile property: We currently support Baseline, Main, High, High422, High444. Default is Auto. - * - * @return the profile value. - */ - public H264VideoProfile profile() { - return this.profile; - } - - /** - * Set the profile property: We currently support Baseline, Main, High, High422, High444. Default is Auto. - * - * @param profile the profile value to set. - * @return the H264Layer object itself. - */ - public H264Layer withProfile(H264VideoProfile profile) { - this.profile = profile; - return this; - } - - /** - * Get the level property: We currently support Level up to 6.2. The value can be Auto, or a number that matches the - * H.264 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate - * for this layer. - * - * @return the level value. - */ - public String level() { - return this.level; - } - - /** - * Set the level property: We currently support Level up to 6.2. The value can be Auto, or a number that matches the - * H.264 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate - * for this layer. - * - * @param level the level value to set. - * @return the H264Layer object itself. - */ - public H264Layer withLevel(String level) { - this.level = level; - return this; - } - - /** - * Get the bufferWindow property: The VBV buffer window length. The value should be in ISO 8601 format. The value - * should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S). - * - * @return the bufferWindow value. - */ - public Duration bufferWindow() { - return this.bufferWindow; - } - - /** - * Set the bufferWindow property: The VBV buffer window length. The value should be in ISO 8601 format. The value - * should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S). - * - * @param bufferWindow the bufferWindow value to set. - * @return the H264Layer object itself. - */ - public H264Layer withBufferWindow(Duration bufferWindow) { - this.bufferWindow = bufferWindow; - return this; - } - - /** - * Get the referenceFrames property: The number of reference frames to be used when encoding this layer. If not - * specified, the encoder determines an appropriate number based on the encoder complexity setting. - * - * @return the referenceFrames value. - */ - public Integer referenceFrames() { - return this.referenceFrames; - } - - /** - * Set the referenceFrames property: The number of reference frames to be used when encoding this layer. If not - * specified, the encoder determines an appropriate number based on the encoder complexity setting. - * - * @param referenceFrames the referenceFrames value to set. - * @return the H264Layer object itself. - */ - public H264Layer withReferenceFrames(Integer referenceFrames) { - this.referenceFrames = referenceFrames; - return this; - } - - /** - * Get the entropyMode property: The entropy mode to be used for this layer. If not specified, the encoder chooses - * the mode that is appropriate for the profile and level. - * - * @return the entropyMode value. - */ - public EntropyMode entropyMode() { - return this.entropyMode; - } - - /** - * Set the entropyMode property: The entropy mode to be used for this layer. If not specified, the encoder chooses - * the mode that is appropriate for the profile and level. - * - * @param entropyMode the entropyMode value to set. - * @return the H264Layer object itself. - */ - public H264Layer withEntropyMode(EntropyMode entropyMode) { - this.entropyMode = entropyMode; - return this; - } - - /** {@inheritDoc} */ - @Override - public H264Layer withBitrate(int bitrate) { - super.withBitrate(bitrate); - return this; - } - - /** {@inheritDoc} */ - @Override - public H264Layer withMaxBitrate(Integer maxBitrate) { - super.withMaxBitrate(maxBitrate); - return this; - } - - /** {@inheritDoc} */ - @Override - public H264Layer withBFrames(Integer bFrames) { - super.withBFrames(bFrames); - return this; - } - - /** {@inheritDoc} */ - @Override - public H264Layer withFrameRate(String frameRate) { - super.withFrameRate(frameRate); - return this; - } - - /** {@inheritDoc} */ - @Override - public H264Layer withSlices(Integer slices) { - super.withSlices(slices); - return this; - } - - /** {@inheritDoc} */ - @Override - public H264Layer withAdaptiveBFrame(Boolean adaptiveBFrame) { - super.withAdaptiveBFrame(adaptiveBFrame); - return this; - } - - /** {@inheritDoc} */ - @Override - public H264Layer withWidth(String width) { - super.withWidth(width); - return this; - } - - /** {@inheritDoc} */ - @Override - public H264Layer withHeight(String height) { - super.withHeight(height); - return this; - } - - /** {@inheritDoc} */ - @Override - public H264Layer withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Video.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Video.java deleted file mode 100644 index 391d62ffb8bc0..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264Video.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; -import java.util.List; - -/** Describes all the properties for encoding a video with the H.264 codec. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.H264Video") -@JsonFlatten -@Fluent -public class H264Video extends Video { - @JsonIgnore private final ClientLogger logger = new ClientLogger(H264Video.class); - - /* - * Whether or not the encoder should insert key frames at scene changes. If - * not specified, the default is false. This flag should be set to true - * only when the encoder is being configured to produce a single output - * video. - */ - @JsonProperty(value = "sceneChangeDetection") - private Boolean sceneChangeDetection; - - /* - * Tells the encoder how to choose its encoding settings. The default value - * is Balanced. - */ - @JsonProperty(value = "complexity") - private H264Complexity complexity; - - /* - * The collection of output H.264 layers to be produced by the encoder. - */ - @JsonProperty(value = "layers") - private List layers; - - /** - * Get the sceneChangeDetection property: Whether or not the encoder should insert key frames at scene changes. If - * not specified, the default is false. This flag should be set to true only when the encoder is being configured to - * produce a single output video. - * - * @return the sceneChangeDetection value. - */ - public Boolean sceneChangeDetection() { - return this.sceneChangeDetection; - } - - /** - * Set the sceneChangeDetection property: Whether or not the encoder should insert key frames at scene changes. If - * not specified, the default is false. This flag should be set to true only when the encoder is being configured to - * produce a single output video. - * - * @param sceneChangeDetection the sceneChangeDetection value to set. - * @return the H264Video object itself. - */ - public H264Video withSceneChangeDetection(Boolean sceneChangeDetection) { - this.sceneChangeDetection = sceneChangeDetection; - return this; - } - - /** - * Get the complexity property: Tells the encoder how to choose its encoding settings. The default value is - * Balanced. - * - * @return the complexity value. - */ - public H264Complexity complexity() { - return this.complexity; - } - - /** - * Set the complexity property: Tells the encoder how to choose its encoding settings. The default value is - * Balanced. - * - * @param complexity the complexity value to set. - * @return the H264Video object itself. - */ - public H264Video withComplexity(H264Complexity complexity) { - this.complexity = complexity; - return this; - } - - /** - * Get the layers property: The collection of output H.264 layers to be produced by the encoder. - * - * @return the layers value. - */ - public List layers() { - return this.layers; - } - - /** - * Set the layers property: The collection of output H.264 layers to be produced by the encoder. - * - * @param layers the layers value to set. - * @return the H264Video object itself. - */ - public H264Video withLayers(List layers) { - this.layers = layers; - return this; - } - - /** {@inheritDoc} */ - @Override - public H264Video withKeyFrameInterval(Duration keyFrameInterval) { - super.withKeyFrameInterval(keyFrameInterval); - return this; - } - - /** {@inheritDoc} */ - @Override - public H264Video withStretchMode(StretchMode stretchMode) { - super.withStretchMode(stretchMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public H264Video withSyncMode(VideoSyncMode syncMode) { - super.withSyncMode(syncMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public H264Video withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (layers() != null) { - layers().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264VideoProfile.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264VideoProfile.java deleted file mode 100644 index c15ba95098317..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H264VideoProfile.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for H264VideoProfile. */ -public final class H264VideoProfile extends ExpandableStringEnum { - /** Static value Auto for H264VideoProfile. */ - public static final H264VideoProfile AUTO = fromString("Auto"); - - /** Static value Baseline for H264VideoProfile. */ - public static final H264VideoProfile BASELINE = fromString("Baseline"); - - /** Static value Main for H264VideoProfile. */ - public static final H264VideoProfile MAIN = fromString("Main"); - - /** Static value High for H264VideoProfile. */ - public static final H264VideoProfile HIGH = fromString("High"); - - /** Static value High422 for H264VideoProfile. */ - public static final H264VideoProfile HIGH422 = fromString("High422"); - - /** Static value High444 for H264VideoProfile. */ - public static final H264VideoProfile HIGH444 = fromString("High444"); - - /** - * Creates or finds a H264VideoProfile from its string representation. - * - * @param name a name to look for. - * @return the corresponding H264VideoProfile. - */ - @JsonCreator - public static H264VideoProfile fromString(String name) { - return fromString(name, H264VideoProfile.class); - } - - /** @return known H264VideoProfile values. */ - public static Collection values() { - return values(H264VideoProfile.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Complexity.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Complexity.java deleted file mode 100644 index f03eddaf19891..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Complexity.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for H265Complexity. */ -public final class H265Complexity extends ExpandableStringEnum { - /** Static value Speed for H265Complexity. */ - public static final H265Complexity SPEED = fromString("Speed"); - - /** Static value Balanced for H265Complexity. */ - public static final H265Complexity BALANCED = fromString("Balanced"); - - /** Static value Quality for H265Complexity. */ - public static final H265Complexity QUALITY = fromString("Quality"); - - /** - * Creates or finds a H265Complexity from its string representation. - * - * @param name a name to look for. - * @return the corresponding H265Complexity. - */ - @JsonCreator - public static H265Complexity fromString(String name) { - return fromString(name, H265Complexity.class); - } - - /** @return known H265Complexity values. */ - public static Collection values() { - return values(H265Complexity.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Layer.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Layer.java deleted file mode 100644 index cd1a8f4df3711..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Layer.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.resourcemanager.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; - -/** - * Describes the settings to be used when encoding the input video into a desired output bitrate layer with the H.265 - * video codec. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.H265Layer") -@JsonFlatten -@Fluent -public class H265Layer extends H265VideoLayer { - @JsonIgnore private final ClientLogger logger = new ClientLogger(H265Layer.class); - - /* - * We currently support Main. Default is Auto. - */ - @JsonProperty(value = "profile") - private H265VideoProfile profile; - - /* - * We currently support Level up to 6.2. The value can be Auto, or a number - * that matches the H.265 profile. If not specified, the default is Auto, - * which lets the encoder choose the Level that is appropriate for this - * layer. - */ - @JsonProperty(value = "level") - private String level; - - /* - * The VBV buffer window length. The value should be in ISO 8601 format. - * The value should be in the range [0.1-100] seconds. The default is 5 - * seconds (for example, PT5S). - */ - @JsonProperty(value = "bufferWindow") - private Duration bufferWindow; - - /* - * The number of reference frames to be used when encoding this layer. If - * not specified, the encoder determines an appropriate number based on the - * encoder complexity setting. - */ - @JsonProperty(value = "referenceFrames") - private Integer referenceFrames; - - /** - * Get the profile property: We currently support Main. Default is Auto. - * - * @return the profile value. - */ - public H265VideoProfile profile() { - return this.profile; - } - - /** - * Set the profile property: We currently support Main. Default is Auto. - * - * @param profile the profile value to set. - * @return the H265Layer object itself. - */ - public H265Layer withProfile(H265VideoProfile profile) { - this.profile = profile; - return this; - } - - /** - * Get the level property: We currently support Level up to 6.2. The value can be Auto, or a number that matches the - * H.265 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate - * for this layer. - * - * @return the level value. - */ - public String level() { - return this.level; - } - - /** - * Set the level property: We currently support Level up to 6.2. The value can be Auto, or a number that matches the - * H.265 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate - * for this layer. - * - * @param level the level value to set. - * @return the H265Layer object itself. - */ - public H265Layer withLevel(String level) { - this.level = level; - return this; - } - - /** - * Get the bufferWindow property: The VBV buffer window length. The value should be in ISO 8601 format. The value - * should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S). - * - * @return the bufferWindow value. - */ - public Duration bufferWindow() { - return this.bufferWindow; - } - - /** - * Set the bufferWindow property: The VBV buffer window length. The value should be in ISO 8601 format. The value - * should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S). - * - * @param bufferWindow the bufferWindow value to set. - * @return the H265Layer object itself. - */ - public H265Layer withBufferWindow(Duration bufferWindow) { - this.bufferWindow = bufferWindow; - return this; - } - - /** - * Get the referenceFrames property: The number of reference frames to be used when encoding this layer. If not - * specified, the encoder determines an appropriate number based on the encoder complexity setting. - * - * @return the referenceFrames value. - */ - public Integer referenceFrames() { - return this.referenceFrames; - } - - /** - * Set the referenceFrames property: The number of reference frames to be used when encoding this layer. If not - * specified, the encoder determines an appropriate number based on the encoder complexity setting. - * - * @param referenceFrames the referenceFrames value to set. - * @return the H265Layer object itself. - */ - public H265Layer withReferenceFrames(Integer referenceFrames) { - this.referenceFrames = referenceFrames; - return this; - } - - /** {@inheritDoc} */ - @Override - public H265Layer withBitrate(int bitrate) { - super.withBitrate(bitrate); - return this; - } - - /** {@inheritDoc} */ - @Override - public H265Layer withMaxBitrate(Integer maxBitrate) { - super.withMaxBitrate(maxBitrate); - return this; - } - - /** {@inheritDoc} */ - @Override - public H265Layer withBFrames(Integer bFrames) { - super.withBFrames(bFrames); - return this; - } - - /** {@inheritDoc} */ - @Override - public H265Layer withFrameRate(String frameRate) { - super.withFrameRate(frameRate); - return this; - } - - /** {@inheritDoc} */ - @Override - public H265Layer withSlices(Integer slices) { - super.withSlices(slices); - return this; - } - - /** {@inheritDoc} */ - @Override - public H265Layer withAdaptiveBFrame(Boolean adaptiveBFrame) { - super.withAdaptiveBFrame(adaptiveBFrame); - return this; - } - - /** {@inheritDoc} */ - @Override - public H265Layer withWidth(String width) { - super.withWidth(width); - return this; - } - - /** {@inheritDoc} */ - @Override - public H265Layer withHeight(String height) { - super.withHeight(height); - return this; - } - - /** {@inheritDoc} */ - @Override - public H265Layer withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Video.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Video.java deleted file mode 100644 index ea102774806a8..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265Video.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; -import java.util.List; - -/** Describes all the properties for encoding a video with the H.265 codec. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.H265Video") -@JsonFlatten -@Fluent -public class H265Video extends Video { - @JsonIgnore private final ClientLogger logger = new ClientLogger(H265Video.class); - - /* - * Specifies whether or not the encoder should insert key frames at scene - * changes. If not specified, the default is false. This flag should be set - * to true only when the encoder is being configured to produce a single - * output video. - */ - @JsonProperty(value = "sceneChangeDetection") - private Boolean sceneChangeDetection; - - /* - * Tells the encoder how to choose its encoding settings. Quality will - * provide for a higher compression ratio but at a higher cost and longer - * compute time. Speed will produce a relatively larger file but is faster - * and more economical. The default value is Balanced. - */ - @JsonProperty(value = "complexity") - private H265Complexity complexity; - - /* - * The collection of output H.265 layers to be produced by the encoder. - */ - @JsonProperty(value = "layers") - private List layers; - - /** - * Get the sceneChangeDetection property: Specifies whether or not the encoder should insert key frames at scene - * changes. If not specified, the default is false. This flag should be set to true only when the encoder is being - * configured to produce a single output video. - * - * @return the sceneChangeDetection value. - */ - public Boolean sceneChangeDetection() { - return this.sceneChangeDetection; - } - - /** - * Set the sceneChangeDetection property: Specifies whether or not the encoder should insert key frames at scene - * changes. If not specified, the default is false. This flag should be set to true only when the encoder is being - * configured to produce a single output video. - * - * @param sceneChangeDetection the sceneChangeDetection value to set. - * @return the H265Video object itself. - */ - public H265Video withSceneChangeDetection(Boolean sceneChangeDetection) { - this.sceneChangeDetection = sceneChangeDetection; - return this; - } - - /** - * Get the complexity property: Tells the encoder how to choose its encoding settings. Quality will provide for a - * higher compression ratio but at a higher cost and longer compute time. Speed will produce a relatively larger - * file but is faster and more economical. The default value is Balanced. - * - * @return the complexity value. - */ - public H265Complexity complexity() { - return this.complexity; - } - - /** - * Set the complexity property: Tells the encoder how to choose its encoding settings. Quality will provide for a - * higher compression ratio but at a higher cost and longer compute time. Speed will produce a relatively larger - * file but is faster and more economical. The default value is Balanced. - * - * @param complexity the complexity value to set. - * @return the H265Video object itself. - */ - public H265Video withComplexity(H265Complexity complexity) { - this.complexity = complexity; - return this; - } - - /** - * Get the layers property: The collection of output H.265 layers to be produced by the encoder. - * - * @return the layers value. - */ - public List layers() { - return this.layers; - } - - /** - * Set the layers property: The collection of output H.265 layers to be produced by the encoder. - * - * @param layers the layers value to set. - * @return the H265Video object itself. - */ - public H265Video withLayers(List layers) { - this.layers = layers; - return this; - } - - /** {@inheritDoc} */ - @Override - public H265Video withKeyFrameInterval(Duration keyFrameInterval) { - super.withKeyFrameInterval(keyFrameInterval); - return this; - } - - /** {@inheritDoc} */ - @Override - public H265Video withStretchMode(StretchMode stretchMode) { - super.withStretchMode(stretchMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public H265Video withSyncMode(VideoSyncMode syncMode) { - super.withSyncMode(syncMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public H265Video withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (layers() != null) { - layers().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265VideoLayer.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265VideoLayer.java deleted file mode 100644 index 2ebabc012d240..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265VideoLayer.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes the settings to be used when encoding the input video into a desired output bitrate layer. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = H265VideoLayer.class) -@JsonTypeName("#Microsoft.Media.H265VideoLayer") -@JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.Media.H265Layer", value = H265Layer.class)}) -@JsonFlatten -@Fluent -public class H265VideoLayer extends Layer { - @JsonIgnore private final ClientLogger logger = new ClientLogger(H265VideoLayer.class); - - /* - * The average bitrate in bits per second at which to encode the input - * video when generating this layer. For example: a target bitrate of - * 3000Kbps or 3Mbps means this value should be 3000000 This is a required - * field. - */ - @JsonProperty(value = "bitrate", required = true) - private int bitrate; - - /* - * The maximum bitrate (in bits per second), at which the VBV buffer should - * be assumed to refill. If not specified, defaults to the same value as - * bitrate. - */ - @JsonProperty(value = "maxBitrate") - private Integer maxBitrate; - - /* - * The number of B-frames to be used when encoding this layer. If not - * specified, the encoder chooses an appropriate number based on the video - * profile and level. - */ - @JsonProperty(value = "bFrames") - private Integer bFrames; - - /* - * The frame rate (in frames per second) at which to encode this layer. The - * value can be in the form of M/N where M and N are integers (For example, - * 30000/1001), or in the form of a number (For example, 30, or 29.97). The - * encoder enforces constraints on allowed frame rates based on the profile - * and level. If it is not specified, the encoder will use the same frame - * rate as the input video. - */ - @JsonProperty(value = "frameRate") - private String frameRate; - - /* - * The number of slices to be used when encoding this layer. If not - * specified, default is zero, which means that encoder will use a single - * slice for each frame. - */ - @JsonProperty(value = "slices") - private Integer slices; - - /* - * Specifies whether or not adaptive B-frames are to be used when encoding - * this layer. If not specified, the encoder will turn it on whenever the - * video profile permits its use. - */ - @JsonProperty(value = "adaptiveBFrame") - private Boolean adaptiveBFrame; - - /** - * Get the bitrate property: The average bitrate in bits per second at which to encode the input video when - * generating this layer. For example: a target bitrate of 3000Kbps or 3Mbps means this value should be 3000000 This - * is a required field. - * - * @return the bitrate value. - */ - public int bitrate() { - return this.bitrate; - } - - /** - * Set the bitrate property: The average bitrate in bits per second at which to encode the input video when - * generating this layer. For example: a target bitrate of 3000Kbps or 3Mbps means this value should be 3000000 This - * is a required field. - * - * @param bitrate the bitrate value to set. - * @return the H265VideoLayer object itself. - */ - public H265VideoLayer withBitrate(int bitrate) { - this.bitrate = bitrate; - return this; - } - - /** - * Get the maxBitrate property: The maximum bitrate (in bits per second), at which the VBV buffer should be assumed - * to refill. If not specified, defaults to the same value as bitrate. - * - * @return the maxBitrate value. - */ - public Integer maxBitrate() { - return this.maxBitrate; - } - - /** - * Set the maxBitrate property: The maximum bitrate (in bits per second), at which the VBV buffer should be assumed - * to refill. If not specified, defaults to the same value as bitrate. - * - * @param maxBitrate the maxBitrate value to set. - * @return the H265VideoLayer object itself. - */ - public H265VideoLayer withMaxBitrate(Integer maxBitrate) { - this.maxBitrate = maxBitrate; - return this; - } - - /** - * Get the bFrames property: The number of B-frames to be used when encoding this layer. If not specified, the - * encoder chooses an appropriate number based on the video profile and level. - * - * @return the bFrames value. - */ - public Integer bFrames() { - return this.bFrames; - } - - /** - * Set the bFrames property: The number of B-frames to be used when encoding this layer. If not specified, the - * encoder chooses an appropriate number based on the video profile and level. - * - * @param bFrames the bFrames value to set. - * @return the H265VideoLayer object itself. - */ - public H265VideoLayer withBFrames(Integer bFrames) { - this.bFrames = bFrames; - return this; - } - - /** - * Get the frameRate property: The frame rate (in frames per second) at which to encode this layer. The value can be - * in the form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number (For example, - * 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is - * not specified, the encoder will use the same frame rate as the input video. - * - * @return the frameRate value. - */ - public String frameRate() { - return this.frameRate; - } - - /** - * Set the frameRate property: The frame rate (in frames per second) at which to encode this layer. The value can be - * in the form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number (For example, - * 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is - * not specified, the encoder will use the same frame rate as the input video. - * - * @param frameRate the frameRate value to set. - * @return the H265VideoLayer object itself. - */ - public H265VideoLayer withFrameRate(String frameRate) { - this.frameRate = frameRate; - return this; - } - - /** - * Get the slices property: The number of slices to be used when encoding this layer. If not specified, default is - * zero, which means that encoder will use a single slice for each frame. - * - * @return the slices value. - */ - public Integer slices() { - return this.slices; - } - - /** - * Set the slices property: The number of slices to be used when encoding this layer. If not specified, default is - * zero, which means that encoder will use a single slice for each frame. - * - * @param slices the slices value to set. - * @return the H265VideoLayer object itself. - */ - public H265VideoLayer withSlices(Integer slices) { - this.slices = slices; - return this; - } - - /** - * Get the adaptiveBFrame property: Specifies whether or not adaptive B-frames are to be used when encoding this - * layer. If not specified, the encoder will turn it on whenever the video profile permits its use. - * - * @return the adaptiveBFrame value. - */ - public Boolean adaptiveBFrame() { - return this.adaptiveBFrame; - } - - /** - * Set the adaptiveBFrame property: Specifies whether or not adaptive B-frames are to be used when encoding this - * layer. If not specified, the encoder will turn it on whenever the video profile permits its use. - * - * @param adaptiveBFrame the adaptiveBFrame value to set. - * @return the H265VideoLayer object itself. - */ - public H265VideoLayer withAdaptiveBFrame(Boolean adaptiveBFrame) { - this.adaptiveBFrame = adaptiveBFrame; - return this; - } - - /** {@inheritDoc} */ - @Override - public H265VideoLayer withWidth(String width) { - super.withWidth(width); - return this; - } - - /** {@inheritDoc} */ - @Override - public H265VideoLayer withHeight(String height) { - super.withHeight(height); - return this; - } - - /** {@inheritDoc} */ - @Override - public H265VideoLayer withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265VideoProfile.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265VideoProfile.java deleted file mode 100644 index 6ef201539d447..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/H265VideoProfile.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for H265VideoProfile. */ -public final class H265VideoProfile extends ExpandableStringEnum { - /** Static value Auto for H265VideoProfile. */ - public static final H265VideoProfile AUTO = fromString("Auto"); - - /** Static value Main for H265VideoProfile. */ - public static final H265VideoProfile MAIN = fromString("Main"); - - /** - * Creates or finds a H265VideoProfile from its string representation. - * - * @param name a name to look for. - * @return the corresponding H265VideoProfile. - */ - @JsonCreator - public static H265VideoProfile fromString(String name) { - return fromString(name, H265VideoProfile.class); - } - - /** @return known H265VideoProfile values. */ - public static Collection values() { - return values(H265VideoProfile.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Image.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Image.java deleted file mode 100644 index 92d5a0be4429d..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Image.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; - -/** Describes the basic properties for generating thumbnails from the input video. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = Image.class) -@JsonTypeName("#Microsoft.Media.Image") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.Media.JpgImage", value = JpgImage.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.PngImage", value = PngImage.class) -}) -@JsonFlatten -@Fluent -public class Image extends Video { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Image.class); - - /* - * The position in the input video from where to start generating - * thumbnails. The value can be in ISO 8601 format (For example, PT05S to - * start at 5 seconds), or a frame count (For example, 10 to start at the - * 10th frame), or a relative value to stream duration (For example, 10% to - * start at 10% of stream duration). Also supports a macro {Best}, which - * tells the encoder to select the best thumbnail from the first few - * seconds of the video and will only produce one thumbnail, no matter what - * other settings are for Step and Range. The default value is macro - * {Best}. - */ - @JsonProperty(value = "start", required = true) - private String start; - - /* - * The intervals at which thumbnails are generated. The value can be in ISO - * 8601 format (For example, PT05S for one image every 5 seconds), or a - * frame count (For example, 30 for one image every 30 frames), or a - * relative value to stream duration (For example, 10% for one image every - * 10% of stream duration). Note: Step value will affect the first - * generated thumbnail, which may not be exactly the one specified at - * transform preset start time. This is due to the encoder, which tries to - * select the best thumbnail between start time and Step position from - * start time as the first output. As the default value is 10%, it means if - * stream has long duration, the first generated thumbnail might be far - * away from the one specified at start time. Try to select reasonable - * value for Step if the first thumbnail is expected close to start time, - * or set Range value at 1 if only one thumbnail is needed at start time. - */ - @JsonProperty(value = "step") - private String step; - - /* - * The position relative to transform preset start time in the input video - * at which to stop generating thumbnails. The value can be in ISO 8601 - * format (For example, PT5M30S to stop at 5 minutes and 30 seconds from - * start time), or a frame count (For example, 300 to stop at the 300th - * frame from the frame at start time. If this value is 1, it means only - * producing one thumbnail at start time), or a relative value to the - * stream duration (For example, 50% to stop at half of stream duration - * from start time). The default value is 100%, which means to stop at the - * end of the stream. - */ - @JsonProperty(value = "range") - private String range; - - /** - * Get the start property: The position in the input video from where to start generating thumbnails. The value can - * be in ISO 8601 format (For example, PT05S to start at 5 seconds), or a frame count (For example, 10 to start at - * the 10th frame), or a relative value to stream duration (For example, 10% to start at 10% of stream duration). - * Also supports a macro {Best}, which tells the encoder to select the best thumbnail from the first few seconds of - * the video and will only produce one thumbnail, no matter what other settings are for Step and Range. The default - * value is macro {Best}. - * - * @return the start value. - */ - public String start() { - return this.start; - } - - /** - * Set the start property: The position in the input video from where to start generating thumbnails. The value can - * be in ISO 8601 format (For example, PT05S to start at 5 seconds), or a frame count (For example, 10 to start at - * the 10th frame), or a relative value to stream duration (For example, 10% to start at 10% of stream duration). - * Also supports a macro {Best}, which tells the encoder to select the best thumbnail from the first few seconds of - * the video and will only produce one thumbnail, no matter what other settings are for Step and Range. The default - * value is macro {Best}. - * - * @param start the start value to set. - * @return the Image object itself. - */ - public Image withStart(String start) { - this.start = start; - return this; - } - - /** - * Get the step property: The intervals at which thumbnails are generated. The value can be in ISO 8601 format (For - * example, PT05S for one image every 5 seconds), or a frame count (For example, 30 for one image every 30 frames), - * or a relative value to stream duration (For example, 10% for one image every 10% of stream duration). Note: Step - * value will affect the first generated thumbnail, which may not be exactly the one specified at transform preset - * start time. This is due to the encoder, which tries to select the best thumbnail between start time and Step - * position from start time as the first output. As the default value is 10%, it means if stream has long duration, - * the first generated thumbnail might be far away from the one specified at start time. Try to select reasonable - * value for Step if the first thumbnail is expected close to start time, or set Range value at 1 if only one - * thumbnail is needed at start time. - * - * @return the step value. - */ - public String step() { - return this.step; - } - - /** - * Set the step property: The intervals at which thumbnails are generated. The value can be in ISO 8601 format (For - * example, PT05S for one image every 5 seconds), or a frame count (For example, 30 for one image every 30 frames), - * or a relative value to stream duration (For example, 10% for one image every 10% of stream duration). Note: Step - * value will affect the first generated thumbnail, which may not be exactly the one specified at transform preset - * start time. This is due to the encoder, which tries to select the best thumbnail between start time and Step - * position from start time as the first output. As the default value is 10%, it means if stream has long duration, - * the first generated thumbnail might be far away from the one specified at start time. Try to select reasonable - * value for Step if the first thumbnail is expected close to start time, or set Range value at 1 if only one - * thumbnail is needed at start time. - * - * @param step the step value to set. - * @return the Image object itself. - */ - public Image withStep(String step) { - this.step = step; - return this; - } - - /** - * Get the range property: The position relative to transform preset start time in the input video at which to stop - * generating thumbnails. The value can be in ISO 8601 format (For example, PT5M30S to stop at 5 minutes and 30 - * seconds from start time), or a frame count (For example, 300 to stop at the 300th frame from the frame at start - * time. If this value is 1, it means only producing one thumbnail at start time), or a relative value to the stream - * duration (For example, 50% to stop at half of stream duration from start time). The default value is 100%, which - * means to stop at the end of the stream. - * - * @return the range value. - */ - public String range() { - return this.range; - } - - /** - * Set the range property: The position relative to transform preset start time in the input video at which to stop - * generating thumbnails. The value can be in ISO 8601 format (For example, PT5M30S to stop at 5 minutes and 30 - * seconds from start time), or a frame count (For example, 300 to stop at the 300th frame from the frame at start - * time. If this value is 1, it means only producing one thumbnail at start time), or a relative value to the stream - * duration (For example, 50% to stop at half of stream duration from start time). The default value is 100%, which - * means to stop at the end of the stream. - * - * @param range the range value to set. - * @return the Image object itself. - */ - public Image withRange(String range) { - this.range = range; - return this; - } - - /** {@inheritDoc} */ - @Override - public Image withKeyFrameInterval(Duration keyFrameInterval) { - super.withKeyFrameInterval(keyFrameInterval); - return this; - } - - /** {@inheritDoc} */ - @Override - public Image withStretchMode(StretchMode stretchMode) { - super.withStretchMode(stretchMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public Image withSyncMode(VideoSyncMode syncMode) { - super.withSyncMode(syncMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public Image withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (start() == null) { - throw logger - .logExceptionAsError(new IllegalArgumentException("Missing required property start in model Image")); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ImageFormat.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ImageFormat.java deleted file mode 100644 index 0e102ce573eeb..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ImageFormat.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.mediaservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes the properties for an output image file. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = ImageFormat.class) -@JsonTypeName("#Microsoft.Media.ImageFormat") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.Media.JpgFormat", value = JpgFormat.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.PngFormat", value = PngFormat.class) -}) -@JsonFlatten -@Immutable -public class ImageFormat extends Format { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ImageFormat.class); - - /** {@inheritDoc} */ - @Override - public ImageFormat withFilenamePattern(String filenamePattern) { - super.withFilenamePattern(filenamePattern); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InputDefinition.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InputDefinition.java deleted file mode 100644 index cc67ec55f3f88..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InputDefinition.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.resourcemanager.mediaservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** - * Base class for defining an input. Use sub classes of this class to specify tracks selections and related metadata. - */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = InputDefinition.class) -@JsonTypeName("InputDefinition") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.Media.FromAllInputFile", value = FromAllInputFile.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.FromEachInputFile", value = FromEachInputFile.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.InputFile", value = InputFile.class) -}) -@JsonFlatten -@Fluent -public class InputDefinition { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InputDefinition.class); - - /* - * The list of TrackDescriptors which define the metadata and selection of - * tracks in the input. - */ - @JsonProperty(value = "includedTracks") - private List includedTracks; - - /** - * Get the includedTracks property: The list of TrackDescriptors which define the metadata and selection of tracks - * in the input. - * - * @return the includedTracks value. - */ - public List includedTracks() { - return this.includedTracks; - } - - /** - * Set the includedTracks property: The list of TrackDescriptors which define the metadata and selection of tracks - * in the input. - * - * @param includedTracks the includedTracks value to set. - * @return the InputDefinition object itself. - */ - public InputDefinition withIncludedTracks(List includedTracks) { - this.includedTracks = includedTracks; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (includedTracks() != null) { - includedTracks().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InputFile.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InputFile.java deleted file mode 100644 index 738ecfd6393e5..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InputFile.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** An InputDefinition for a single file. TrackSelections are scoped to the file specified. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.InputFile") -@JsonFlatten -@Fluent -public class InputFile extends InputDefinition { - @JsonIgnore private final ClientLogger logger = new ClientLogger(InputFile.class); - - /* - * Name of the file that this input definition applies to. - */ - @JsonProperty(value = "filename") - private String filename; - - /** - * Get the filename property: Name of the file that this input definition applies to. - * - * @return the filename value. - */ - public String filename() { - return this.filename; - } - - /** - * Set the filename property: Name of the file that this input definition applies to. - * - * @param filename the filename value to set. - * @return the InputFile object itself. - */ - public InputFile withFilename(String filename) { - this.filename = filename; - return this; - } - - /** {@inheritDoc} */ - @Override - public InputFile withIncludedTracks(List includedTracks) { - super.withIncludedTracks(includedTracks); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InsightsType.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InsightsType.java deleted file mode 100644 index 18f33bdb1c4cf..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/InsightsType.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for InsightsType. */ -public final class InsightsType extends ExpandableStringEnum { - /** Static value AudioInsightsOnly for InsightsType. */ - public static final InsightsType AUDIO_INSIGHTS_ONLY = fromString("AudioInsightsOnly"); - - /** Static value VideoInsightsOnly for InsightsType. */ - public static final InsightsType VIDEO_INSIGHTS_ONLY = fromString("VideoInsightsOnly"); - - /** Static value AllInsights for InsightsType. */ - public static final InsightsType ALL_INSIGHTS = fromString("AllInsights"); - - /** - * Creates or finds a InsightsType from its string representation. - * - * @param name a name to look for. - * @return the corresponding InsightsType. - */ - @JsonCreator - public static InsightsType fromString(String name) { - return fromString(name, InsightsType.class); - } - - /** @return known InsightsType values. */ - public static Collection values() { - return values(InsightsType.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Job.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Job.java deleted file mode 100644 index a2aa85a956ca5..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Job.java +++ /dev/null @@ -1,346 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.mediaservices.fluent.models.JobInner; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** 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 systemData property: The system metadata relating to this resource. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the created property: The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ' - * format. - * - * @return the created value. - */ - OffsetDateTime created(); - - /** - * Gets the state property: The current state of the job. - * - * @return the state value. - */ - JobState state(); - - /** - * Gets the description property: Optional customer supplied description of the Job. - * - * @return the description value. - */ - String description(); - - /** - * Gets the input property: The inputs for the Job. - * - * @return the input value. - */ - JobInput input(); - - /** - * Gets the lastModified property: The UTC date and time when the customer has last updated the Job, in - * 'YYYY-MM-DDThh:mm:ssZ' format. - * - * @return the lastModified value. - */ - OffsetDateTime lastModified(); - - /** - * Gets the outputs property: The outputs for the Job. - * - * @return the outputs value. - */ - List outputs(); - - /** - * Gets the priority property: Priority with which the job should be processed. Higher priority jobs are processed - * before lower priority jobs. If not set, the default is normal. - * - * @return the priority value. - */ - Priority priority(); - - /** - * Gets the correlationData property: Customer provided key, value pairs that will be returned in Job and JobOutput - * state events. - * - * @return the correlationData value. - */ - Map correlationData(); - - /** - * Gets the startTime property: The UTC date and time at which this Job began processing. - * - * @return the startTime value. - */ - OffsetDateTime startTime(); - - /** - * Gets the endTime property: The UTC date and time at which this Job finished processing. - * - * @return the endTime value. - */ - OffsetDateTime endTime(); - - /** - * Gets the inner com.azure.resourcemanager.mediaservices.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, accountName, transformName. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @return the next definition stage. - */ - WithCreate withExistingTransform(String resourceGroupName, String accountName, String transformName); - } - /** - * 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.WithDescription, - DefinitionStages.WithInput, - DefinitionStages.WithOutputs, - DefinitionStages.WithPriority, - DefinitionStages.WithCorrelationData { - /** - * 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 description. */ - interface WithDescription { - /** - * Specifies the description property: Optional customer supplied description of the Job.. - * - * @param description Optional customer supplied description of the Job. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - /** The stage of the Job definition allowing to specify input. */ - interface WithInput { - /** - * Specifies the input property: The inputs for the Job.. - * - * @param input The inputs for the Job. - * @return the next definition stage. - */ - WithCreate withInput(JobInput input); - } - /** The stage of the Job definition allowing to specify outputs. */ - interface WithOutputs { - /** - * Specifies the outputs property: The outputs for the Job.. - * - * @param outputs The outputs for the Job. - * @return the next definition stage. - */ - WithCreate withOutputs(List outputs); - } - /** The stage of the Job definition allowing to specify priority. */ - interface WithPriority { - /** - * Specifies the priority property: Priority with which the job should be processed. Higher priority jobs - * are processed before lower priority jobs. If not set, the default is normal.. - * - * @param priority Priority with which the job should be processed. Higher priority jobs are processed - * before lower priority jobs. If not set, the default is normal. - * @return the next definition stage. - */ - WithCreate withPriority(Priority priority); - } - /** The stage of the Job definition allowing to specify correlationData. */ - interface WithCorrelationData { - /** - * Specifies the correlationData property: Customer provided key, value pairs that will be returned in Job - * and JobOutput state events.. - * - * @param correlationData Customer provided key, value pairs that will be returned in Job and JobOutput - * state events. - * @return the next definition stage. - */ - WithCreate withCorrelationData(Map correlationData); - } - } - /** - * Begins update for the Job resource. - * - * @return the stage of resource update. - */ - Job.Update update(); - - /** The template for Job update. */ - interface Update - extends UpdateStages.WithDescription, - UpdateStages.WithInput, - UpdateStages.WithOutputs, - UpdateStages.WithPriority, - UpdateStages.WithCorrelationData { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Job apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Job apply(Context context); - } - /** The Job update stages. */ - interface UpdateStages { - /** The stage of the Job update allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: Optional customer supplied description of the Job.. - * - * @param description Optional customer supplied description of the Job. - * @return the next definition stage. - */ - Update withDescription(String description); - } - /** The stage of the Job update allowing to specify input. */ - interface WithInput { - /** - * Specifies the input property: The inputs for the Job.. - * - * @param input The inputs for the Job. - * @return the next definition stage. - */ - Update withInput(JobInput input); - } - /** The stage of the Job update allowing to specify outputs. */ - interface WithOutputs { - /** - * Specifies the outputs property: The outputs for the Job.. - * - * @param outputs The outputs for the Job. - * @return the next definition stage. - */ - Update withOutputs(List outputs); - } - /** The stage of the Job update allowing to specify priority. */ - interface WithPriority { - /** - * Specifies the priority property: Priority with which the job should be processed. Higher priority jobs - * are processed before lower priority jobs. If not set, the default is normal.. - * - * @param priority Priority with which the job should be processed. Higher priority jobs are processed - * before lower priority jobs. If not set, the default is normal. - * @return the next definition stage. - */ - Update withPriority(Priority priority); - } - /** The stage of the Job update allowing to specify correlationData. */ - interface WithCorrelationData { - /** - * Specifies the correlationData property: Customer provided key, value pairs that will be returned in Job - * and JobOutput state events.. - * - * @param correlationData Customer provided key, value pairs that will be returned in Job and JobOutput - * state events. - * @return the next definition stage. - */ - Update withCorrelationData(Map correlationData); - } - } - /** - * 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); - - /** - * Cancel 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 cancelJob(); - - /** - * Cancel 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. - * @return the response. - */ - Response cancelJobWithResponse(Context context); -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobCollection.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobCollection.java deleted file mode 100644 index c98658d6a07d5..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobCollection.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.mediaservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.mediaservices.fluent.models.JobInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A collection of Job items. */ -@Fluent -public final class JobCollection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobCollection.class); - - /* - * A collection of Job 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 = "@odata.nextLink") - private String odataNextLink; - - /** - * Get the value property: A collection of Job items. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A collection of Job items. - * - * @param value the value value to set. - * @return the JobCollection object itself. - */ - public JobCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the odataNextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @return the odataNextLink value. - */ - public String odataNextLink() { - return this.odataNextLink; - } - - /** - * Set the odataNextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @param odataNextLink the odataNextLink value to set. - * @return the JobCollection object itself. - */ - public JobCollection withOdataNextLink(String odataNextLink) { - this.odataNextLink = odataNextLink; - 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/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobError.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobError.java deleted file mode 100644 index bef6e1004411d..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobError.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.mediaservices.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; - -/** Details of JobOutput errors. */ -@Immutable -public final class JobError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobError.class); - - /* - * Error code describing the error. - */ - @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) - private JobErrorCode code; - - /* - * A human-readable language-dependent representation of the error. - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /* - * Helps with categorization of errors. - */ - @JsonProperty(value = "category", access = JsonProperty.Access.WRITE_ONLY) - private JobErrorCategory category; - - /* - * Indicates that it may be possible to retry the Job. If retry is - * unsuccessful, please contact Azure support via Azure Portal. - */ - @JsonProperty(value = "retry", access = JsonProperty.Access.WRITE_ONLY) - private JobRetry retry; - - /* - * An array of details about specific errors that led to this reported - * error. - */ - @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) - private List details; - - /** - * Get the code property: Error code describing the error. - * - * @return the code value. - */ - public JobErrorCode code() { - return this.code; - } - - /** - * Get the message property: A human-readable language-dependent representation of the error. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the category property: Helps with categorization of errors. - * - * @return the category value. - */ - public JobErrorCategory category() { - return this.category; - } - - /** - * Get the retry property: Indicates that it may be possible to retry the Job. If retry is unsuccessful, please - * contact Azure support via Azure Portal. - * - * @return the retry value. - */ - public JobRetry retry() { - return this.retry; - } - - /** - * Get the details property: An array of details about specific errors that led to this reported 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/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobErrorCategory.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobErrorCategory.java deleted file mode 100644 index 2f4e549d981c0..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobErrorCategory.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for JobErrorCategory. */ -public final class JobErrorCategory extends ExpandableStringEnum { - /** Static value Service for JobErrorCategory. */ - public static final JobErrorCategory SERVICE = fromString("Service"); - - /** Static value Download for JobErrorCategory. */ - public static final JobErrorCategory DOWNLOAD = fromString("Download"); - - /** Static value Upload for JobErrorCategory. */ - public static final JobErrorCategory UPLOAD = fromString("Upload"); - - /** Static value Configuration for JobErrorCategory. */ - public static final JobErrorCategory CONFIGURATION = fromString("Configuration"); - - /** Static value Content for JobErrorCategory. */ - public static final JobErrorCategory CONTENT = fromString("Content"); - - /** - * Creates or finds a JobErrorCategory from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobErrorCategory. - */ - @JsonCreator - public static JobErrorCategory fromString(String name) { - return fromString(name, JobErrorCategory.class); - } - - /** @return known JobErrorCategory values. */ - public static Collection values() { - return values(JobErrorCategory.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobErrorCode.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobErrorCode.java deleted file mode 100644 index 636eb42c96dd1..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobErrorCode.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for JobErrorCode. */ -public final class JobErrorCode extends ExpandableStringEnum { - /** Static value ServiceError for JobErrorCode. */ - public static final JobErrorCode SERVICE_ERROR = fromString("ServiceError"); - - /** Static value ServiceTransientError for JobErrorCode. */ - public static final JobErrorCode SERVICE_TRANSIENT_ERROR = fromString("ServiceTransientError"); - - /** Static value DownloadNotAccessible for JobErrorCode. */ - public static final JobErrorCode DOWNLOAD_NOT_ACCESSIBLE = fromString("DownloadNotAccessible"); - - /** Static value DownloadTransientError for JobErrorCode. */ - public static final JobErrorCode DOWNLOAD_TRANSIENT_ERROR = fromString("DownloadTransientError"); - - /** Static value UploadNotAccessible for JobErrorCode. */ - public static final JobErrorCode UPLOAD_NOT_ACCESSIBLE = fromString("UploadNotAccessible"); - - /** Static value UploadTransientError for JobErrorCode. */ - public static final JobErrorCode UPLOAD_TRANSIENT_ERROR = fromString("UploadTransientError"); - - /** Static value ConfigurationUnsupported for JobErrorCode. */ - public static final JobErrorCode CONFIGURATION_UNSUPPORTED = fromString("ConfigurationUnsupported"); - - /** Static value ContentMalformed for JobErrorCode. */ - public static final JobErrorCode CONTENT_MALFORMED = fromString("ContentMalformed"); - - /** Static value ContentUnsupported for JobErrorCode. */ - public static final JobErrorCode CONTENT_UNSUPPORTED = fromString("ContentUnsupported"); - - /** - * Creates or finds a JobErrorCode from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobErrorCode. - */ - @JsonCreator - public static JobErrorCode fromString(String name) { - return fromString(name, JobErrorCode.class); - } - - /** @return known JobErrorCode values. */ - public static Collection values() { - return values(JobErrorCode.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInput.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInput.java deleted file mode 100644 index b2094712c44b0..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInput.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.mediaservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base class for inputs to a Job. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = JobInput.class) -@JsonTypeName("JobInput") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.Media.JobInputClip", value = JobInputClip.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.JobInputs", value = JobInputs.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.JobInputSequence", value = JobInputSequence.class) -}) -@JsonFlatten -@Immutable -public class JobInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobInput.class); - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputAsset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputAsset.java deleted file mode 100644 index 4dc34aaa02710..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputAsset.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Represents an Asset for input into a Job. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.JobInputAsset") -@JsonFlatten -@Fluent -public class JobInputAsset extends JobInputClip { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobInputAsset.class); - - /* - * The name of the input Asset. - */ - @JsonProperty(value = "assetName", required = true) - private String assetName; - - /** - * Get the assetName property: The name of the input Asset. - * - * @return the assetName value. - */ - public String assetName() { - return this.assetName; - } - - /** - * Set the assetName property: The name of the input Asset. - * - * @param assetName the assetName value to set. - * @return the JobInputAsset object itself. - */ - public JobInputAsset withAssetName(String assetName) { - this.assetName = assetName; - return this; - } - - /** {@inheritDoc} */ - @Override - public JobInputAsset withFiles(List files) { - super.withFiles(files); - return this; - } - - /** {@inheritDoc} */ - @Override - public JobInputAsset withStart(ClipTime start) { - super.withStart(start); - return this; - } - - /** {@inheritDoc} */ - @Override - public JobInputAsset withEnd(ClipTime end) { - super.withEnd(end); - return this; - } - - /** {@inheritDoc} */ - @Override - public JobInputAsset withLabel(String label) { - super.withLabel(label); - return this; - } - - /** {@inheritDoc} */ - @Override - public JobInputAsset withInputDefinitions(List inputDefinitions) { - super.withInputDefinitions(inputDefinitions); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (assetName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property assetName in model JobInputAsset")); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputClip.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputClip.java deleted file mode 100644 index 2802ddc681dff..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputClip.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Represents input files for a Job. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = JobInputClip.class) -@JsonTypeName("#Microsoft.Media.JobInputClip") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.Media.JobInputAsset", value = JobInputAsset.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.JobInputHttp", value = JobInputHttp.class) -}) -@JsonFlatten -@Fluent -public class JobInputClip extends JobInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobInputClip.class); - - /* - * List of files. Required for JobInputHttp. Maximum of 4000 characters - * each. - */ - @JsonProperty(value = "files") - private List files; - - /* - * Defines a point on the timeline of the input media at which processing - * will start. Defaults to the beginning of the input media. - */ - @JsonProperty(value = "start") - private ClipTime start; - - /* - * Defines a point on the timeline of the input media at which processing - * will end. Defaults to the end of the input media. - */ - @JsonProperty(value = "end") - private ClipTime end; - - /* - * A label that is assigned to a JobInputClip, that is used to satisfy a - * reference used in the Transform. For example, a Transform can be - * authored so as to take an image file with the label 'xyz' and apply it - * as an overlay onto the input video before it is encoded. When submitting - * a Job, exactly one of the JobInputs should be the image file, and it - * should have the label 'xyz'. - */ - @JsonProperty(value = "label") - private String label; - - /* - * Defines a list of InputDefinitions. For each InputDefinition, it defines - * a list of track selections and related metadata. - */ - @JsonProperty(value = "inputDefinitions") - private List inputDefinitions; - - /** - * Get the files property: List of files. Required for JobInputHttp. Maximum of 4000 characters each. - * - * @return the files value. - */ - public List files() { - return this.files; - } - - /** - * Set the files property: List of files. Required for JobInputHttp. Maximum of 4000 characters each. - * - * @param files the files value to set. - * @return the JobInputClip object itself. - */ - public JobInputClip withFiles(List files) { - this.files = files; - return this; - } - - /** - * Get the start property: Defines a point on the timeline of the input media at which processing will start. - * Defaults to the beginning of the input media. - * - * @return the start value. - */ - public ClipTime start() { - return this.start; - } - - /** - * Set the start property: Defines a point on the timeline of the input media at which processing will start. - * Defaults to the beginning of the input media. - * - * @param start the start value to set. - * @return the JobInputClip object itself. - */ - public JobInputClip withStart(ClipTime start) { - this.start = start; - return this; - } - - /** - * Get the end property: Defines a point on the timeline of the input media at which processing will end. Defaults - * to the end of the input media. - * - * @return the end value. - */ - public ClipTime end() { - return this.end; - } - - /** - * Set the end property: Defines a point on the timeline of the input media at which processing will end. Defaults - * to the end of the input media. - * - * @param end the end value to set. - * @return the JobInputClip object itself. - */ - public JobInputClip withEnd(ClipTime end) { - this.end = end; - return this; - } - - /** - * Get the label property: A label that is assigned to a JobInputClip, that is used to satisfy a reference used in - * the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and - * apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the - * JobInputs should be the image file, and it should have the label 'xyz'. - * - * @return the label value. - */ - public String label() { - return this.label; - } - - /** - * Set the label property: A label that is assigned to a JobInputClip, that is used to satisfy a reference used in - * the Transform. For example, a Transform can be authored so as to take an image file with the label 'xyz' and - * apply it as an overlay onto the input video before it is encoded. When submitting a Job, exactly one of the - * JobInputs should be the image file, and it should have the label 'xyz'. - * - * @param label the label value to set. - * @return the JobInputClip object itself. - */ - public JobInputClip withLabel(String label) { - this.label = label; - return this; - } - - /** - * Get the inputDefinitions property: Defines a list of InputDefinitions. For each InputDefinition, it defines a - * list of track selections and related metadata. - * - * @return the inputDefinitions value. - */ - public List inputDefinitions() { - return this.inputDefinitions; - } - - /** - * Set the inputDefinitions property: Defines a list of InputDefinitions. For each InputDefinition, it defines a - * list of track selections and related metadata. - * - * @param inputDefinitions the inputDefinitions value to set. - * @return the JobInputClip object itself. - */ - public JobInputClip withInputDefinitions(List inputDefinitions) { - this.inputDefinitions = inputDefinitions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (start() != null) { - start().validate(); - } - if (end() != null) { - end().validate(); - } - if (inputDefinitions() != null) { - inputDefinitions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputHttp.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputHttp.java deleted file mode 100644 index 0a085e9c9e451..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputHttp.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Represents HTTPS job input. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.JobInputHttp") -@JsonFlatten -@Fluent -public class JobInputHttp extends JobInputClip { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobInputHttp.class); - - /* - * Base URI for HTTPS job input. It will be concatenated with provided file - * names. If no base uri is given, then the provided file list is assumed - * to be fully qualified uris. Maximum length of 4000 characters. - */ - @JsonProperty(value = "baseUri") - private String baseUri; - - /** - * Get the baseUri property: Base URI for HTTPS job input. It will be concatenated with provided file names. If no - * base uri is given, then the provided file list is assumed to be fully qualified uris. Maximum length of 4000 - * characters. - * - * @return the baseUri value. - */ - public String baseUri() { - return this.baseUri; - } - - /** - * Set the baseUri property: Base URI for HTTPS job input. It will be concatenated with provided file names. If no - * base uri is given, then the provided file list is assumed to be fully qualified uris. Maximum length of 4000 - * characters. - * - * @param baseUri the baseUri value to set. - * @return the JobInputHttp object itself. - */ - public JobInputHttp withBaseUri(String baseUri) { - this.baseUri = baseUri; - return this; - } - - /** {@inheritDoc} */ - @Override - public JobInputHttp withFiles(List files) { - super.withFiles(files); - return this; - } - - /** {@inheritDoc} */ - @Override - public JobInputHttp withStart(ClipTime start) { - super.withStart(start); - return this; - } - - /** {@inheritDoc} */ - @Override - public JobInputHttp withEnd(ClipTime end) { - super.withEnd(end); - return this; - } - - /** {@inheritDoc} */ - @Override - public JobInputHttp withLabel(String label) { - super.withLabel(label); - return this; - } - - /** {@inheritDoc} */ - @Override - public JobInputHttp withInputDefinitions(List inputDefinitions) { - super.withInputDefinitions(inputDefinitions); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputSequence.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputSequence.java deleted file mode 100644 index 71d9ce30f7dfe..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputSequence.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** - * A Sequence contains an ordered list of Clips where each clip is a JobInput. The Sequence will be treated as a single - * input. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.JobInputSequence") -@JsonFlatten -@Fluent -public class JobInputSequence extends JobInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobInputSequence.class); - - /* - * JobInputs that make up the timeline. - */ - @JsonProperty(value = "inputs") - private List inputs; - - /** - * Get the inputs property: JobInputs that make up the timeline. - * - * @return the inputs value. - */ - public List inputs() { - return this.inputs; - } - - /** - * Set the inputs property: JobInputs that make up the timeline. - * - * @param inputs the inputs value to set. - * @return the JobInputSequence object itself. - */ - public JobInputSequence withInputs(List inputs) { - this.inputs = inputs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (inputs() != null) { - inputs().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputs.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputs.java deleted file mode 100644 index c1f095f8012d3..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobInputs.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Describes a list of inputs to a Job. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.JobInputs") -@JsonFlatten -@Fluent -public class JobInputs extends JobInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobInputs.class); - - /* - * List of inputs to a Job. - */ - @JsonProperty(value = "inputs") - private List inputs; - - /** - * Get the inputs property: List of inputs to a Job. - * - * @return the inputs value. - */ - public List inputs() { - return this.inputs; - } - - /** - * Set the inputs property: List of inputs to a Job. - * - * @param inputs the inputs value to set. - * @return the JobInputs object itself. - */ - public JobInputs withInputs(List inputs) { - this.inputs = inputs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (inputs() != null) { - inputs().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobOutput.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobOutput.java deleted file mode 100644 index 9963bdf4de47c..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobOutput.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** Describes all the properties of a JobOutput. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = JobOutput.class) -@JsonTypeName("JobOutput") -@JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.Media.JobOutputAsset", value = JobOutputAsset.class)}) -@JsonFlatten -@Fluent -public class JobOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobOutput.class); - - /* - * If the JobOutput is in the Error state, it contains the details of the - * error. - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private JobError error; - - /* - * Describes the state of the JobOutput. - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private JobState state; - - /* - * If the JobOutput is in a Processing state, this contains the Job - * completion percentage. The value is an estimate and not intended to be - * used to predict Job completion times. To determine if the JobOutput is - * complete, use the State property. - */ - @JsonProperty(value = "progress", access = JsonProperty.Access.WRITE_ONLY) - private Integer progress; - - /* - * A label that is assigned to a JobOutput in order to help uniquely - * identify it. This is useful when your Transform has more than one - * TransformOutput, whereby your Job has more than one JobOutput. In such - * cases, when you submit the Job, you will add two or more JobOutputs, in - * the same order as TransformOutputs in the Transform. Subsequently, when - * you retrieve the Job, either through events or on a GET request, you can - * use the label to easily identify the JobOutput. If a label is not - * provided, a default value of '{presetName}_{outputIndex}' will be used, - * where the preset name is the name of the preset in the corresponding - * TransformOutput and the output index is the relative index of the this - * JobOutput within the Job. Note that this index is the same as the - * relative index of the corresponding TransformOutput within its - * Transform. - */ - @JsonProperty(value = "label") - private String label; - - /* - * The UTC date and time at which this Job Output began processing. - */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startTime; - - /* - * The UTC date and time at which this Job Output finished processing. - */ - @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endTime; - - /** - * Get the error property: If the JobOutput is in the Error state, it contains the details of the error. - * - * @return the error value. - */ - public JobError error() { - return this.error; - } - - /** - * Get the state property: Describes the state of the JobOutput. - * - * @return the state value. - */ - public JobState state() { - return this.state; - } - - /** - * Get the progress property: If the JobOutput is in a Processing state, this contains the Job completion - * percentage. The value is an estimate and not intended to be used to predict Job completion times. To determine if - * the JobOutput is complete, use the State property. - * - * @return the progress value. - */ - public Integer progress() { - return this.progress; - } - - /** - * Get the label property: A label that is assigned to a JobOutput in order to help uniquely identify it. This is - * useful when your Transform has more than one TransformOutput, whereby your Job has more than one JobOutput. In - * such cases, when you submit the Job, you will add two or more JobOutputs, in the same order as TransformOutputs - * in the Transform. Subsequently, when you retrieve the Job, either through events or on a GET request, you can use - * the label to easily identify the JobOutput. If a label is not provided, a default value of - * '{presetName}_{outputIndex}' will be used, where the preset name is the name of the preset in the corresponding - * TransformOutput and the output index is the relative index of the this JobOutput within the Job. Note that this - * index is the same as the relative index of the corresponding TransformOutput within its Transform. - * - * @return the label value. - */ - public String label() { - return this.label; - } - - /** - * Set the label property: A label that is assigned to a JobOutput in order to help uniquely identify it. This is - * useful when your Transform has more than one TransformOutput, whereby your Job has more than one JobOutput. In - * such cases, when you submit the Job, you will add two or more JobOutputs, in the same order as TransformOutputs - * in the Transform. Subsequently, when you retrieve the Job, either through events or on a GET request, you can use - * the label to easily identify the JobOutput. If a label is not provided, a default value of - * '{presetName}_{outputIndex}' will be used, where the preset name is the name of the preset in the corresponding - * TransformOutput and the output index is the relative index of the this JobOutput within the Job. Note that this - * index is the same as the relative index of the corresponding TransformOutput within its Transform. - * - * @param label the label value to set. - * @return the JobOutput object itself. - */ - public JobOutput withLabel(String label) { - this.label = label; - return this; - } - - /** - * Get the startTime property: The UTC date and time at which this Job Output began processing. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the endTime property: The UTC date and time at which this Job Output finished processing. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (error() != null) { - error().validate(); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobOutputAsset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobOutputAsset.java deleted file mode 100644 index a82c9b503f343..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobOutputAsset.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Represents an Asset used as a JobOutput. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.JobOutputAsset") -@JsonFlatten -@Fluent -public class JobOutputAsset extends JobOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobOutputAsset.class); - - /* - * The name of the output Asset. - */ - @JsonProperty(value = "assetName", required = true) - private String assetName; - - /** - * Get the assetName property: The name of the output Asset. - * - * @return the assetName value. - */ - public String assetName() { - return this.assetName; - } - - /** - * Set the assetName property: The name of the output Asset. - * - * @param assetName the assetName value to set. - * @return the JobOutputAsset object itself. - */ - public JobOutputAsset withAssetName(String assetName) { - this.assetName = assetName; - return this; - } - - /** {@inheritDoc} */ - @Override - public JobOutputAsset withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (assetName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property assetName in model JobOutputAsset")); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobRetry.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobRetry.java deleted file mode 100644 index 63610c1f43228..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobRetry.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for JobRetry. */ -public final class JobRetry extends ExpandableStringEnum { - /** Static value DoNotRetry for JobRetry. */ - public static final JobRetry DO_NOT_RETRY = fromString("DoNotRetry"); - - /** Static value MayRetry for JobRetry. */ - public static final JobRetry MAY_RETRY = fromString("MayRetry"); - - /** - * Creates or finds a JobRetry from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobRetry. - */ - @JsonCreator - public static JobRetry fromString(String name) { - return fromString(name, JobRetry.class); - } - - /** @return known JobRetry values. */ - public static Collection values() { - return values(JobRetry.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobState.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobState.java deleted file mode 100644 index 5d9245c542f53..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobState.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for JobState. */ -public final class JobState extends ExpandableStringEnum { - /** Static value Canceled for JobState. */ - public static final JobState CANCELED = fromString("Canceled"); - - /** Static value Canceling for JobState. */ - public static final JobState CANCELING = fromString("Canceling"); - - /** Static value Error for JobState. */ - public static final JobState ERROR = fromString("Error"); - - /** Static value Finished for JobState. */ - public static final JobState FINISHED = fromString("Finished"); - - /** Static value Processing for JobState. */ - public static final JobState PROCESSING = fromString("Processing"); - - /** Static value Queued for JobState. */ - public static final JobState QUEUED = fromString("Queued"); - - /** Static value Scheduled for JobState. */ - public static final JobState SCHEDULED = fromString("Scheduled"); - - /** - * Creates or finds a JobState from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobState. - */ - @JsonCreator - public static JobState fromString(String name) { - return fromString(name, JobState.class); - } - - /** @return known JobState values. */ - public static Collection values() { - return values(JobState.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Jobs.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Jobs.java deleted file mode 100644 index 3bd5954043c36..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Jobs.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.mediaservices.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 { - /** - * Lists all of the Jobs for the Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 Job items. - */ - PagedIterable list(String resourceGroupName, String accountName, String transformName); - - /** - * Lists all of the Jobs for the Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param filter Restricts the set of items returned. - * @param orderby Specifies the key by which the result collection should be ordered. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 Job items. - */ - PagedIterable list( - String resourceGroupName, - String accountName, - String transformName, - String filter, - String orderby, - Context context); - - /** - * Gets a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job. - */ - Job get(String resourceGroupName, String accountName, String transformName, String jobName); - - /** - * Gets a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 a Job. - */ - Response getWithResponse( - String resourceGroupName, String accountName, String transformName, String jobName, Context context); - - /** - * Deletes a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 transformName, String jobName); - - /** - * Deletes a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 response. - */ - Response deleteWithResponse( - String resourceGroupName, String accountName, String transformName, String jobName, Context context); - - /** - * Cancel a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 cancelJob(String resourceGroupName, String accountName, String transformName, String jobName); - - /** - * Cancel a Job. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform name. - * @param jobName The 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 response. - */ - Response cancelJobWithResponse( - String resourceGroupName, String accountName, String transformName, String jobName, Context context); - - /** - * Gets 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 a Job. - */ - Job getById(String id); - - /** - * Gets 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 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. - * @return the response. - */ - Response 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/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgFormat.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgFormat.java deleted file mode 100644 index ea2441bae170c..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgFormat.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.mediaservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -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; - -/** Describes the settings for producing JPEG thumbnails. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.JpgFormat") -@JsonFlatten -@Immutable -public class JpgFormat extends ImageFormat { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JpgFormat.class); - - /** {@inheritDoc} */ - @Override - public JpgFormat withFilenamePattern(String filenamePattern) { - super.withFilenamePattern(filenamePattern); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgImage.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgImage.java deleted file mode 100644 index bf195417d9f8a..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgImage.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; -import java.util.List; - -/** Describes the properties for producing a series of JPEG images from the input video. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.JpgImage") -@JsonFlatten -@Fluent -public class JpgImage extends Image { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JpgImage.class); - - /* - * A collection of output JPEG image layers to be produced by the encoder. - */ - @JsonProperty(value = "layers") - private List layers; - - /* - * Sets the number of columns used in thumbnail sprite image. The number - * of rows are automatically calculated and a VTT file is generated with - * the coordinate mappings for each thumbnail in the sprite. Note: this - * value should be a positive integer and a proper value is recommended so - * that the output image resolution will not go beyond JPEG maximum pixel - * resolution limit 65535x65535. - */ - @JsonProperty(value = "spriteColumn") - private Integer spriteColumn; - - /** - * Get the layers property: A collection of output JPEG image layers to be produced by the encoder. - * - * @return the layers value. - */ - public List layers() { - return this.layers; - } - - /** - * Set the layers property: A collection of output JPEG image layers to be produced by the encoder. - * - * @param layers the layers value to set. - * @return the JpgImage object itself. - */ - public JpgImage withLayers(List layers) { - this.layers = layers; - return this; - } - - /** - * Get the spriteColumn property: Sets the number of columns used in thumbnail sprite image. The number of rows are - * automatically calculated and a VTT file is generated with the coordinate mappings for each thumbnail in the - * sprite. Note: this value should be a positive integer and a proper value is recommended so that the output image - * resolution will not go beyond JPEG maximum pixel resolution limit 65535x65535. - * - * @return the spriteColumn value. - */ - public Integer spriteColumn() { - return this.spriteColumn; - } - - /** - * Set the spriteColumn property: Sets the number of columns used in thumbnail sprite image. The number of rows are - * automatically calculated and a VTT file is generated with the coordinate mappings for each thumbnail in the - * sprite. Note: this value should be a positive integer and a proper value is recommended so that the output image - * resolution will not go beyond JPEG maximum pixel resolution limit 65535x65535. - * - * @param spriteColumn the spriteColumn value to set. - * @return the JpgImage object itself. - */ - public JpgImage withSpriteColumn(Integer spriteColumn) { - this.spriteColumn = spriteColumn; - return this; - } - - /** {@inheritDoc} */ - @Override - public JpgImage withStart(String start) { - super.withStart(start); - return this; - } - - /** {@inheritDoc} */ - @Override - public JpgImage withStep(String step) { - super.withStep(step); - return this; - } - - /** {@inheritDoc} */ - @Override - public JpgImage withRange(String range) { - super.withRange(range); - return this; - } - - /** {@inheritDoc} */ - @Override - public JpgImage withKeyFrameInterval(Duration keyFrameInterval) { - super.withKeyFrameInterval(keyFrameInterval); - return this; - } - - /** {@inheritDoc} */ - @Override - public JpgImage withStretchMode(StretchMode stretchMode) { - super.withStretchMode(stretchMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public JpgImage withSyncMode(VideoSyncMode syncMode) { - super.withSyncMode(syncMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public JpgImage withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (layers() != null) { - layers().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgLayer.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgLayer.java deleted file mode 100644 index f5a1d7827c7ed..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JpgLayer.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes the settings to produce a JPEG image from the input video. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.JpgLayer") -@JsonFlatten -@Fluent -public class JpgLayer extends Layer { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JpgLayer.class); - - /* - * The compression quality of the JPEG output. Range is from 0-100 and the - * default is 70. - */ - @JsonProperty(value = "quality") - private Integer quality; - - /** - * Get the quality property: The compression quality of the JPEG output. Range is from 0-100 and the default is 70. - * - * @return the quality value. - */ - public Integer quality() { - return this.quality; - } - - /** - * Set the quality property: The compression quality of the JPEG output. Range is from 0-100 and the default is 70. - * - * @param quality the quality value to set. - * @return the JpgLayer object itself. - */ - public JpgLayer withQuality(Integer quality) { - this.quality = quality; - return this; - } - - /** {@inheritDoc} */ - @Override - public JpgLayer withWidth(String width) { - super.withWidth(width); - return this; - } - - /** {@inheritDoc} */ - @Override - public JpgLayer withHeight(String height) { - super.withHeight(height); - return this; - } - - /** {@inheritDoc} */ - @Override - public JpgLayer withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Layer.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Layer.java deleted file mode 100644 index b0906100916b3..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Layer.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * The encoder can be configured to produce video and/or images (thumbnails) at different resolutions, by specifying a - * layer for each desired resolution. A layer represents the properties for the video or image at a resolution. - */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = Layer.class) -@JsonTypeName("Layer") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.Media.H265VideoLayer", value = H265VideoLayer.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.VideoLayer", value = VideoLayer.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.JpgLayer", value = JpgLayer.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.PngLayer", value = PngLayer.class) -}) -@JsonFlatten -@Fluent -public class Layer { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Layer.class); - - /* - * The width of the output video for this layer. The value can be absolute - * (in pixels) or relative (in percentage). For example 50% means the - * output video has half as many pixels in width as the input. - */ - @JsonProperty(value = "width") - private String width; - - /* - * The height of the output video for this layer. The value can be absolute - * (in pixels) or relative (in percentage). For example 50% means the - * output video has half as many pixels in height as the input. - */ - @JsonProperty(value = "height") - private String height; - - /* - * The alphanumeric label for this layer, which can be used in multiplexing - * different video and audio layers, or in naming the output file. - */ - @JsonProperty(value = "label") - private String label; - - /** - * Get the width property: The width of the output video for this layer. The value can be absolute (in pixels) or - * relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. - * - * @return the width value. - */ - public String width() { - return this.width; - } - - /** - * Set the width property: The width of the output video for this layer. The value can be absolute (in pixels) or - * relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. - * - * @param width the width value to set. - * @return the Layer object itself. - */ - public Layer withWidth(String width) { - this.width = width; - return this; - } - - /** - * Get the height property: The height of the output video for this layer. The value can be absolute (in pixels) or - * relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. - * - * @return the height value. - */ - public String height() { - return this.height; - } - - /** - * Set the height property: The height of the output video for this layer. The value can be absolute (in pixels) or - * relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. - * - * @param height the height value to set. - * @return the Layer object itself. - */ - public Layer withHeight(String height) { - this.height = height; - return this; - } - - /** - * Get the label property: The alphanumeric label for this layer, which can be used in multiplexing different video - * and audio layers, or in naming the output file. - * - * @return the label value. - */ - public String label() { - return this.label; - } - - /** - * Set the label property: The alphanumeric label for this layer, which can be used in multiplexing different video - * and audio layers, or in naming the output file. - * - * @param label the label value to set. - * @return the Layer object itself. - */ - public Layer withLabel(String label) { - this.label = label; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEventEncodingType.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEventEncodingType.java index 4a1f3312b2614..64a283b7b1f4f 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEventEncodingType.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEventEncodingType.java @@ -19,6 +19,12 @@ public final class LiveEventEncodingType extends ExpandableStringEnum { - /** Static value SystemAssigned for ManagedIdentityType. */ - public static final ManagedIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** Static value None for ManagedIdentityType. */ - public static final ManagedIdentityType NONE = fromString("None"); - - /** - * Creates or finds a ManagedIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedIdentityType. - */ - @JsonCreator - public static ManagedIdentityType fromString(String name) { - return fromString(name, ManagedIdentityType.class); - } - - /** @return known ManagedIdentityType values. */ - public static Collection values() { - return values(ManagedIdentityType.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaService.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaService.java index 8829cfa1f91bd..96a0e20b02c5c 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaService.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaService.java @@ -99,6 +99,14 @@ public interface MediaService { */ KeyDelivery keyDelivery(); + /** + * Gets the publicNetworkAccess property: Whether or not public network access is allowed for resources under the + * Media Services account. + * + * @return the publicNetworkAccess value. + */ + PublicNetworkAccess publicNetworkAccess(); + /** * Gets the region of the resource. * @@ -170,7 +178,8 @@ interface WithCreate DefinitionStages.WithStorageAccounts, DefinitionStages.WithStorageAuthentication, DefinitionStages.WithEncryption, - DefinitionStages.WithKeyDelivery { + DefinitionStages.WithKeyDelivery, + DefinitionStages.WithPublicNetworkAccess { /** * Executes the create request. * @@ -246,6 +255,18 @@ interface WithKeyDelivery { */ WithCreate withKeyDelivery(KeyDelivery keyDelivery); } + /** The stage of the MediaService definition allowing to specify publicNetworkAccess. */ + interface WithPublicNetworkAccess { + /** + * Specifies the publicNetworkAccess property: Whether or not public network access is allowed for resources + * under the Media Services account.. + * + * @param publicNetworkAccess Whether or not public network access is allowed for resources under the Media + * Services account. + * @return the next definition stage. + */ + WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + } } /** * Begins update for the MediaService resource. @@ -261,7 +282,8 @@ interface Update UpdateStages.WithStorageAccounts, UpdateStages.WithStorageAuthentication, UpdateStages.WithEncryption, - UpdateStages.WithKeyDelivery { + UpdateStages.WithKeyDelivery, + UpdateStages.WithPublicNetworkAccess { /** * Executes the update request. * @@ -339,6 +361,18 @@ interface WithKeyDelivery { */ Update withKeyDelivery(KeyDelivery keyDelivery); } + /** The stage of the MediaService update allowing to specify publicNetworkAccess. */ + interface WithPublicNetworkAccess { + /** + * Specifies the publicNetworkAccess property: Whether or not public network access is allowed for resources + * under the Media Services account.. + * + * @param publicNetworkAccess Whether or not public network access is allowed for resources under the Media + * Services account. + * @return the next definition stage. + */ + Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceIdentity.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceIdentity.java index 9375b1537d515..f839364786eb4 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceIdentity.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceIdentity.java @@ -8,6 +8,8 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; +import java.util.UUID; /** The MediaServiceIdentity model. */ @Fluent @@ -18,26 +20,32 @@ public class MediaServiceIdentity { * The identity type. */ @JsonProperty(value = "type", required = true) - private ManagedIdentityType type; + private String type; /* * The Principal ID of the identity. */ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private String principalId; + private UUID principalId; /* * The Tenant ID of the identity. */ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; + private UUID tenantId; + + /* + * The user assigned managed identities. + */ + @JsonProperty(value = "userAssignedIdentities") + private Map userAssignedIdentities; /** * Get the type property: The identity type. * * @return the type value. */ - public ManagedIdentityType type() { + public String type() { return this.type; } @@ -47,7 +55,7 @@ public ManagedIdentityType type() { * @param type the type value to set. * @return the MediaServiceIdentity object itself. */ - public MediaServiceIdentity withType(ManagedIdentityType type) { + public MediaServiceIdentity withType(String type) { this.type = type; return this; } @@ -57,7 +65,7 @@ public MediaServiceIdentity withType(ManagedIdentityType type) { * * @return the principalId value. */ - public String principalId() { + public UUID principalId() { return this.principalId; } @@ -66,10 +74,31 @@ public String principalId() { * * @return the tenantId value. */ - public String tenantId() { + public UUID tenantId() { return this.tenantId; } + /** + * 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 MediaServiceIdentity object itself. + */ + public MediaServiceIdentity withUserAssignedIdentities( + Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + /** * Validates the instance. * @@ -81,5 +110,15 @@ public void validate() { .logExceptionAsError( new IllegalArgumentException("Missing required property type in model MediaServiceIdentity")); } + if (userAssignedIdentities() != null) { + userAssignedIdentities() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceUpdate.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceUpdate.java index a90b0eb769cf6..3f821c400a369 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceUpdate.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceUpdate.java @@ -61,6 +61,13 @@ public class MediaServiceUpdate { @JsonProperty(value = "properties.keyDelivery") private KeyDelivery keyDelivery; + /* + * Whether or not public network access is allowed for resources under the + * Media Services account. + */ + @JsonProperty(value = "properties.publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + /** * Get the tags property: Resource tags. * @@ -190,6 +197,28 @@ public MediaServiceUpdate withKeyDelivery(KeyDelivery keyDelivery) { return this; } + /** + * Get the publicNetworkAccess property: Whether or not public network access is allowed for resources under the + * Media Services 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 + * Media Services account. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the MediaServiceUpdate object itself. + */ + public MediaServiceUpdate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + /** * Validates the instance. * diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mp4Format.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mp4Format.java deleted file mode 100644 index a3dca339d12d0..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mp4Format.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.mediaservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -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; -import java.util.List; - -/** Describes the properties for an output ISO MP4 file. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.Mp4Format") -@JsonFlatten -@Immutable -public class Mp4Format extends MultiBitrateFormat { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Mp4Format.class); - - /** {@inheritDoc} */ - @Override - public Mp4Format withOutputFiles(List outputFiles) { - super.withOutputFiles(outputFiles); - return this; - } - - /** {@inheritDoc} */ - @Override - public Mp4Format withFilenamePattern(String filenamePattern) { - super.withFilenamePattern(filenamePattern); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MultiBitrateFormat.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MultiBitrateFormat.java deleted file mode 100644 index 3c4adb7e0ec84..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MultiBitrateFormat.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** - * Describes the properties for producing a collection of GOP aligned multi-bitrate files. The default behavior is to - * produce one output file for each video layer which is muxed together with all the audios. The exact output files - * produced can be controlled by specifying the outputFiles collection. - */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = MultiBitrateFormat.class) -@JsonTypeName("#Microsoft.Media.MultiBitrateFormat") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.Media.Mp4Format", value = Mp4Format.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.TransportStreamFormat", value = TransportStreamFormat.class) -}) -@JsonFlatten -@Fluent -public class MultiBitrateFormat extends Format { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MultiBitrateFormat.class); - - /* - * The list of output files to produce. Each entry in the list is a set of - * audio and video layer labels to be muxed together . - */ - @JsonProperty(value = "outputFiles") - private List outputFiles; - - /** - * Get the outputFiles property: The list of output files to produce. Each entry in the list is a set of audio and - * video layer labels to be muxed together . - * - * @return the outputFiles value. - */ - public List outputFiles() { - return this.outputFiles; - } - - /** - * Set the outputFiles property: The list of output files to produce. Each entry in the list is a set of audio and - * video layer labels to be muxed together . - * - * @param outputFiles the outputFiles value to set. - * @return the MultiBitrateFormat object itself. - */ - public MultiBitrateFormat withOutputFiles(List outputFiles) { - this.outputFiles = outputFiles; - return this; - } - - /** {@inheritDoc} */ - @Override - public MultiBitrateFormat withFilenamePattern(String filenamePattern) { - super.withFilenamePattern(filenamePattern); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (outputFiles() != null) { - outputFiles().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OnErrorType.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OnErrorType.java deleted file mode 100644 index 7266b24c776fa..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OnErrorType.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OnErrorType. */ -public final class OnErrorType extends ExpandableStringEnum { - /** Static value StopProcessingJob for OnErrorType. */ - public static final OnErrorType STOP_PROCESSING_JOB = fromString("StopProcessingJob"); - - /** Static value ContinueJob for OnErrorType. */ - public static final OnErrorType CONTINUE_JOB = fromString("ContinueJob"); - - /** - * Creates or finds a OnErrorType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OnErrorType. - */ - @JsonCreator - public static OnErrorType fromString(String name) { - return fromString(name, OnErrorType.class); - } - - /** @return known OnErrorType values. */ - public static Collection values() { - return values(OnErrorType.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Operation.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Operation.java index 004125b0ba956..9e71c74b5969f 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Operation.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Operation.java @@ -4,56 +4,187 @@ package com.azure.resourcemanager.mediaservices.models; -import com.azure.resourcemanager.mediaservices.fluent.models.OperationInner; +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 operation. */ +@Fluent +public final class Operation { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Operation.class); + + /* + * 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; -/** An immutable client-side representation of Operation. */ -public interface Operation { /** - * Gets the name property: The operation name. + * Get the name property: The operation name. * * @return the name value. */ - String name(); + public String name() { + return this.name; + } /** - * Gets the display property: The operation display 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. */ - OperationDisplay display(); + public OperationDisplay display() { + return this.display; + } /** - * Gets the origin property: Origin of the operation. + * 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. */ - String origin(); + public String origin() { + return this.origin; + } /** - * Gets the properties property: Operation properties format. + * 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. */ - Properties properties(); + 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; + } /** - * Gets the isDataAction property: Whether the operation applies to data-plane. + * Get the isDataAction property: Whether the operation applies to data-plane. * * @return the isDataAction value. */ - Boolean isDataAction(); + 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; + } /** - * Gets the actionType property: Indicates the action type. + * Get the actionType property: Indicates the action type. * * @return the actionType value. */ - ActionType actionType(); + 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; + } /** - * Gets the inner com.azure.resourcemanager.mediaservices.fluent.models.OperationInner object. + * Validates the instance. * - * @return the inner object. + * @throws IllegalArgumentException thrown if the instance is not valid. */ - OperationInner innerModel(); + 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(); + } + } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationCollection.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationCollection.java index 7ea8f7faf1c1e..b870b57458cec 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationCollection.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OperationCollection.java @@ -4,81 +4,22 @@ package com.azure.resourcemanager.mediaservices.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.mediaservices.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.resourcemanager.mediaservices.fluent.models.OperationCollectionInner; import java.util.List; -/** A collection of Operation items. */ -@Fluent -public final class OperationCollection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationCollection.class); - - /* - * A collection of Operation 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 = "@odata.nextLink") - private String odataNextLink; - +/** An immutable client-side representation of OperationCollection. */ +public interface OperationCollection { /** - * Get the value property: A collection of Operation items. + * Gets 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 OperationCollection object itself. - */ - public OperationCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the odataNextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @return the odataNextLink value. - */ - public String odataNextLink() { - return this.odataNextLink; - } - - /** - * Set the odataNextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @param odataNextLink the odataNextLink value to set. - * @return the OperationCollection object itself. - */ - public OperationCollection withOdataNextLink(String odataNextLink) { - this.odataNextLink = odataNextLink; - return this; - } + List value(); /** - * Validates the instance. + * Gets the inner com.azure.resourcemanager.mediaservices.fluent.models.OperationCollectionInner object. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the inner object. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } + OperationCollectionInner innerModel(); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Operations.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Operations.java index 6d5bed174aa4e..c5e4f0cd4e811 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Operations.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Operations.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.mediaservices.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 Operations. */ @@ -16,7 +16,7 @@ public interface Operations { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a collection of Operation items. */ - PagedIterable list(); + OperationCollection list(); /** * Lists all the Media Services operations. @@ -27,5 +27,5 @@ public interface Operations { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a collection of Operation items. */ - PagedIterable list(Context context); + Response listWithResponse(Context context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OutputFile.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OutputFile.java deleted file mode 100644 index 49630edc3f3f2..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/OutputFile.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices.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; - -/** Represents an output file produced. */ -@Fluent -public final class OutputFile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OutputFile.class); - - /* - * The list of labels that describe how the encoder should multiplex video - * and audio into an output file. For example, if the encoder is producing - * two video layers with labels v1 and v2, and one audio layer with label - * a1, then an array like '[v1, a1]' tells the encoder to produce an output - * file with the video track represented by v1 and the audio track - * represented by a1. - */ - @JsonProperty(value = "labels", required = true) - private List labels; - - /** - * Get the labels property: The list of labels that describe how the encoder should multiplex video and audio into - * an output file. For example, if the encoder is producing two video layers with labels v1 and v2, and one audio - * layer with label a1, then an array like '[v1, a1]' tells the encoder to produce an output file with the video - * track represented by v1 and the audio track represented by a1. - * - * @return the labels value. - */ - public List labels() { - return this.labels; - } - - /** - * Set the labels property: The list of labels that describe how the encoder should multiplex video and audio into - * an output file. For example, if the encoder is producing two video layers with labels v1 and v2, and one audio - * layer with label a1, then an array like '[v1, a1]' tells the encoder to produce an output file with the video - * track represented by v1 and the audio track represented by a1. - * - * @param labels the labels value to set. - * @return the OutputFile object itself. - */ - public OutputFile withLabels(List labels) { - this.labels = labels; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (labels() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property labels in model OutputFile")); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Overlay.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Overlay.java deleted file mode 100644 index 2f7d59a501e40..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Overlay.java +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; - -/** Base type for all overlays - image, audio or video. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = Overlay.class) -@JsonTypeName("Overlay") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.Media.AudioOverlay", value = AudioOverlay.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.VideoOverlay", value = VideoOverlay.class) -}) -@JsonFlatten -@Fluent -public class Overlay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Overlay.class); - - /* - * The label of the job input which is to be used as an overlay. The Input - * must specify exactly one file. You can specify an image file in JPG, - * PNG, GIF or BMP format, or an audio file (such as a WAV, MP3, WMA or M4A - * file), or a video file. See https://aka.ms/mesformats for the complete - * list of supported audio and video file formats. - */ - @JsonProperty(value = "inputLabel", required = true) - private String inputLabel; - - /* - * The start position, with reference to the input video, at which the - * overlay starts. The value should be in ISO 8601 format. For example, - * PT05S to start the overlay at 5 seconds into the input video. If not - * specified the overlay starts from the beginning of the input video. - */ - @JsonProperty(value = "start") - private Duration start; - - /* - * The end position, with reference to the input video, at which the - * overlay ends. The value should be in ISO 8601 format. For example, PT30S - * to end the overlay at 30 seconds into the input video. If not specified - * or the value is greater than the input video duration, the overlay will - * be applied until the end of the input video if the overlay media - * duration is greater than the input video duration, else the overlay will - * last as long as the overlay media duration. - */ - @JsonProperty(value = "end") - private Duration end; - - /* - * The duration over which the overlay fades in onto the input video. The - * value should be in ISO 8601 duration format. If not specified the - * default behavior is to have no fade in (same as PT0S). - */ - @JsonProperty(value = "fadeInDuration") - private Duration fadeInDuration; - - /* - * The duration over which the overlay fades out of the input video. The - * value should be in ISO 8601 duration format. If not specified the - * default behavior is to have no fade out (same as PT0S). - */ - @JsonProperty(value = "fadeOutDuration") - private Duration fadeOutDuration; - - /* - * The gain level of audio in the overlay. The value should be in the range - * [0, 1.0]. The default is 1.0. - */ - @JsonProperty(value = "audioGainLevel") - private Double audioGainLevel; - - /** - * Get the inputLabel property: The label of the job input which is to be used as an overlay. The Input must specify - * exactly one file. You can specify an image file in JPG, PNG, GIF or BMP format, or an audio file (such as a WAV, - * MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete list of supported audio - * and video file formats. - * - * @return the inputLabel value. - */ - public String inputLabel() { - return this.inputLabel; - } - - /** - * Set the inputLabel property: The label of the job input which is to be used as an overlay. The Input must specify - * exactly one file. You can specify an image file in JPG, PNG, GIF or BMP format, or an audio file (such as a WAV, - * MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete list of supported audio - * and video file formats. - * - * @param inputLabel the inputLabel value to set. - * @return the Overlay object itself. - */ - public Overlay withInputLabel(String inputLabel) { - this.inputLabel = inputLabel; - return this; - } - - /** - * Get the start property: The start position, with reference to the input video, at which the overlay starts. The - * value should be in ISO 8601 format. For example, PT05S to start the overlay at 5 seconds into the input video. If - * not specified the overlay starts from the beginning of the input video. - * - * @return the start value. - */ - public Duration start() { - return this.start; - } - - /** - * Set the start property: The start position, with reference to the input video, at which the overlay starts. The - * value should be in ISO 8601 format. For example, PT05S to start the overlay at 5 seconds into the input video. If - * not specified the overlay starts from the beginning of the input video. - * - * @param start the start value to set. - * @return the Overlay object itself. - */ - public Overlay withStart(Duration start) { - this.start = start; - return this; - } - - /** - * Get the end property: The end position, with reference to the input video, at which the overlay ends. The value - * should be in ISO 8601 format. For example, PT30S to end the overlay at 30 seconds into the input video. If not - * specified or the value is greater than the input video duration, the overlay will be applied until the end of the - * input video if the overlay media duration is greater than the input video duration, else the overlay will last as - * long as the overlay media duration. - * - * @return the end value. - */ - public Duration end() { - return this.end; - } - - /** - * Set the end property: The end position, with reference to the input video, at which the overlay ends. The value - * should be in ISO 8601 format. For example, PT30S to end the overlay at 30 seconds into the input video. If not - * specified or the value is greater than the input video duration, the overlay will be applied until the end of the - * input video if the overlay media duration is greater than the input video duration, else the overlay will last as - * long as the overlay media duration. - * - * @param end the end value to set. - * @return the Overlay object itself. - */ - public Overlay withEnd(Duration end) { - this.end = end; - return this; - } - - /** - * Get the fadeInDuration property: The duration over which the overlay fades in onto the input video. The value - * should be in ISO 8601 duration format. If not specified the default behavior is to have no fade in (same as - * PT0S). - * - * @return the fadeInDuration value. - */ - public Duration fadeInDuration() { - return this.fadeInDuration; - } - - /** - * Set the fadeInDuration property: The duration over which the overlay fades in onto the input video. The value - * should be in ISO 8601 duration format. If not specified the default behavior is to have no fade in (same as - * PT0S). - * - * @param fadeInDuration the fadeInDuration value to set. - * @return the Overlay object itself. - */ - public Overlay withFadeInDuration(Duration fadeInDuration) { - this.fadeInDuration = fadeInDuration; - return this; - } - - /** - * Get the fadeOutDuration property: The duration over which the overlay fades out of the input video. The value - * should be in ISO 8601 duration format. If not specified the default behavior is to have no fade out (same as - * PT0S). - * - * @return the fadeOutDuration value. - */ - public Duration fadeOutDuration() { - return this.fadeOutDuration; - } - - /** - * Set the fadeOutDuration property: The duration over which the overlay fades out of the input video. The value - * should be in ISO 8601 duration format. If not specified the default behavior is to have no fade out (same as - * PT0S). - * - * @param fadeOutDuration the fadeOutDuration value to set. - * @return the Overlay object itself. - */ - public Overlay withFadeOutDuration(Duration fadeOutDuration) { - this.fadeOutDuration = fadeOutDuration; - return this; - } - - /** - * Get the audioGainLevel property: The gain level of audio in the overlay. The value should be in the range [0, - * 1.0]. The default is 1.0. - * - * @return the audioGainLevel value. - */ - public Double audioGainLevel() { - return this.audioGainLevel; - } - - /** - * Set the audioGainLevel property: The gain level of audio in the overlay. The value should be in the range [0, - * 1.0]. The default is 1.0. - * - * @param audioGainLevel the audioGainLevel value to set. - * @return the Overlay object itself. - */ - public Overlay withAudioGainLevel(Double audioGainLevel) { - this.audioGainLevel = audioGainLevel; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (inputLabel() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property inputLabel in model Overlay")); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngFormat.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngFormat.java deleted file mode 100644 index 40815b4585402..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngFormat.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.mediaservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -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; - -/** Describes the settings for producing PNG thumbnails. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.PngFormat") -@JsonFlatten -@Immutable -public class PngFormat extends ImageFormat { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PngFormat.class); - - /** {@inheritDoc} */ - @Override - public PngFormat withFilenamePattern(String filenamePattern) { - super.withFilenamePattern(filenamePattern); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngImage.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngImage.java deleted file mode 100644 index 0ba7948b9c491..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngImage.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; -import java.util.List; - -/** Describes the properties for producing a series of PNG images from the input video. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.PngImage") -@JsonFlatten -@Fluent -public class PngImage extends Image { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PngImage.class); - - /* - * A collection of output PNG image layers to be produced by the encoder. - */ - @JsonProperty(value = "layers") - private List layers; - - /** - * Get the layers property: A collection of output PNG image layers to be produced by the encoder. - * - * @return the layers value. - */ - public List layers() { - return this.layers; - } - - /** - * Set the layers property: A collection of output PNG image layers to be produced by the encoder. - * - * @param layers the layers value to set. - * @return the PngImage object itself. - */ - public PngImage withLayers(List layers) { - this.layers = layers; - return this; - } - - /** {@inheritDoc} */ - @Override - public PngImage withStart(String start) { - super.withStart(start); - return this; - } - - /** {@inheritDoc} */ - @Override - public PngImage withStep(String step) { - super.withStep(step); - return this; - } - - /** {@inheritDoc} */ - @Override - public PngImage withRange(String range) { - super.withRange(range); - return this; - } - - /** {@inheritDoc} */ - @Override - public PngImage withKeyFrameInterval(Duration keyFrameInterval) { - super.withKeyFrameInterval(keyFrameInterval); - return this; - } - - /** {@inheritDoc} */ - @Override - public PngImage withStretchMode(StretchMode stretchMode) { - super.withStretchMode(stretchMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public PngImage withSyncMode(VideoSyncMode syncMode) { - super.withSyncMode(syncMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public PngImage withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (layers() != null) { - layers().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngLayer.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngLayer.java deleted file mode 100644 index 1e048b64f6f94..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PngLayer.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.mediaservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -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; - -/** Describes the settings to produce a PNG image from the input video. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.PngLayer") -@JsonFlatten -@Immutable -public class PngLayer extends Layer { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PngLayer.class); - - /** {@inheritDoc} */ - @Override - public PngLayer withWidth(String width) { - super.withWidth(width); - return this; - } - - /** {@inheritDoc} */ - @Override - public PngLayer withHeight(String height) { - super.withHeight(height); - return this; - } - - /** {@inheritDoc} */ - @Override - public PngLayer withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Preset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Preset.java deleted file mode 100644 index 7c4707e415425..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Preset.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.mediaservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Base type for all Presets, which define the recipe or instructions on how the input media files should be processed. - */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = Preset.class) -@JsonTypeName("Preset") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.Media.FaceDetectorPreset", value = FaceDetectorPreset.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.AudioAnalyzerPreset", value = AudioAnalyzerPreset.class), - @JsonSubTypes.Type( - name = "#Microsoft.Media.BuiltInStandardEncoderPreset", - value = BuiltInStandardEncoderPreset.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.StandardEncoderPreset", value = StandardEncoderPreset.class) -}) -@JsonFlatten -@Immutable -public class Preset { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Preset.class); - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Priority.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Priority.java deleted file mode 100644 index 7536e7bf050fb..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Priority.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for Priority. */ -public final class Priority extends ExpandableStringEnum { - /** Static value Low for Priority. */ - public static final Priority LOW = fromString("Low"); - - /** Static value Normal for Priority. */ - public static final Priority NORMAL = fromString("Normal"); - - /** Static value High for Priority. */ - public static final Priority HIGH = fromString("High"); - - /** - * Creates or finds a Priority from its string representation. - * - * @param name a name to look for. - * @return the corresponding Priority. - */ - @JsonCreator - public static Priority fromString(String name) { - return fromString(name, Priority.class); - } - - /** @return known Priority values. */ - public static Collection values() { - return values(Priority.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PublicNetworkAccess.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PublicNetworkAccess.java new file mode 100644 index 0000000000000..810983a0b77e8 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PublicNetworkAccess.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.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); + } + + /** @return known PublicNetworkAccess values. */ + public static Collection values() { + return values(PublicNetworkAccess.class); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Rectangle.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Rectangle.java deleted file mode 100644 index 743e7b73b8d6b..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Rectangle.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.mediaservices.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 rectangular window applied to the input media before processing it. */ -@Fluent -public final class Rectangle { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Rectangle.class); - - /* - * The number of pixels from the left-margin. This can be absolute pixel - * value (e.g 100), or relative to the size of the video (For example, - * 50%). - */ - @JsonProperty(value = "left") - private String left; - - /* - * The number of pixels from the top-margin. This can be absolute pixel - * value (e.g 100), or relative to the size of the video (For example, - * 50%). - */ - @JsonProperty(value = "top") - private String top; - - /* - * The width of the rectangular region in pixels. This can be absolute - * pixel value (e.g 100), or relative to the size of the video (For - * example, 50%). - */ - @JsonProperty(value = "width") - private String width; - - /* - * The height of the rectangular region in pixels. This can be absolute - * pixel value (e.g 100), or relative to the size of the video (For - * example, 50%). - */ - @JsonProperty(value = "height") - private String height; - - /** - * Get the left property: The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or - * relative to the size of the video (For example, 50%). - * - * @return the left value. - */ - public String left() { - return this.left; - } - - /** - * Set the left property: The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or - * relative to the size of the video (For example, 50%). - * - * @param left the left value to set. - * @return the Rectangle object itself. - */ - public Rectangle withLeft(String left) { - this.left = left; - return this; - } - - /** - * Get the top property: The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or - * relative to the size of the video (For example, 50%). - * - * @return the top value. - */ - public String top() { - return this.top; - } - - /** - * Set the top property: The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or - * relative to the size of the video (For example, 50%). - * - * @param top the top value to set. - * @return the Rectangle object itself. - */ - public Rectangle withTop(String top) { - this.top = top; - return this; - } - - /** - * Get the width property: The width of the rectangular region in pixels. This can be absolute pixel value (e.g - * 100), or relative to the size of the video (For example, 50%). - * - * @return the width value. - */ - public String width() { - return this.width; - } - - /** - * Set the width property: The width of the rectangular region in pixels. This can be absolute pixel value (e.g - * 100), or relative to the size of the video (For example, 50%). - * - * @param width the width value to set. - * @return the Rectangle object itself. - */ - public Rectangle withWidth(String width) { - this.width = width; - return this; - } - - /** - * Get the height property: The height of the rectangular region in pixels. This can be absolute pixel value (e.g - * 100), or relative to the size of the video (For example, 50%). - * - * @return the height value. - */ - public String height() { - return this.height; - } - - /** - * Set the height property: The height of the rectangular region in pixels. This can be absolute pixel value (e.g - * 100), or relative to the size of the video (For example, 50%). - * - * @param height the height value to set. - * @return the Rectangle object itself. - */ - public Rectangle withHeight(String height) { - this.height = height; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ResourceIdentity.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ResourceIdentity.java new file mode 100644 index 0000000000000..ea64a9811d183 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ResourceIdentity.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.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 ResourceIdentity model. */ +@Fluent +public class ResourceIdentity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceIdentity.class); + + /* + * The user assigned managed identity's ARM ID to use when accessing a + * resource. + */ + @JsonProperty(value = "userAssignedIdentity") + private String userAssignedIdentity; + + /* + * Indicates whether to use System Assigned Managed Identity. Mutual + * exclusive with User Assigned Managed Identity. + */ + @JsonProperty(value = "useSystemAssignedIdentity", required = true) + private boolean useSystemAssignedIdentity; + + /** + * Get the userAssignedIdentity property: The user assigned managed identity's ARM ID 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 ARM ID 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; + } + + /** + * Get the useSystemAssignedIdentity property: Indicates whether to use System Assigned Managed Identity. Mutual + * exclusive with User Assigned Managed Identity. + * + * @return the useSystemAssignedIdentity value. + */ + public boolean useSystemAssignedIdentity() { + return this.useSystemAssignedIdentity; + } + + /** + * Set the useSystemAssignedIdentity property: Indicates whether to use System Assigned Managed Identity. Mutual + * exclusive with User Assigned Managed Identity. + * + * @param useSystemAssignedIdentity the useSystemAssignedIdentity value to set. + * @return the ResourceIdentity object itself. + */ + public ResourceIdentity withUseSystemAssignedIdentity(boolean useSystemAssignedIdentity) { + this.useSystemAssignedIdentity = useSystemAssignedIdentity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Rotation.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Rotation.java deleted file mode 100644 index 62e8df145404d..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Rotation.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for Rotation. */ -public final class Rotation extends ExpandableStringEnum { - /** Static value Auto for Rotation. */ - public static final Rotation AUTO = fromString("Auto"); - - /** Static value None for Rotation. */ - public static final Rotation NONE = fromString("None"); - - /** Static value Rotate0 for Rotation. */ - public static final Rotation ROTATE0 = fromString("Rotate0"); - - /** Static value Rotate90 for Rotation. */ - public static final Rotation ROTATE90 = fromString("Rotate90"); - - /** Static value Rotate180 for Rotation. */ - public static final Rotation ROTATE180 = fromString("Rotate180"); - - /** Static value Rotate270 for Rotation. */ - public static final Rotation ROTATE270 = fromString("Rotate270"); - - /** - * Creates or finds a Rotation from its string representation. - * - * @param name a name to look for. - * @return the corresponding Rotation. - */ - @JsonCreator - public static Rotation fromString(String name) { - return fromString(name, Rotation.class); - } - - /** @return known Rotation values. */ - public static Collection values() { - return values(Rotation.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectAudioTrackByAttribute.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectAudioTrackByAttribute.java deleted file mode 100644 index c2127ec479903..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectAudioTrackByAttribute.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Select audio tracks from the input by specifying an attribute and an attribute filter. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.SelectAudioTrackByAttribute") -@JsonFlatten -@Fluent -public class SelectAudioTrackByAttribute extends AudioTrackDescriptor { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SelectAudioTrackByAttribute.class); - - /* - * The TrackAttribute to filter the tracks by. - */ - @JsonProperty(value = "attribute", required = true) - private TrackAttribute attribute; - - /* - * The type of AttributeFilter to apply to the TrackAttribute in order to - * select the tracks. - */ - @JsonProperty(value = "filter", required = true) - private AttributeFilter filter; - - /* - * The value to filter the tracks by. Only used when - * AttributeFilter.ValueEquals is specified for the Filter property. - */ - @JsonProperty(value = "filterValue") - private String filterValue; - - /** - * Get the attribute property: The TrackAttribute to filter the tracks by. - * - * @return the attribute value. - */ - public TrackAttribute attribute() { - return this.attribute; - } - - /** - * Set the attribute property: The TrackAttribute to filter the tracks by. - * - * @param attribute the attribute value to set. - * @return the SelectAudioTrackByAttribute object itself. - */ - public SelectAudioTrackByAttribute withAttribute(TrackAttribute attribute) { - this.attribute = attribute; - return this; - } - - /** - * Get the filter property: The type of AttributeFilter to apply to the TrackAttribute in order to select the - * tracks. - * - * @return the filter value. - */ - public AttributeFilter filter() { - return this.filter; - } - - /** - * Set the filter property: The type of AttributeFilter to apply to the TrackAttribute in order to select the - * tracks. - * - * @param filter the filter value to set. - * @return the SelectAudioTrackByAttribute object itself. - */ - public SelectAudioTrackByAttribute withFilter(AttributeFilter filter) { - this.filter = filter; - return this; - } - - /** - * Get the filterValue property: The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is - * specified for the Filter property. - * - * @return the filterValue value. - */ - public String filterValue() { - return this.filterValue; - } - - /** - * Set the filterValue property: The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is - * specified for the Filter property. - * - * @param filterValue the filterValue value to set. - * @return the SelectAudioTrackByAttribute object itself. - */ - public SelectAudioTrackByAttribute withFilterValue(String filterValue) { - this.filterValue = filterValue; - return this; - } - - /** {@inheritDoc} */ - @Override - public SelectAudioTrackByAttribute withChannelMapping(ChannelMapping channelMapping) { - super.withChannelMapping(channelMapping); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (attribute() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property attribute in model SelectAudioTrackByAttribute")); - } - if (filter() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property filter in model SelectAudioTrackByAttribute")); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectAudioTrackById.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectAudioTrackById.java deleted file mode 100644 index 1144ed6cc79b2..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectAudioTrackById.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Select audio tracks from the input by specifying a track identifier. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.SelectAudioTrackById") -@JsonFlatten -@Fluent -public class SelectAudioTrackById extends AudioTrackDescriptor { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SelectAudioTrackById.class); - - /* - * Track identifier to select - */ - @JsonProperty(value = "trackId", required = true) - private long trackId; - - /** - * Get the trackId property: Track identifier to select. - * - * @return the trackId value. - */ - public long trackId() { - return this.trackId; - } - - /** - * Set the trackId property: Track identifier to select. - * - * @param trackId the trackId value to set. - * @return the SelectAudioTrackById object itself. - */ - public SelectAudioTrackById withTrackId(long trackId) { - this.trackId = trackId; - return this; - } - - /** {@inheritDoc} */ - @Override - public SelectAudioTrackById withChannelMapping(ChannelMapping channelMapping) { - super.withChannelMapping(channelMapping); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectVideoTrackByAttribute.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectVideoTrackByAttribute.java deleted file mode 100644 index e09ba68edc562..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectVideoTrackByAttribute.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Select video tracks from the input by specifying an attribute and an attribute filter. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.SelectVideoTrackByAttribute") -@JsonFlatten -@Fluent -public class SelectVideoTrackByAttribute extends VideoTrackDescriptor { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SelectVideoTrackByAttribute.class); - - /* - * The TrackAttribute to filter the tracks by. - */ - @JsonProperty(value = "attribute", required = true) - private TrackAttribute attribute; - - /* - * The type of AttributeFilter to apply to the TrackAttribute in order to - * select the tracks. - */ - @JsonProperty(value = "filter", required = true) - private AttributeFilter filter; - - /* - * The value to filter the tracks by. Only used when - * AttributeFilter.ValueEquals is specified for the Filter property. For - * TrackAttribute.Bitrate, this should be an integer value in bits per - * second (e.g: '1500000'). The TrackAttribute.Language is not supported - * for video tracks. - */ - @JsonProperty(value = "filterValue") - private String filterValue; - - /** - * Get the attribute property: The TrackAttribute to filter the tracks by. - * - * @return the attribute value. - */ - public TrackAttribute attribute() { - return this.attribute; - } - - /** - * Set the attribute property: The TrackAttribute to filter the tracks by. - * - * @param attribute the attribute value to set. - * @return the SelectVideoTrackByAttribute object itself. - */ - public SelectVideoTrackByAttribute withAttribute(TrackAttribute attribute) { - this.attribute = attribute; - return this; - } - - /** - * Get the filter property: The type of AttributeFilter to apply to the TrackAttribute in order to select the - * tracks. - * - * @return the filter value. - */ - public AttributeFilter filter() { - return this.filter; - } - - /** - * Set the filter property: The type of AttributeFilter to apply to the TrackAttribute in order to select the - * tracks. - * - * @param filter the filter value to set. - * @return the SelectVideoTrackByAttribute object itself. - */ - public SelectVideoTrackByAttribute withFilter(AttributeFilter filter) { - this.filter = filter; - return this; - } - - /** - * Get the filterValue property: The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is - * specified for the Filter property. For TrackAttribute.Bitrate, this should be an integer value in bits per second - * (e.g: '1500000'). The TrackAttribute.Language is not supported for video tracks. - * - * @return the filterValue value. - */ - public String filterValue() { - return this.filterValue; - } - - /** - * Set the filterValue property: The value to filter the tracks by. Only used when AttributeFilter.ValueEquals is - * specified for the Filter property. For TrackAttribute.Bitrate, this should be an integer value in bits per second - * (e.g: '1500000'). The TrackAttribute.Language is not supported for video tracks. - * - * @param filterValue the filterValue value to set. - * @return the SelectVideoTrackByAttribute object itself. - */ - public SelectVideoTrackByAttribute withFilterValue(String filterValue) { - this.filterValue = filterValue; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (attribute() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property attribute in model SelectVideoTrackByAttribute")); - } - if (filter() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property filter in model SelectVideoTrackByAttribute")); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectVideoTrackById.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectVideoTrackById.java deleted file mode 100644 index d472e7e4ba6b8..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/SelectVideoTrackById.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Select video tracks from the input by specifying a track identifier. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.SelectVideoTrackById") -@JsonFlatten -@Fluent -public class SelectVideoTrackById extends VideoTrackDescriptor { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SelectVideoTrackById.class); - - /* - * Track identifier to select - */ - @JsonProperty(value = "trackId", required = true) - private long trackId; - - /** - * Get the trackId property: Track identifier to select. - * - * @return the trackId value. - */ - public long trackId() { - return this.trackId; - } - - /** - * Set the trackId property: Track identifier to select. - * - * @param trackId the trackId value to set. - * @return the SelectVideoTrackById object itself. - */ - public SelectVideoTrackById withTrackId(long trackId) { - this.trackId = trackId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StandardEncoderPreset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StandardEncoderPreset.java deleted file mode 100644 index c27b028349e0c..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StandardEncoderPreset.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Describes all the settings to be used when encoding the input video with the Standard Encoder. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.StandardEncoderPreset") -@JsonFlatten -@Fluent -public class StandardEncoderPreset extends Preset { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StandardEncoderPreset.class); - - /* - * One or more filtering operations that are applied to the input media - * before encoding. - */ - @JsonProperty(value = "filters") - private Filters filters; - - /* - * The list of codecs to be used when encoding the input video. - */ - @JsonProperty(value = "codecs", required = true) - private List codecs; - - /* - * The list of outputs to be produced by the encoder. - */ - @JsonProperty(value = "formats", required = true) - private List formats; - - /** - * Get the filters property: One or more filtering operations that are applied to the input media before encoding. - * - * @return the filters value. - */ - public Filters filters() { - return this.filters; - } - - /** - * Set the filters property: One or more filtering operations that are applied to the input media before encoding. - * - * @param filters the filters value to set. - * @return the StandardEncoderPreset object itself. - */ - public StandardEncoderPreset withFilters(Filters filters) { - this.filters = filters; - return this; - } - - /** - * Get the codecs property: The list of codecs to be used when encoding the input video. - * - * @return the codecs value. - */ - public List codecs() { - return this.codecs; - } - - /** - * Set the codecs property: The list of codecs to be used when encoding the input video. - * - * @param codecs the codecs value to set. - * @return the StandardEncoderPreset object itself. - */ - public StandardEncoderPreset withCodecs(List codecs) { - this.codecs = codecs; - return this; - } - - /** - * Get the formats property: The list of outputs to be produced by the encoder. - * - * @return the formats value. - */ - public List formats() { - return this.formats; - } - - /** - * Set the formats property: The list of outputs to be produced by the encoder. - * - * @param formats the formats value to set. - * @return the StandardEncoderPreset object itself. - */ - public StandardEncoderPreset withFormats(List formats) { - this.formats = formats; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (filters() != null) { - filters().validate(); - } - if (codecs() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property codecs in model StandardEncoderPreset")); - } else { - codecs().forEach(e -> e.validate()); - } - if (formats() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property formats in model StandardEncoderPreset")); - } else { - formats().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StorageAccount.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StorageAccount.java index 00c20e130db53..4f71aec4bf4a8 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StorageAccount.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StorageAccount.java @@ -30,6 +30,18 @@ public final class StorageAccount { @JsonProperty(value = "type", required = true) private StorageAccountType type; + /* + * The storage account identity. + */ + @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. Media Services relies on tables and queues as well * as blobs, so the primary storage account must be a Standard Storage account (either Microsoft.ClassicStorage or @@ -74,6 +86,35 @@ public StorageAccount withType(StorageAccountType type) { return this; } + /** + * Get the identity property: The storage account identity. + * + * @return the identity value. + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The storage account identity. + * + * @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. * @@ -85,5 +126,8 @@ public void validate() { .logExceptionAsError( new IllegalArgumentException("Missing required property type in model StorageAccount")); } + if (identity() != null) { + identity().validate(); + } } } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TrackAttribute.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TrackAttribute.java deleted file mode 100644 index 20d026abff458..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TrackAttribute.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for TrackAttribute. */ -public final class TrackAttribute extends ExpandableStringEnum { - /** Static value Bitrate for TrackAttribute. */ - public static final TrackAttribute BITRATE = fromString("Bitrate"); - - /** Static value Language for TrackAttribute. */ - public static final TrackAttribute LANGUAGE = fromString("Language"); - - /** - * Creates or finds a TrackAttribute from its string representation. - * - * @param name a name to look for. - * @return the corresponding TrackAttribute. - */ - @JsonCreator - public static TrackAttribute fromString(String name) { - return fromString(name, TrackAttribute.class); - } - - /** @return known TrackAttribute values. */ - public static Collection values() { - return values(TrackAttribute.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TrackDescriptor.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TrackDescriptor.java deleted file mode 100644 index cc25cc4288bde..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TrackDescriptor.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.mediaservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Base type for all TrackDescriptor types, which define the metadata and selection for tracks that should be processed - * by a Job. - */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = TrackDescriptor.class) -@JsonTypeName("TrackDescriptor") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.Media.AudioTrackDescriptor", value = AudioTrackDescriptor.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.VideoTrackDescriptor", value = VideoTrackDescriptor.class) -}) -@JsonFlatten -@Immutable -public class TrackDescriptor { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TrackDescriptor.class); - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Transform.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Transform.java deleted file mode 100644 index 8d9872b900093..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Transform.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.mediaservices.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.mediaservices.fluent.models.TransformInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of Transform. */ -public interface Transform { - /** - * 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: The system metadata relating to this resource. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the created property: The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' - * format. - * - * @return the created value. - */ - OffsetDateTime created(); - - /** - * Gets the description property: An optional verbose description of the Transform. - * - * @return the description value. - */ - String description(); - - /** - * Gets the lastModified property: The UTC date and time when the Transform was last updated, in - * 'YYYY-MM-DDThh:mm:ssZ' format. - * - * @return the lastModified value. - */ - OffsetDateTime lastModified(); - - /** - * Gets the outputs property: An array of one or more TransformOutputs that the Transform should generate. - * - * @return the outputs value. - */ - List outputs(); - - /** - * Gets the inner com.azure.resourcemanager.mediaservices.fluent.models.TransformInner object. - * - * @return the inner object. - */ - TransformInner innerModel(); - - /** The entirety of the Transform definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The Transform definition stages. */ - interface DefinitionStages { - /** The first stage of the Transform definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the Transform definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @return the next definition stage. - */ - WithCreate withExistingMediaService(String resourceGroupName, String accountName); - } - /** - * The stage of the Transform 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.WithOutputs { - /** - * Executes the create request. - * - * @return the created resource. - */ - Transform create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Transform create(Context context); - } - /** The stage of the Transform definition allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: An optional verbose description of the Transform.. - * - * @param description An optional verbose description of the Transform. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - /** The stage of the Transform definition allowing to specify outputs. */ - interface WithOutputs { - /** - * Specifies the outputs property: An array of one or more TransformOutputs that the Transform should - * generate.. - * - * @param outputs An array of one or more TransformOutputs that the Transform should generate. - * @return the next definition stage. - */ - WithCreate withOutputs(List outputs); - } - } - /** - * Begins update for the Transform resource. - * - * @return the stage of resource update. - */ - Transform.Update update(); - - /** The template for Transform update. */ - interface Update extends UpdateStages.WithDescription, UpdateStages.WithOutputs { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Transform apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Transform apply(Context context); - } - /** The Transform update stages. */ - interface UpdateStages { - /** The stage of the Transform update allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: An optional verbose description of the Transform.. - * - * @param description An optional verbose description of the Transform. - * @return the next definition stage. - */ - Update withDescription(String description); - } - /** The stage of the Transform update allowing to specify outputs. */ - interface WithOutputs { - /** - * Specifies the outputs property: An array of one or more TransformOutputs that the Transform should - * generate.. - * - * @param outputs An array of one or more TransformOutputs that the Transform should generate. - * @return the next definition stage. - */ - Update withOutputs(List outputs); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Transform refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Transform refresh(Context context); -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TransformCollection.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TransformCollection.java deleted file mode 100644 index 740abbcd24719..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TransformCollection.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.mediaservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.mediaservices.fluent.models.TransformInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A collection of Transform items. */ -@Fluent -public final class TransformCollection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransformCollection.class); - - /* - * A collection of Transform 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 = "@odata.nextLink") - private String odataNextLink; - - /** - * Get the value property: A collection of Transform items. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A collection of Transform items. - * - * @param value the value value to set. - * @return the TransformCollection object itself. - */ - public TransformCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the odataNextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @return the odataNextLink value. - */ - public String odataNextLink() { - return this.odataNextLink; - } - - /** - * Set the odataNextLink property: A link to the next page of the collection (when the collection contains too many - * results to return in one response). - * - * @param odataNextLink the odataNextLink value to set. - * @return the TransformCollection object itself. - */ - public TransformCollection withOdataNextLink(String odataNextLink) { - this.odataNextLink = odataNextLink; - 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/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TransformOutput.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TransformOutput.java deleted file mode 100644 index f7e70068e6739..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TransformOutput.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.mediaservices.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 TransformOutput, which are the rules to be applied while generating the desired output. - */ -@Fluent -public final class TransformOutput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransformOutput.class); - - /* - * A Transform can define more than one outputs. This property defines what - * the service should do when one output fails - either continue to produce - * other outputs, or, stop the other outputs. The overall Job state will - * not reflect failures of outputs that are specified with 'ContinueJob'. - * The default is 'StopProcessingJob'. - */ - @JsonProperty(value = "onError") - private OnErrorType onError; - - /* - * Sets the relative priority of the TransformOutputs within a Transform. - * This sets the priority that the service uses for processing - * TransformOutputs. The default priority is Normal. - */ - @JsonProperty(value = "relativePriority") - private Priority relativePriority; - - /* - * Preset that describes the operations that will be used to modify, - * transcode, or extract insights from the source file to generate the - * output. - */ - @JsonProperty(value = "preset", required = true) - private Preset preset; - - /** - * Get the onError property: A Transform can define more than one outputs. This property defines what the service - * should do when one output fails - either continue to produce other outputs, or, stop the other outputs. The - * overall Job state will not reflect failures of outputs that are specified with 'ContinueJob'. The default is - * 'StopProcessingJob'. - * - * @return the onError value. - */ - public OnErrorType onError() { - return this.onError; - } - - /** - * Set the onError property: A Transform can define more than one outputs. This property defines what the service - * should do when one output fails - either continue to produce other outputs, or, stop the other outputs. The - * overall Job state will not reflect failures of outputs that are specified with 'ContinueJob'. The default is - * 'StopProcessingJob'. - * - * @param onError the onError value to set. - * @return the TransformOutput object itself. - */ - public TransformOutput withOnError(OnErrorType onError) { - this.onError = onError; - return this; - } - - /** - * Get the relativePriority property: Sets the relative priority of the TransformOutputs within a Transform. This - * sets the priority that the service uses for processing TransformOutputs. The default priority is Normal. - * - * @return the relativePriority value. - */ - public Priority relativePriority() { - return this.relativePriority; - } - - /** - * Set the relativePriority property: Sets the relative priority of the TransformOutputs within a Transform. This - * sets the priority that the service uses for processing TransformOutputs. The default priority is Normal. - * - * @param relativePriority the relativePriority value to set. - * @return the TransformOutput object itself. - */ - public TransformOutput withRelativePriority(Priority relativePriority) { - this.relativePriority = relativePriority; - return this; - } - - /** - * Get the preset property: Preset that describes the operations that will be used to modify, transcode, or extract - * insights from the source file to generate the output. - * - * @return the preset value. - */ - public Preset preset() { - return this.preset; - } - - /** - * Set the preset property: Preset that describes the operations that will be used to modify, transcode, or extract - * insights from the source file to generate the output. - * - * @param preset the preset value to set. - * @return the TransformOutput object itself. - */ - public TransformOutput withPreset(Preset preset) { - this.preset = preset; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (preset() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property preset in model TransformOutput")); - } else { - preset().validate(); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Transforms.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Transforms.java deleted file mode 100644 index 9cb07ef544f69..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Transforms.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.mediaservices.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 Transforms. */ -public interface Transforms { - /** - * Lists the Transforms in the account. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services 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 Transform items. - */ - PagedIterable list(String resourceGroupName, String accountName); - - /** - * Lists the Transforms in the account. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param filter Restricts the set of items returned. - * @param orderby Specifies the key by which the result collection should be ordered. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 Transform items. - */ - PagedIterable list( - String resourceGroupName, String accountName, String filter, String orderby, Context context); - - /** - * Gets a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 Transform. - */ - Transform get(String resourceGroupName, String accountName, String transformName); - - /** - * Gets a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 a Transform. - */ - Response getWithResponse( - String resourceGroupName, String accountName, String transformName, Context context); - - /** - * Deletes a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 transformName); - - /** - * Deletes a Transform. - * - * @param resourceGroupName The name of the resource group within the Azure subscription. - * @param accountName The Media Services account name. - * @param transformName The Transform 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 response. - */ - Response deleteWithResponse( - String resourceGroupName, String accountName, String transformName, Context context); - - /** - * Gets a Transform. - * - * @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 Transform. - */ - Transform getById(String id); - - /** - * Gets a Transform. - * - * @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 a Transform. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a Transform. - * - * @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 Transform. - * - * @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 Transform resource. - * - * @param name resource name. - * @return the first stage of the new Transform definition. - */ - Transform.DefinitionStages.Blank define(String name); -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TransportStreamFormat.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TransportStreamFormat.java deleted file mode 100644 index 2cd89d5e94326..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/TransportStreamFormat.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.mediaservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -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; -import java.util.List; - -/** Describes the properties for generating an MPEG-2 Transport Stream (ISO/IEC 13818-1) output video file(s). */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.TransportStreamFormat") -@JsonFlatten -@Immutable -public class TransportStreamFormat extends MultiBitrateFormat { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransportStreamFormat.class); - - /** {@inheritDoc} */ - @Override - public TransportStreamFormat withOutputFiles(List outputFiles) { - super.withOutputFiles(outputFiles); - return this; - } - - /** {@inheritDoc} */ - @Override - public TransportStreamFormat withFilenamePattern(String filenamePattern) { - super.withFilenamePattern(filenamePattern); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobErrorDetail.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/UserAssignedManagedIdentity.java similarity index 51% rename from sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobErrorDetail.java rename to sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/UserAssignedManagedIdentity.java index dd00a545fec8b..db6bd9c389c86 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/JobErrorDetail.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/UserAssignedManagedIdentity.java @@ -8,40 +8,41 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; -/** Details of JobOutput errors. */ +/** The UserAssignedManagedIdentity model. */ @Immutable -public final class JobErrorDetail { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobErrorDetail.class); +public class UserAssignedManagedIdentity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAssignedManagedIdentity.class); /* - * Code describing the error detail. + * The client ID. */ - @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) - private String code; + @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) + private UUID clientId; /* - * A human-readable representation of the error. + * The principal ID. */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private UUID principalId; /** - * Get the code property: Code describing the error detail. + * Get the clientId property: The client ID. * - * @return the code value. + * @return the clientId value. */ - public String code() { - return this.code; + public UUID clientId() { + return this.clientId; } /** - * Get the message property: A human-readable representation of the error. + * Get the principalId property: The principal ID. * - * @return the message value. + * @return the principalId value. */ - public String message() { - return this.message; + public UUID principalId() { + return this.principalId; } /** diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/UtcClipTime.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/UtcClipTime.java deleted file mode 100644 index adb7ac0573c29..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/UtcClipTime.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** - * Specifies the clip time as a Utc time position in the media file. The Utc time can point to a different position - * depending on whether the media file starts from a timestamp of zero or not. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.UtcClipTime") -@JsonFlatten -@Fluent -public class UtcClipTime extends ClipTime { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UtcClipTime.class); - - /* - * The time position on the timeline of the input media based on Utc time. - */ - @JsonProperty(value = "time", required = true) - private OffsetDateTime time; - - /** - * Get the time property: The time position on the timeline of the input media based on Utc time. - * - * @return the time value. - */ - public OffsetDateTime time() { - return this.time; - } - - /** - * Set the time property: The time position on the timeline of the input media based on Utc time. - * - * @param time the time value to set. - * @return the UtcClipTime object itself. - */ - public UtcClipTime withTime(OffsetDateTime time) { - this.time = time; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (time() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property time in model UtcClipTime")); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Video.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Video.java deleted file mode 100644 index d782e13d5f17e..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Video.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; - -/** Describes the basic properties for encoding the input video. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = Video.class) -@JsonTypeName("#Microsoft.Media.Video") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "#Microsoft.Media.H265Video", value = H265Video.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.Image", value = Image.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.H264Video", value = H264Video.class) -}) -@JsonFlatten -@Fluent -public class Video extends Codec { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Video.class); - - /* - * The distance between two key frames. The value should be non-zero in the - * range [0.5, 20] seconds, specified in ISO 8601 format. The default is 2 - * seconds(PT2S). Note that this setting is ignored if - * VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will - * follow the input source setting. - */ - @JsonProperty(value = "keyFrameInterval") - private Duration keyFrameInterval; - - /* - * The resizing mode - how the input video will be resized to fit the - * desired output resolution(s). Default is AutoSize - */ - @JsonProperty(value = "stretchMode") - private StretchMode stretchMode; - - /* - * The Video Sync Mode - */ - @JsonProperty(value = "syncMode") - private VideoSyncMode syncMode; - - /** - * Get the keyFrameInterval property: The distance between two key frames. The value should be non-zero in the range - * [0.5, 20] seconds, specified in ISO 8601 format. The default is 2 seconds(PT2S). Note that this setting is - * ignored if VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will follow the input source - * setting. - * - * @return the keyFrameInterval value. - */ - public Duration keyFrameInterval() { - return this.keyFrameInterval; - } - - /** - * Set the keyFrameInterval property: The distance between two key frames. The value should be non-zero in the range - * [0.5, 20] seconds, specified in ISO 8601 format. The default is 2 seconds(PT2S). Note that this setting is - * ignored if VideoSyncMode.Passthrough is set, where the KeyFrameInterval value will follow the input source - * setting. - * - * @param keyFrameInterval the keyFrameInterval value to set. - * @return the Video object itself. - */ - public Video withKeyFrameInterval(Duration keyFrameInterval) { - this.keyFrameInterval = keyFrameInterval; - return this; - } - - /** - * Get the stretchMode property: The resizing mode - how the input video will be resized to fit the desired output - * resolution(s). Default is AutoSize. - * - * @return the stretchMode value. - */ - public StretchMode stretchMode() { - return this.stretchMode; - } - - /** - * Set the stretchMode property: The resizing mode - how the input video will be resized to fit the desired output - * resolution(s). Default is AutoSize. - * - * @param stretchMode the stretchMode value to set. - * @return the Video object itself. - */ - public Video withStretchMode(StretchMode stretchMode) { - this.stretchMode = stretchMode; - return this; - } - - /** - * Get the syncMode property: The Video Sync Mode. - * - * @return the syncMode value. - */ - public VideoSyncMode syncMode() { - return this.syncMode; - } - - /** - * Set the syncMode property: The Video Sync Mode. - * - * @param syncMode the syncMode value to set. - * @return the Video object itself. - */ - public Video withSyncMode(VideoSyncMode syncMode) { - this.syncMode = syncMode; - return this; - } - - /** {@inheritDoc} */ - @Override - public Video withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoAnalyzerPreset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoAnalyzerPreset.java deleted file mode 100644 index f86b54e1f7df2..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoAnalyzerPreset.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** - * A video analyzer preset that extracts insights (rich metadata) from both audio and video, and outputs a JSON format - * file. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.VideoAnalyzerPreset") -@JsonFlatten -@Fluent -public class VideoAnalyzerPreset extends AudioAnalyzerPreset { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoAnalyzerPreset.class); - - /* - * Defines the type of insights that you want the service to generate. The - * allowed values are 'AudioInsightsOnly', 'VideoInsightsOnly', and - * 'AllInsights'. The default is AllInsights. If you set this to - * AllInsights and the input is audio only, then only audio insights are - * generated. Similarly if the input is video only, then only video - * insights are generated. It is recommended that you not use - * AudioInsightsOnly if you expect some of your inputs to be video only; or - * use VideoInsightsOnly if you expect some of your inputs to be audio - * only. Your Jobs in such conditions would error out. - */ - @JsonProperty(value = "insightsToExtract") - private InsightsType insightsToExtract; - - /** - * Get the insightsToExtract property: Defines the type of insights that you want the service to generate. The - * allowed values are 'AudioInsightsOnly', 'VideoInsightsOnly', and 'AllInsights'. The default is AllInsights. If - * you set this to AllInsights and the input is audio only, then only audio insights are generated. Similarly if the - * input is video only, then only video insights are generated. It is recommended that you not use AudioInsightsOnly - * if you expect some of your inputs to be video only; or use VideoInsightsOnly if you expect some of your inputs to - * be audio only. Your Jobs in such conditions would error out. - * - * @return the insightsToExtract value. - */ - public InsightsType insightsToExtract() { - return this.insightsToExtract; - } - - /** - * Set the insightsToExtract property: Defines the type of insights that you want the service to generate. The - * allowed values are 'AudioInsightsOnly', 'VideoInsightsOnly', and 'AllInsights'. The default is AllInsights. If - * you set this to AllInsights and the input is audio only, then only audio insights are generated. Similarly if the - * input is video only, then only video insights are generated. It is recommended that you not use AudioInsightsOnly - * if you expect some of your inputs to be video only; or use VideoInsightsOnly if you expect some of your inputs to - * be audio only. Your Jobs in such conditions would error out. - * - * @param insightsToExtract the insightsToExtract value to set. - * @return the VideoAnalyzerPreset object itself. - */ - public VideoAnalyzerPreset withInsightsToExtract(InsightsType insightsToExtract) { - this.insightsToExtract = insightsToExtract; - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoAnalyzerPreset withAudioLanguage(String audioLanguage) { - super.withAudioLanguage(audioLanguage); - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoAnalyzerPreset withMode(AudioAnalysisMode mode) { - super.withMode(mode); - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoAnalyzerPreset withExperimentalOptions(Map experimentalOptions) { - super.withExperimentalOptions(experimentalOptions); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoLayer.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoLayer.java deleted file mode 100644 index 82c662fe3c1a5..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoLayer.java +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mediaservices.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 com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Describes the settings to be used when encoding the input video into a desired output bitrate layer. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = VideoLayer.class) -@JsonTypeName("#Microsoft.Media.VideoLayer") -@JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.Media.H264Layer", value = H264Layer.class)}) -@JsonFlatten -@Fluent -public class VideoLayer extends Layer { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoLayer.class); - - /* - * The average bitrate in bits per second at which to encode the input - * video when generating this layer. This is a required field. - */ - @JsonProperty(value = "bitrate", required = true) - private int bitrate; - - /* - * The maximum bitrate (in bits per second), at which the VBV buffer should - * be assumed to refill. If not specified, defaults to the same value as - * bitrate. - */ - @JsonProperty(value = "maxBitrate") - private Integer maxBitrate; - - /* - * The number of B-frames to be used when encoding this layer. If not - * specified, the encoder chooses an appropriate number based on the video - * profile and level. - */ - @JsonProperty(value = "bFrames") - private Integer bFrames; - - /* - * The frame rate (in frames per second) at which to encode this layer. The - * value can be in the form of M/N where M and N are integers (For example, - * 30000/1001), or in the form of a number (For example, 30, or 29.97). The - * encoder enforces constraints on allowed frame rates based on the profile - * and level. If it is not specified, the encoder will use the same frame - * rate as the input video. - */ - @JsonProperty(value = "frameRate") - private String frameRate; - - /* - * The number of slices to be used when encoding this layer. If not - * specified, default is zero, which means that encoder will use a single - * slice for each frame. - */ - @JsonProperty(value = "slices") - private Integer slices; - - /* - * Whether or not adaptive B-frames are to be used when encoding this - * layer. If not specified, the encoder will turn it on whenever the video - * profile permits its use. - */ - @JsonProperty(value = "adaptiveBFrame") - private Boolean adaptiveBFrame; - - /** - * Get the bitrate property: The average bitrate in bits per second at which to encode the input video when - * generating this layer. This is a required field. - * - * @return the bitrate value. - */ - public int bitrate() { - return this.bitrate; - } - - /** - * Set the bitrate property: The average bitrate in bits per second at which to encode the input video when - * generating this layer. This is a required field. - * - * @param bitrate the bitrate value to set. - * @return the VideoLayer object itself. - */ - public VideoLayer withBitrate(int bitrate) { - this.bitrate = bitrate; - return this; - } - - /** - * Get the maxBitrate property: The maximum bitrate (in bits per second), at which the VBV buffer should be assumed - * to refill. If not specified, defaults to the same value as bitrate. - * - * @return the maxBitrate value. - */ - public Integer maxBitrate() { - return this.maxBitrate; - } - - /** - * Set the maxBitrate property: The maximum bitrate (in bits per second), at which the VBV buffer should be assumed - * to refill. If not specified, defaults to the same value as bitrate. - * - * @param maxBitrate the maxBitrate value to set. - * @return the VideoLayer object itself. - */ - public VideoLayer withMaxBitrate(Integer maxBitrate) { - this.maxBitrate = maxBitrate; - return this; - } - - /** - * Get the bFrames property: The number of B-frames to be used when encoding this layer. If not specified, the - * encoder chooses an appropriate number based on the video profile and level. - * - * @return the bFrames value. - */ - public Integer bFrames() { - return this.bFrames; - } - - /** - * Set the bFrames property: The number of B-frames to be used when encoding this layer. If not specified, the - * encoder chooses an appropriate number based on the video profile and level. - * - * @param bFrames the bFrames value to set. - * @return the VideoLayer object itself. - */ - public VideoLayer withBFrames(Integer bFrames) { - this.bFrames = bFrames; - return this; - } - - /** - * Get the frameRate property: The frame rate (in frames per second) at which to encode this layer. The value can be - * in the form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number (For example, - * 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is - * not specified, the encoder will use the same frame rate as the input video. - * - * @return the frameRate value. - */ - public String frameRate() { - return this.frameRate; - } - - /** - * Set the frameRate property: The frame rate (in frames per second) at which to encode this layer. The value can be - * in the form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number (For example, - * 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is - * not specified, the encoder will use the same frame rate as the input video. - * - * @param frameRate the frameRate value to set. - * @return the VideoLayer object itself. - */ - public VideoLayer withFrameRate(String frameRate) { - this.frameRate = frameRate; - return this; - } - - /** - * Get the slices property: The number of slices to be used when encoding this layer. If not specified, default is - * zero, which means that encoder will use a single slice for each frame. - * - * @return the slices value. - */ - public Integer slices() { - return this.slices; - } - - /** - * Set the slices property: The number of slices to be used when encoding this layer. If not specified, default is - * zero, which means that encoder will use a single slice for each frame. - * - * @param slices the slices value to set. - * @return the VideoLayer object itself. - */ - public VideoLayer withSlices(Integer slices) { - this.slices = slices; - return this; - } - - /** - * Get the adaptiveBFrame property: Whether or not adaptive B-frames are to be used when encoding this layer. If not - * specified, the encoder will turn it on whenever the video profile permits its use. - * - * @return the adaptiveBFrame value. - */ - public Boolean adaptiveBFrame() { - return this.adaptiveBFrame; - } - - /** - * Set the adaptiveBFrame property: Whether or not adaptive B-frames are to be used when encoding this layer. If not - * specified, the encoder will turn it on whenever the video profile permits its use. - * - * @param adaptiveBFrame the adaptiveBFrame value to set. - * @return the VideoLayer object itself. - */ - public VideoLayer withAdaptiveBFrame(Boolean adaptiveBFrame) { - this.adaptiveBFrame = adaptiveBFrame; - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoLayer withWidth(String width) { - super.withWidth(width); - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoLayer withHeight(String height) { - super.withHeight(height); - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoLayer withLabel(String label) { - super.withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoOverlay.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoOverlay.java deleted file mode 100644 index 359dbddbf92ec..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoOverlay.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.mediaservices.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; - -/** Describes the properties of a video overlay. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@odata\\.type") -@JsonTypeName("#Microsoft.Media.VideoOverlay") -@JsonFlatten -@Fluent -public class VideoOverlay extends Overlay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoOverlay.class); - - /* - * The location in the input video where the overlay is applied. - */ - @JsonProperty(value = "position") - private Rectangle position; - - /* - * The opacity of the overlay. This is a value in the range [0 - 1.0]. - * Default is 1.0 which mean the overlay is opaque. - */ - @JsonProperty(value = "opacity") - private Double opacity; - - /* - * An optional rectangular window used to crop the overlay image or video. - */ - @JsonProperty(value = "cropRectangle") - private Rectangle cropRectangle; - - /** - * Get the position property: The location in the input video where the overlay is applied. - * - * @return the position value. - */ - public Rectangle position() { - return this.position; - } - - /** - * Set the position property: The location in the input video where the overlay is applied. - * - * @param position the position value to set. - * @return the VideoOverlay object itself. - */ - public VideoOverlay withPosition(Rectangle position) { - this.position = position; - return this; - } - - /** - * Get the opacity property: The opacity of the overlay. This is a value in the range [0 - 1.0]. Default is 1.0 - * which mean the overlay is opaque. - * - * @return the opacity value. - */ - public Double opacity() { - return this.opacity; - } - - /** - * Set the opacity property: The opacity of the overlay. This is a value in the range [0 - 1.0]. Default is 1.0 - * which mean the overlay is opaque. - * - * @param opacity the opacity value to set. - * @return the VideoOverlay object itself. - */ - public VideoOverlay withOpacity(Double opacity) { - this.opacity = opacity; - return this; - } - - /** - * Get the cropRectangle property: An optional rectangular window used to crop the overlay image or video. - * - * @return the cropRectangle value. - */ - public Rectangle cropRectangle() { - return this.cropRectangle; - } - - /** - * Set the cropRectangle property: An optional rectangular window used to crop the overlay image or video. - * - * @param cropRectangle the cropRectangle value to set. - * @return the VideoOverlay object itself. - */ - public VideoOverlay withCropRectangle(Rectangle cropRectangle) { - this.cropRectangle = cropRectangle; - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoOverlay withInputLabel(String inputLabel) { - super.withInputLabel(inputLabel); - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoOverlay withStart(Duration start) { - super.withStart(start); - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoOverlay withEnd(Duration end) { - super.withEnd(end); - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoOverlay withFadeInDuration(Duration fadeInDuration) { - super.withFadeInDuration(fadeInDuration); - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoOverlay withFadeOutDuration(Duration fadeOutDuration) { - super.withFadeOutDuration(fadeOutDuration); - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoOverlay withAudioGainLevel(Double audioGainLevel) { - super.withAudioGainLevel(audioGainLevel); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (position() != null) { - position().validate(); - } - if (cropRectangle() != null) { - cropRectangle().validate(); - } - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoSyncMode.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoSyncMode.java deleted file mode 100644 index 2b04e53616533..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoSyncMode.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.mediaservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for VideoSyncMode. */ -public final class VideoSyncMode extends ExpandableStringEnum { - /** Static value Auto for VideoSyncMode. */ - public static final VideoSyncMode AUTO = fromString("Auto"); - - /** Static value Passthrough for VideoSyncMode. */ - public static final VideoSyncMode PASSTHROUGH = fromString("Passthrough"); - - /** Static value Cfr for VideoSyncMode. */ - public static final VideoSyncMode CFR = fromString("Cfr"); - - /** Static value Vfr for VideoSyncMode. */ - public static final VideoSyncMode VFR = fromString("Vfr"); - - /** - * Creates or finds a VideoSyncMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding VideoSyncMode. - */ - @JsonCreator - public static VideoSyncMode fromString(String name) { - return fromString(name, VideoSyncMode.class); - } - - /** @return known VideoSyncMode values. */ - public static Collection values() { - return values(VideoSyncMode.class); - } -} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoTrackDescriptor.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoTrackDescriptor.java deleted file mode 100644 index 7703b9f462dd5..0000000000000 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/VideoTrackDescriptor.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.mediaservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A TrackSelection to select video tracks. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "@odata\\.type", - defaultImpl = VideoTrackDescriptor.class) -@JsonTypeName("#Microsoft.Media.VideoTrackDescriptor") -@JsonSubTypes({ - @JsonSubTypes.Type( - name = "#Microsoft.Media.SelectVideoTrackByAttribute", - value = SelectVideoTrackByAttribute.class), - @JsonSubTypes.Type(name = "#Microsoft.Media.SelectVideoTrackById", value = SelectVideoTrackById.class) -}) -@JsonFlatten -@Immutable -public class VideoTrackDescriptor extends TrackDescriptor { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoTrackDescriptor.class); - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -}