From 1c971a0c9bd672b1e7b9eed30c1e5ed41a812e69 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 29 Apr 2021 06:46:56 +0000 Subject: [PATCH] CodeGen from PR 14161 in Azure/azure-rest-api-specs Merge 8ae3f9bc38d1e80ca62ea55dc52d1156c2c790ab into dad4abaabaf043b347551523185925fac5b72543 --- .../CHANGELOG.md | 3 +- .../README.md | 4 +- .../pom.xml | 2 +- .../mediaservices/MediaServicesManager.java | 2 +- .../fluent/AzureMediaServices.java | 7 - .../fluent/MediaservicesClient.java | 30 +-- .../fluent/models/MediaServiceInner.java | 30 +++ .../fluent/models/OperationInner.java | 53 +++++ .../AccountFiltersClientImpl.java | 30 ++- .../AssetFiltersClientImpl.java | 30 ++- .../implementation/AssetImpl.java | 33 --- .../implementation/AssetsClientImpl.java | 48 ++-- .../AzureMediaServicesImpl.java | 13 -- .../ContentKeyPoliciesClientImpl.java | 36 ++- .../implementation/ContentKeyPolicyImpl.java | 14 -- .../mediaservices/implementation/JobImpl.java | 11 - .../implementation/JobsClientImpl.java | 36 ++- .../implementation/LiveEventImpl.java | 33 --- .../implementation/LiveEventsClientImpl.java | 54 +++-- .../implementation/LiveOutputsClientImpl.java | 24 +- .../implementation/LocationsClientImpl.java | 6 +- .../implementation/MediaServiceImpl.java | 96 +++++--- .../MediaservicesClientImpl.java | 214 ++++-------------- .../implementation/MediaservicesImpl.java | 22 -- .../implementation/OperationImpl.java | 9 + .../implementation/OperationsClientImpl.java | 7 +- .../PrivateEndpointConnectionsClientImpl.java | 24 +- .../PrivateLinkResourcesClientImpl.java | 12 +- .../implementation/StreamingEndpointImpl.java | 27 --- .../StreamingEndpointsClientImpl.java | 48 ++-- .../implementation/StreamingLocatorImpl.java | 23 -- .../StreamingLocatorsClientImpl.java | 36 ++- .../StreamingPoliciesClientImpl.java | 24 +- .../implementation/TransformsClientImpl.java | 30 ++- .../mediaservices/models/AccessControl.java | 80 +++++++ .../mediaservices/models/ActionType.java | 31 +++ .../mediaservices/models/Asset.java | 66 ------ .../models/ContentKeyPolicy.java | 21 -- .../mediaservices/models/DefaultAction.java | 34 +++ .../mediaservices/models/Job.java | 20 -- .../mediaservices/models/KeyDelivery.java | 53 +++++ .../mediaservices/models/LiveEvent.java | 79 ------- .../mediaservices/models/MediaService.java | 79 +++---- .../models/MediaServiceUpdate.java | 212 +++++++++++++++++ .../mediaservices/models/Mediaservices.java | 23 -- .../models/MetricSpecification.java | 60 +++++ .../mediaservices/models/Operation.java | 14 ++ .../models/StreamingEndpoint.java | 57 ----- .../models/StreamingLocator.java | 41 ---- 49 files changed, 1011 insertions(+), 930 deletions(-) create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AccessControl.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ActionType.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/DefaultAction.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/KeyDelivery.java create mode 100644 sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceUpdate.java diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md b/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md index 4ac56aa3865c..4fb729e24d52 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.1 (Unreleased) +## 1.0.0-beta.1 (2021-04-29) +- 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). ## 1.0.0 (2021-04-09) diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md b/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md index 61521c0f0bdb..96de32ef1656 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-2020-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-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-mediaservices - 1.0.0 + 1.1.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml index 86dd7726c3fe..44c2d2de1f6e 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml @@ -13,7 +13,7 @@ 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-2020-05. + 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 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 a303d75ac7b9..c0ca16cf8e04 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 @@ -218,7 +218,7 @@ public MediaServicesManager authenticate(TokenCredential credential, AzureProfil .append("-") .append("com.azure.resourcemanager.mediaservices") .append("/") - .append("1.0.0"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") 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 8b471b588920..0371eb663c9d 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,13 +23,6 @@ public interface AzureMediaServices { */ String getEndpoint(); - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - String getApiVersion(); - /** * Gets The HTTP pipeline to send requests through. * diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaservicesClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaservicesClient.java index f038d4d34ce4..0d3c2c3e64f3 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaservicesClient.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaservicesClient.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.mediaservices.fluent.models.EdgePoliciesInner; import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner; import com.azure.resourcemanager.mediaservices.models.ListEdgePoliciesInput; +import com.azure.resourcemanager.mediaservices.models.MediaServiceUpdate; import com.azure.resourcemanager.mediaservices.models.SyncStorageKeysInput; /** An instance of this class provides access to all the operations defined in MediaservicesClient. */ @@ -137,7 +138,7 @@ Response createOrUpdateWithResponse( * @return a Media Services account. */ @ServiceMethod(returns = ReturnType.SINGLE) - MediaServiceInner update(String resourceGroupName, String accountName, MediaServiceInner parameters); + MediaServiceInner update(String resourceGroupName, String accountName, MediaServiceUpdate parameters); /** * Updates an existing Media Services account. @@ -153,7 +154,7 @@ Response createOrUpdateWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( - String resourceGroupName, String accountName, MediaServiceInner parameters, Context context); + String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context); /** * Synchronizes storage account keys for a storage account associated with the Media Service account. @@ -235,29 +236,4 @@ Response listEdgePoliciesWithResponse( */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); - - /** - * Get the details of a Media Services account. - * - * @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 the details of a Media Services account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MediaServiceInner getBySubscription(String accountName); - - /** - * Get the details of a Media Services account. - * - * @param accountName The Media Services account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Media Services account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getBySubscriptionWithResponse(String accountName, Context context); } 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 f5f9435211db..037d2aa8ad67 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 @@ -10,6 +10,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; 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.StorageAccount; import com.azure.resourcemanager.mediaservices.models.StorageAuthentication; @@ -61,6 +62,12 @@ public class MediaServiceInner extends Resource { @JsonProperty(value = "properties.encryption") private AccountEncryption encryption; + /* + * The Key Delivery properties for Media Services account. + */ + @JsonProperty(value = "properties.keyDelivery") + private KeyDelivery keyDelivery; + /** * Get the identity property: The Managed Identity for the Media Services account. * @@ -159,6 +166,26 @@ public MediaServiceInner withEncryption(AccountEncryption encryption) { return this; } + /** + * Get the keyDelivery property: The Key Delivery properties for Media Services account. + * + * @return the keyDelivery value. + */ + public KeyDelivery keyDelivery() { + return this.keyDelivery; + } + + /** + * Set the keyDelivery property: The Key Delivery properties for Media Services account. + * + * @param keyDelivery the keyDelivery value to set. + * @return the MediaServiceInner object itself. + */ + public MediaServiceInner withKeyDelivery(KeyDelivery keyDelivery) { + this.keyDelivery = keyDelivery; + return this; + } + /** {@inheritDoc} */ @Override public MediaServiceInner withLocation(String location) { @@ -188,5 +215,8 @@ public void validate() { if (encryption() != null) { encryption().validate(); } + if (keyDelivery() != null) { + keyDelivery().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 index 89bcea6ac02f..b600e9eeaef2 100644 --- 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 @@ -6,6 +6,7 @@ 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; @@ -40,6 +41,18 @@ public final class OperationInner { @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. * @@ -120,6 +133,46 @@ public OperationInner withProperties(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. * 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 76d824182bc5..48356ab8f787 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,6 +186,7 @@ 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( @@ -196,7 +197,7 @@ private Mono> listSinglePageAsync(String resou this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, accept, context)) .>map( @@ -244,6 +245,7 @@ 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 @@ -252,7 +254,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, accept, context) .map( @@ -367,6 +369,7 @@ 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( @@ -378,7 +381,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, filterName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -421,6 +424,7 @@ 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 @@ -430,7 +434,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, filterName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -535,6 +539,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -546,7 +551,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, accountName, filterName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -600,6 +605,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -609,7 +615,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, accountName, filterName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -718,6 +724,7 @@ 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( @@ -729,7 +736,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, filterName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -772,6 +779,7 @@ 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 @@ -781,7 +789,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, filterName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -878,6 +886,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -889,7 +898,7 @@ private Mono> updateWithResponseAsync( resourceGroupName, accountName, filterName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -943,6 +952,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -952,7 +962,7 @@ private Mono> updateWithResponseAsync( resourceGroupName, accountName, filterName, - this.client.getApiVersion(), + apiVersion, 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 dadf89fae019..63eb81cd9fc0 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,6 +196,7 @@ 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( @@ -207,7 +208,7 @@ private Mono> listSinglePageAsync( resourceGroupName, accountName, assetName, - this.client.getApiVersion(), + apiVersion, accept, context)) .>map( @@ -259,6 +260,7 @@ 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 @@ -268,7 +270,7 @@ private Mono> listSinglePageAsync( resourceGroupName, accountName, assetName, - this.client.getApiVersion(), + apiVersion, accept, context) .map( @@ -394,6 +396,7 @@ 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( @@ -406,7 +409,7 @@ private Mono> getWithResponseAsync( accountName, assetName, filterName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -453,6 +456,7 @@ 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 @@ -463,7 +467,7 @@ private Mono> getWithResponseAsync( accountName, assetName, filterName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -580,6 +584,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -592,7 +597,7 @@ private Mono> createOrUpdateWithResponseAsync( accountName, assetName, filterName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -651,6 +656,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -661,7 +667,7 @@ private Mono> createOrUpdateWithResponseAsync( accountName, assetName, filterName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -788,6 +794,7 @@ 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( @@ -800,7 +807,7 @@ private Mono> deleteWithResponseAsync( accountName, assetName, filterName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -847,6 +854,7 @@ 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 @@ -857,7 +865,7 @@ private Mono> deleteWithResponseAsync( accountName, assetName, filterName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -965,6 +973,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -977,7 +986,7 @@ private Mono> updateWithResponseAsync( accountName, assetName, filterName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -1036,6 +1045,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1046,7 +1056,7 @@ private Mono> updateWithResponseAsync( accountName, assetName, filterName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetImpl.java index 76e4bdb5213b..c6bc99bb4ba2 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetImpl.java @@ -4,16 +4,11 @@ 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.AssetInner; import com.azure.resourcemanager.mediaservices.models.Asset; -import com.azure.resourcemanager.mediaservices.models.AssetContainerSas; import com.azure.resourcemanager.mediaservices.models.AssetStorageEncryptionFormat; -import com.azure.resourcemanager.mediaservices.models.ListContainerSasInput; -import com.azure.resourcemanager.mediaservices.models.ListStreamingLocatorsResponse; -import com.azure.resourcemanager.mediaservices.models.StorageEncryptedAssetDecryptionData; import java.time.OffsetDateTime; import java.util.UUID; @@ -168,34 +163,6 @@ public Asset refresh(Context context) { return this; } - public AssetContainerSas listContainerSas(ListContainerSasInput parameters) { - return serviceManager.assets().listContainerSas(resourceGroupName, accountName, assetName, parameters); - } - - public Response listContainerSasWithResponse(ListContainerSasInput parameters, Context context) { - return serviceManager - .assets() - .listContainerSasWithResponse(resourceGroupName, accountName, assetName, parameters, context); - } - - public StorageEncryptedAssetDecryptionData getEncryptionKey() { - return serviceManager.assets().getEncryptionKey(resourceGroupName, accountName, assetName); - } - - public Response getEncryptionKeyWithResponse(Context context) { - return serviceManager.assets().getEncryptionKeyWithResponse(resourceGroupName, accountName, assetName, context); - } - - public ListStreamingLocatorsResponse listStreamingLocators() { - return serviceManager.assets().listStreamingLocators(resourceGroupName, accountName, assetName); - } - - public Response listStreamingLocatorsWithResponse(Context context) { - return serviceManager - .assets() - .listStreamingLocatorsWithResponse(resourceGroupName, accountName, assetName, context); - } - public AssetImpl withAlternateId(String alternateId) { this.innerModel().withAlternateId(alternateId); return this; 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 ea7553186a95..2a2a50977c9f 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,6 +247,7 @@ 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( @@ -257,7 +258,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, filter, top, orderby, @@ -312,6 +313,7 @@ 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 @@ -320,7 +322,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, filter, top, orderby, @@ -477,6 +479,7 @@ 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( @@ -488,7 +491,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, assetName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -531,6 +534,7 @@ 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 @@ -540,7 +544,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, assetName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -645,6 +649,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -656,7 +661,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, accountName, assetName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -706,6 +711,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -715,7 +721,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, accountName, assetName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -820,6 +826,7 @@ 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( @@ -831,7 +838,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, assetName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -874,6 +881,7 @@ 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 @@ -883,7 +891,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, assetName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -980,6 +988,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -991,7 +1000,7 @@ private Mono> updateWithResponseAsync( resourceGroupName, accountName, assetName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -1041,6 +1050,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1050,7 +1060,7 @@ private Mono> updateWithResponseAsync( resourceGroupName, accountName, assetName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -1161,6 +1171,7 @@ private Mono> listContainerSasWithResponseAsync } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1172,7 +1183,7 @@ private Mono> listContainerSasWithResponseAsync resourceGroupName, accountName, assetName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -1227,6 +1238,7 @@ private Mono> listContainerSasWithResponseAsync } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1236,7 +1248,7 @@ private Mono> listContainerSasWithResponseAsync resourceGroupName, accountName, assetName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -1349,6 +1361,7 @@ 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( @@ -1360,7 +1373,7 @@ private Mono> getEncryptionKe resourceGroupName, accountName, assetName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1403,6 +1416,7 @@ 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 @@ -1412,7 +1426,7 @@ private Mono> getEncryptionKe resourceGroupName, accountName, assetName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -1513,6 +1527,7 @@ 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( @@ -1524,7 +1539,7 @@ private Mono> listStreamingLocators resourceGroupName, accountName, assetName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1567,6 +1582,7 @@ 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 @@ -1576,7 +1592,7 @@ private Mono> listStreamingLocators resourceGroupName, accountName, assetName, - this.client.getApiVersion(), + apiVersion, 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 883579bf4d55..d316d8fd8d83 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 @@ -77,18 +77,6 @@ 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; @@ -339,7 +327,6 @@ public StreamingEndpointsClient getStreamingEndpoints() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2020-05-01"; this.accountFilters = new AccountFiltersClientImpl(this); this.operations = new OperationsClientImpl(this); this.mediaservices = new MediaservicesClientImpl(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 2ce83c4be7f6..748ce1c2737b 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 @@ -212,6 +212,7 @@ 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 +223,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, filter, top, orderby, @@ -277,6 +278,7 @@ 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 @@ -285,7 +287,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, filter, top, orderby, @@ -443,6 +445,7 @@ 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( @@ -454,7 +457,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, contentKeyPolicyName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -498,6 +501,7 @@ 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 @@ -507,7 +511,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, contentKeyPolicyName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -614,6 +618,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -625,7 +630,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, accountName, contentKeyPolicyName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -680,6 +685,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -689,7 +695,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, accountName, contentKeyPolicyName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -801,6 +807,7 @@ 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( @@ -812,7 +819,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, contentKeyPolicyName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -856,6 +863,7 @@ 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 @@ -865,7 +873,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, contentKeyPolicyName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -963,6 +971,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -974,7 +983,7 @@ private Mono> updateWithResponseAsync( resourceGroupName, accountName, contentKeyPolicyName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -1029,6 +1038,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1038,7 +1048,7 @@ private Mono> updateWithResponseAsync( resourceGroupName, accountName, contentKeyPolicyName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -1149,6 +1159,7 @@ 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( @@ -1160,7 +1171,7 @@ private Mono> getPolicyPropertiesWithS resourceGroupName, accountName, contentKeyPolicyName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1204,6 +1215,7 @@ 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 @@ -1213,7 +1225,7 @@ private Mono> getPolicyPropertiesWithS resourceGroupName, accountName, contentKeyPolicyName, - this.client.getApiVersion(), + apiVersion, accept, context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPolicyImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPolicyImpl.java index d54dc00dc19c..a43becfe3b13 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPolicyImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPolicyImpl.java @@ -4,13 +4,11 @@ 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.ContentKeyPolicyInner; import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicy; import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyOption; -import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicyProperties; import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; @@ -166,18 +164,6 @@ public ContentKeyPolicy refresh(Context context) { return this; } - public ContentKeyPolicyProperties getPolicyPropertiesWithSecrets() { - return serviceManager - .contentKeyPolicies() - .getPolicyPropertiesWithSecrets(resourceGroupName, accountName, contentKeyPolicyName); - } - - public Response getPolicyPropertiesWithSecretsWithResponse(Context context) { - return serviceManager - .contentKeyPolicies() - .getPolicyPropertiesWithSecretsWithResponse(resourceGroupName, accountName, contentKeyPolicyName, context); - } - public ContentKeyPolicyImpl withDescription(String description) { this.innerModel().withDescription(description); return this; 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 index 379872b2fb62..72845f5eb99f 100644 --- 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 @@ -4,7 +4,6 @@ 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; @@ -193,16 +192,6 @@ public Job refresh(Context context) { 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; 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 index 83266e04e75e..733501187c2f 100644 --- 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 @@ -217,6 +217,7 @@ private Mono> listSinglePageAsync( 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( @@ -228,7 +229,7 @@ private Mono> listSinglePageAsync( resourceGroupName, accountName, transformName, - this.client.getApiVersion(), + apiVersion, filter, orderby, accept, @@ -289,6 +290,7 @@ private Mono> listSinglePageAsync( 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 @@ -298,7 +300,7 @@ private Mono> listSinglePageAsync( resourceGroupName, accountName, transformName, - this.client.getApiVersion(), + apiVersion, filter, orderby, accept, @@ -465,6 +467,7 @@ private Mono> getWithResponseAsync( 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( @@ -477,7 +480,7 @@ private Mono> getWithResponseAsync( accountName, transformName, jobName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -524,6 +527,7 @@ private Mono> getWithResponseAsync( 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 @@ -534,7 +538,7 @@ private Mono> getWithResponseAsync( accountName, transformName, jobName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -647,6 +651,7 @@ private Mono> createWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -659,7 +664,7 @@ private Mono> createWithResponseAsync( accountName, transformName, jobName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -718,6 +723,7 @@ private Mono> createWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -728,7 +734,7 @@ private Mono> createWithResponseAsync( accountName, transformName, jobName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -846,6 +852,7 @@ private Mono> deleteWithResponseAsync( 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( @@ -858,7 +865,7 @@ private Mono> deleteWithResponseAsync( accountName, transformName, jobName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -905,6 +912,7 @@ private Mono> deleteWithResponseAsync( 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 @@ -915,7 +923,7 @@ private Mono> deleteWithResponseAsync( accountName, transformName, jobName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -1020,6 +1028,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1032,7 +1041,7 @@ private Mono> updateWithResponseAsync( accountName, transformName, jobName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -1092,6 +1101,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1102,7 +1112,7 @@ private Mono> updateWithResponseAsync( accountName, transformName, jobName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -1223,6 +1233,7 @@ private Mono> cancelJobWithResponseAsync( 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( @@ -1235,7 +1246,7 @@ private Mono> cancelJobWithResponseAsync( accountName, transformName, jobName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1282,6 +1293,7 @@ private Mono> cancelJobWithResponseAsync( 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 @@ -1292,7 +1304,7 @@ private Mono> cancelJobWithResponseAsync( accountName, transformName, jobName, - this.client.getApiVersion(), + apiVersion, accept, context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveEventImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveEventImpl.java index 51a51709621d..8af8f0038b59 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveEventImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveEventImpl.java @@ -10,7 +10,6 @@ import com.azure.resourcemanager.mediaservices.fluent.models.LiveEventInner; import com.azure.resourcemanager.mediaservices.models.CrossSiteAccessPolicies; import com.azure.resourcemanager.mediaservices.models.LiveEvent; -import com.azure.resourcemanager.mediaservices.models.LiveEventActionInput; import com.azure.resourcemanager.mediaservices.models.LiveEventEncoding; import com.azure.resourcemanager.mediaservices.models.LiveEventInput; import com.azure.resourcemanager.mediaservices.models.LiveEventPreview; @@ -225,38 +224,6 @@ public LiveEvent refresh(Context context) { return this; } - public void allocate() { - serviceManager.liveEvents().allocate(resourceGroupName, accountName, liveEventName); - } - - public void allocate(Context context) { - serviceManager.liveEvents().allocate(resourceGroupName, accountName, liveEventName, context); - } - - public void start() { - serviceManager.liveEvents().start(resourceGroupName, accountName, liveEventName); - } - - public void start(Context context) { - serviceManager.liveEvents().start(resourceGroupName, accountName, liveEventName, context); - } - - public void stop(LiveEventActionInput parameters) { - serviceManager.liveEvents().stop(resourceGroupName, accountName, liveEventName, parameters); - } - - public void stop(LiveEventActionInput parameters, Context context) { - serviceManager.liveEvents().stop(resourceGroupName, accountName, liveEventName, parameters, context); - } - - public void reset() { - serviceManager.liveEvents().reset(resourceGroupName, accountName, liveEventName); - } - - public void reset(Context context) { - serviceManager.liveEvents().reset(resourceGroupName, accountName, liveEventName, context); - } - public LiveEventImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; 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 8182f925da39..0b4a2a3ce044 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,6 +259,7 @@ 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( @@ -269,7 +270,7 @@ private Mono> listSinglePageAsync(String resourceG this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, accept, context)) .>map( @@ -317,6 +318,7 @@ 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 @@ -325,7 +327,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, accept, context) .map( @@ -440,6 +442,7 @@ 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( @@ -451,7 +454,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -494,6 +497,7 @@ 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 @@ -503,7 +507,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -613,6 +617,7 @@ private Mono>> createWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -624,7 +629,7 @@ private Mono>> createWithResponseAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, autoStart, parameters, accept, @@ -681,6 +686,7 @@ private Mono>> createWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -690,7 +696,7 @@ private Mono>> createWithResponseAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, autoStart, parameters, accept, @@ -987,6 +993,7 @@ private Mono>> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -998,7 +1005,7 @@ private Mono>> updateWithResponseAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -1052,6 +1059,7 @@ private Mono>> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1061,7 +1069,7 @@ private Mono>> updateWithResponseAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -1282,6 +1290,7 @@ 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( @@ -1293,7 +1302,7 @@ private Mono>> deleteWithResponseAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1336,6 +1345,7 @@ 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 @@ -1345,7 +1355,7 @@ private Mono>> deleteWithResponseAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -1533,6 +1543,7 @@ 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( @@ -1544,7 +1555,7 @@ private Mono>> allocateWithResponseAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1587,6 +1598,7 @@ 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 @@ -1596,7 +1608,7 @@ private Mono>> allocateWithResponseAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -1785,6 +1797,7 @@ 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( @@ -1796,7 +1809,7 @@ private Mono>> startWithResponseAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1839,6 +1852,7 @@ 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 @@ -1848,7 +1862,7 @@ private Mono>> startWithResponseAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -2041,6 +2055,7 @@ private Mono>> stopWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2052,7 +2067,7 @@ private Mono>> stopWithResponseAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -2106,6 +2121,7 @@ private Mono>> stopWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2115,7 +2131,7 @@ private Mono>> stopWithResponseAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -2334,6 +2350,7 @@ 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( @@ -2345,7 +2362,7 @@ private Mono>> resetWithResponseAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -2390,6 +2407,7 @@ 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 @@ -2399,7 +2417,7 @@ private Mono>> resetWithResponseAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, accept, context); } 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 59357c3e0e78..55a6960be7a3 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,6 +182,7 @@ 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( @@ -193,7 +194,7 @@ private Mono> listSinglePageAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, accept, context)) .>map( @@ -245,6 +246,7 @@ 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 @@ -254,7 +256,7 @@ private Mono> listSinglePageAsync( resourceGroupName, accountName, liveEventName, - this.client.getApiVersion(), + apiVersion, accept, context) .map( @@ -380,6 +382,7 @@ 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( @@ -392,7 +395,7 @@ private Mono> getWithResponseAsync( accountName, liveEventName, liveOutputName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -439,6 +442,7 @@ 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 @@ -449,7 +453,7 @@ private Mono> getWithResponseAsync( accountName, liveEventName, liveOutputName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -567,6 +571,7 @@ private Mono>> createWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -579,7 +584,7 @@ private Mono>> createWithResponseAsync( accountName, liveEventName, liveOutputName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -638,6 +643,7 @@ private Mono>> createWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -648,7 +654,7 @@ private Mono>> createWithResponseAsync( accountName, liveEventName, liveOutputName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -903,6 +909,7 @@ 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( @@ -915,7 +922,7 @@ private Mono>> deleteWithResponseAsync( accountName, liveEventName, liveOutputName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -962,6 +969,7 @@ 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 @@ -972,7 +980,7 @@ private Mono>> deleteWithResponseAsync( accountName, liveEventName, liveOutputName, - this.client.getApiVersion(), + apiVersion, 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 3cfa950cbd97..6c9f0aafb37e 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,6 +104,7 @@ private Mono> checkNameAvailabi } else { parameters.validate(); } + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -113,7 +114,7 @@ private Mono> checkNameAvailabi this.client.getEndpoint(), this.client.getSubscriptionId(), locationName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -154,6 +155,7 @@ private Mono> checkNameAvailabi } else { parameters.validate(); } + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -161,7 +163,7 @@ private Mono> checkNameAvailabi this.client.getEndpoint(), this.client.getSubscriptionId(), locationName, - this.client.getApiVersion(), + apiVersion, 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 3353a5a40815..1d6495eef494 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 @@ -4,19 +4,17 @@ package com.azure.resourcemanager.mediaservices.implementation; -import com.azure.core.http.rest.Response; import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner; import com.azure.resourcemanager.mediaservices.models.AccountEncryption; -import com.azure.resourcemanager.mediaservices.models.EdgePolicies; -import com.azure.resourcemanager.mediaservices.models.ListEdgePoliciesInput; +import com.azure.resourcemanager.mediaservices.models.KeyDelivery; 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.StorageAccount; import com.azure.resourcemanager.mediaservices.models.StorageAuthentication; -import com.azure.resourcemanager.mediaservices.models.SyncStorageKeysInput; import java.util.Collections; import java.util.List; import java.util.Map; @@ -81,6 +79,10 @@ public AccountEncryption encryption() { return this.innerModel().encryption(); } + public KeyDelivery keyDelivery() { + return this.innerModel().keyDelivery(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -101,6 +103,8 @@ private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() { private String accountName; + private MediaServiceUpdate updateParameters; + public MediaServiceImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; return this; @@ -133,6 +137,7 @@ public MediaService create(Context context) { } public MediaServiceImpl update() { + this.updateParameters = new MediaServiceUpdate(); return this; } @@ -141,7 +146,7 @@ public MediaService apply() { serviceManager .serviceClient() .getMediaservices() - .updateWithResponse(resourceGroupName, accountName, this.innerModel(), Context.NONE) + .updateWithResponse(resourceGroupName, accountName, updateParameters, Context.NONE) .getValue(); return this; } @@ -151,7 +156,7 @@ public MediaService apply(Context context) { serviceManager .serviceClient() .getMediaservices() - .updateWithResponse(resourceGroupName, accountName, this.innerModel(), context) + .updateWithResponse(resourceGroupName, accountName, updateParameters, context) .getValue(); return this; } @@ -184,26 +189,6 @@ public MediaService refresh(Context context) { return this; } - public void syncStorageKeys(SyncStorageKeysInput parameters) { - serviceManager.mediaservices().syncStorageKeys(resourceGroupName, accountName, parameters); - } - - public Response syncStorageKeysWithResponse(SyncStorageKeysInput parameters, Context context) { - return serviceManager - .mediaservices() - .syncStorageKeysWithResponse(resourceGroupName, accountName, parameters, context); - } - - public EdgePolicies listEdgePolicies(ListEdgePoliciesInput parameters) { - return serviceManager.mediaservices().listEdgePolicies(resourceGroupName, accountName, parameters); - } - - public Response listEdgePoliciesWithResponse(ListEdgePoliciesInput parameters, Context context) { - return serviceManager - .mediaservices() - .listEdgePoliciesWithResponse(resourceGroupName, accountName, parameters, context); - } - public MediaServiceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -215,27 +200,66 @@ public MediaServiceImpl withRegion(String location) { } public MediaServiceImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } } public MediaServiceImpl withIdentity(MediaServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateParameters.withIdentity(identity); + return this; + } } public MediaServiceImpl withStorageAccounts(List storageAccounts) { - this.innerModel().withStorageAccounts(storageAccounts); - return this; + if (isInCreateMode()) { + this.innerModel().withStorageAccounts(storageAccounts); + return this; + } else { + this.updateParameters.withStorageAccounts(storageAccounts); + return this; + } } public MediaServiceImpl withStorageAuthentication(StorageAuthentication storageAuthentication) { - this.innerModel().withStorageAuthentication(storageAuthentication); - return this; + if (isInCreateMode()) { + this.innerModel().withStorageAuthentication(storageAuthentication); + return this; + } else { + this.updateParameters.withStorageAuthentication(storageAuthentication); + return this; + } } public MediaServiceImpl withEncryption(AccountEncryption encryption) { - this.innerModel().withEncryption(encryption); - return this; + if (isInCreateMode()) { + this.innerModel().withEncryption(encryption); + return this; + } else { + this.updateParameters.withEncryption(encryption); + return this; + } + } + + public MediaServiceImpl withKeyDelivery(KeyDelivery keyDelivery) { + if (isInCreateMode()) { + this.innerModel().withKeyDelivery(keyDelivery); + return this; + } else { + this.updateParameters.withKeyDelivery(keyDelivery); + 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 a06d76513a33..0b93f8b1d7a8 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 @@ -36,6 +36,7 @@ import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner; import com.azure.resourcemanager.mediaservices.models.ListEdgePoliciesInput; import com.azure.resourcemanager.mediaservices.models.MediaServiceCollection; +import com.azure.resourcemanager.mediaservices.models.MediaServiceUpdate; import com.azure.resourcemanager.mediaservices.models.SyncStorageKeysInput; import reactor.core.publisher.Mono; @@ -139,7 +140,7 @@ Mono> update( @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MediaServiceInner parameters, + @BodyParam("application/json") MediaServiceUpdate parameters, @HeaderParam("Accept") String accept, Context context); @@ -186,18 +187,6 @@ Mono> list( @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Media/mediaservices/{accountName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getBySubscription( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -246,6 +235,7 @@ 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( @@ -255,7 +245,7 @@ private Mono> listByResourceGroupSinglePageAsyn this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, accept, context)) .>map( @@ -299,6 +289,7 @@ 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 @@ -306,7 +297,7 @@ private Mono> listByResourceGroupSinglePageAsyn this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), + apiVersion, accept, context) .map( @@ -413,6 +404,7 @@ 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( @@ -423,7 +415,7 @@ private Mono> getByResourceGroupWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -462,6 +454,7 @@ 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 @@ -470,7 +463,7 @@ private Mono> getByResourceGroupWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -568,6 +561,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -578,7 +572,7 @@ private Mono> createOrUpdateWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -624,6 +618,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -632,7 +627,7 @@ private Mono> createOrUpdateWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -729,6 +724,7 @@ 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( @@ -739,7 +735,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -778,6 +774,7 @@ 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 @@ -786,7 +783,7 @@ private Mono> deleteWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -849,7 +846,7 @@ public Response deleteWithResponse(String resourceGroupName, String accoun */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( - String resourceGroupName, String accountName, MediaServiceInner parameters) { + String resourceGroupName, String accountName, MediaServiceUpdate parameters) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -874,6 +871,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -884,7 +882,7 @@ private Mono> updateWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -905,7 +903,7 @@ private Mono> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( - String resourceGroupName, String accountName, MediaServiceInner parameters, Context context) { + String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -930,6 +928,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -938,7 +937,7 @@ private Mono> updateWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -957,7 +956,7 @@ private Mono> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( - String resourceGroupName, String accountName, MediaServiceInner parameters) { + String resourceGroupName, String accountName, MediaServiceUpdate parameters) { return updateWithResponseAsync(resourceGroupName, accountName, parameters) .flatMap( (Response res) -> { @@ -981,7 +980,7 @@ private Mono updateAsync( * @return a Media Services account. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MediaServiceInner update(String resourceGroupName, String accountName, MediaServiceInner parameters) { + public MediaServiceInner update(String resourceGroupName, String accountName, MediaServiceUpdate parameters) { return updateAsync(resourceGroupName, accountName, parameters).block(); } @@ -999,7 +998,7 @@ public MediaServiceInner update(String resourceGroupName, String accountName, Me */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( - String resourceGroupName, String accountName, MediaServiceInner parameters, Context context) { + String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context) { return updateWithResponseAsync(resourceGroupName, accountName, parameters, context).block(); } @@ -1041,6 +1040,7 @@ private Mono> syncStorageKeysWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1051,7 +1051,7 @@ private Mono> syncStorageKeysWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -1097,6 +1097,7 @@ private Mono> syncStorageKeysWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1105,7 +1106,7 @@ private Mono> syncStorageKeysWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -1200,6 +1201,7 @@ private Mono> listEdgePoliciesWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1210,7 +1212,7 @@ private Mono> listEdgePoliciesWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -1256,6 +1258,7 @@ private Mono> listEdgePoliciesWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1264,7 +1267,7 @@ private Mono> listEdgePoliciesWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -1351,17 +1354,13 @@ 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(), - this.client.getApiVersion(), - accept, - context)) + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context)) .>map( res -> new PagedResponseBase<>( @@ -1397,15 +1396,11 @@ 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(), - this.client.getApiVersion(), - accept, - context) + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) .map( res -> new PagedResponseBase<>( @@ -1471,137 +1466,6 @@ public PagedIterable list(Context context) { return new PagedIterable<>(listAsync(context)); } - /** - * Get the details of a Media Services account. - * - * @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 the details of a Media Services account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getBySubscriptionWithResponseAsync(String accountName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getBySubscription( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - accountName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the details of a Media Services account. - * - * @param accountName The Media Services account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Media Services account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getBySubscriptionWithResponseAsync(String accountName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getBySubscription( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - accountName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get the details of a Media Services account. - * - * @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 the details of a Media Services account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getBySubscriptionAsync(String accountName) { - return getBySubscriptionWithResponseAsync(accountName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get the details of a Media Services account. - * - * @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 the details of a Media Services account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MediaServiceInner getBySubscription(String accountName) { - return getBySubscriptionAsync(accountName).block(); - } - - /** - * Get the details of a Media Services account. - * - * @param accountName The Media Services account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Media Services account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getBySubscriptionWithResponse(String accountName, Context context) { - return getBySubscriptionWithResponseAsync(accountName, context).block(); - } - /** * Get the next page of items. * diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesImpl.java index 12be89e999d4..9a6f1e00c0ce 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesImpl.java @@ -118,28 +118,6 @@ public PagedIterable list(Context context) { return Utils.mapPage(inner, inner1 -> new MediaServiceImpl(inner1, this.manager())); } - public MediaService getBySubscription(String accountName) { - MediaServiceInner inner = this.serviceClient().getBySubscription(accountName); - if (inner != null) { - return new MediaServiceImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getBySubscriptionWithResponse(String accountName, Context context) { - Response inner = this.serviceClient().getBySubscriptionWithResponse(accountName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new MediaServiceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - public MediaService getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { 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 index 7706bd5cffd0..b7a1d9f6fc75 100644 --- 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 @@ -5,6 +5,7 @@ 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; @@ -36,6 +37,14 @@ 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; } 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 3fce217e0bc3..4ccae7ab1d58 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 @@ -95,10 +95,10 @@ private Mono> listSinglePageAsync() { 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(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) .>map( res -> new PagedResponseBase<>( @@ -128,10 +128,11 @@ private Mono> listSinglePageAsync(Context context) 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(), this.client.getApiVersion(), accept, context) + .list(this.client.getEndpoint(), apiVersion, accept, context) .map( res -> new PagedResponseBase<>( 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 72e358f87eed..521570eea1b5 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 @@ -157,6 +157,7 @@ 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( @@ -167,7 +168,7 @@ private Mono> listWithRespons this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -206,6 +207,7 @@ 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 @@ -214,7 +216,7 @@ private Mono> listWithRespons this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -310,6 +312,7 @@ 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( @@ -321,7 +324,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, name, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -364,6 +367,7 @@ 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 @@ -373,7 +377,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, name, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -478,6 +482,7 @@ private Mono> createOrUpdateWithRespons } else { parameters.validate(); } + final String apiVersion = "2021-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -489,7 +494,7 @@ private Mono> createOrUpdateWithRespons resourceGroupName, accountName, name, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -543,6 +548,7 @@ private Mono> createOrUpdateWithRespons } else { parameters.validate(); } + final String apiVersion = "2021-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -552,7 +558,7 @@ private Mono> createOrUpdateWithRespons resourceGroupName, accountName, name, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -660,6 +666,7 @@ 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( @@ -671,7 +678,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S resourceGroupName, accountName, name, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -714,6 +721,7 @@ 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 @@ -723,7 +731,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, name, - this.client.getApiVersion(), + apiVersion, 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 c92e334c5afa..eed462388c86 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,6 +120,7 @@ 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( @@ -130,7 +131,7 @@ private Mono> listWithResponseAsync this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -169,6 +170,7 @@ 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 @@ -177,7 +179,7 @@ private Mono> listWithResponseAsync this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -273,6 +275,7 @@ 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( @@ -284,7 +287,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, name, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -327,6 +330,7 @@ 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 @@ -336,7 +340,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, name, - this.client.getApiVersion(), + apiVersion, accept, context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointImpl.java index ee09eaa393f6..5cf356e6667b 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointImpl.java @@ -12,7 +12,6 @@ import com.azure.resourcemanager.mediaservices.models.StreamingEndpoint; import com.azure.resourcemanager.mediaservices.models.StreamingEndpointAccessControl; import com.azure.resourcemanager.mediaservices.models.StreamingEndpointResourceState; -import com.azure.resourcemanager.mediaservices.models.StreamingEntityScaleUnit; import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; @@ -236,32 +235,6 @@ public StreamingEndpoint refresh(Context context) { return this; } - public void start() { - serviceManager.streamingEndpoints().start(resourceGroupName, accountName, streamingEndpointName); - } - - public void start(Context context) { - serviceManager.streamingEndpoints().start(resourceGroupName, accountName, streamingEndpointName, context); - } - - public void stop() { - serviceManager.streamingEndpoints().stop(resourceGroupName, accountName, streamingEndpointName); - } - - public void stop(Context context) { - serviceManager.streamingEndpoints().stop(resourceGroupName, accountName, streamingEndpointName, context); - } - - public void scale(StreamingEntityScaleUnit parameters) { - serviceManager.streamingEndpoints().scale(resourceGroupName, accountName, streamingEndpointName, parameters); - } - - public void scale(StreamingEntityScaleUnit parameters, Context context) { - serviceManager - .streamingEndpoints() - .scale(resourceGroupName, accountName, streamingEndpointName, parameters, context); - } - public StreamingEndpointImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; 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 9ac0ad4ae1ec..7d3ca3b07737 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,6 +244,7 @@ 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( @@ -254,7 +255,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, accept, context)) .>map( @@ -302,6 +303,7 @@ 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 @@ -310,7 +312,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, accept, context) .map( @@ -426,6 +428,7 @@ 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( @@ -437,7 +440,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -481,6 +484,7 @@ 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 @@ -490,7 +494,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -602,6 +606,7 @@ private Mono>> createWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -613,7 +618,7 @@ private Mono>> createWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - this.client.getApiVersion(), + apiVersion, autoStart, parameters, accept, @@ -671,6 +676,7 @@ private Mono>> createWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -680,7 +686,7 @@ private Mono>> createWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - this.client.getApiVersion(), + apiVersion, autoStart, parameters, accept, @@ -989,6 +995,7 @@ private Mono>> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1000,7 +1007,7 @@ private Mono>> updateWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -1055,6 +1062,7 @@ private Mono>> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1064,7 +1072,7 @@ private Mono>> updateWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -1295,6 +1303,7 @@ 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( @@ -1306,7 +1315,7 @@ private Mono>> deleteWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1350,6 +1359,7 @@ 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 @@ -1359,7 +1369,7 @@ private Mono>> deleteWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -1549,6 +1559,7 @@ 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( @@ -1560,7 +1571,7 @@ private Mono>> startWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1604,6 +1615,7 @@ 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 @@ -1613,7 +1625,7 @@ private Mono>> startWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -1803,6 +1815,7 @@ 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( @@ -1814,7 +1827,7 @@ private Mono>> stopWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1858,6 +1871,7 @@ 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 @@ -1867,7 +1881,7 @@ private Mono>> stopWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -2066,6 +2080,7 @@ private Mono>> scaleWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2077,7 +2092,7 @@ private Mono>> scaleWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -2132,6 +2147,7 @@ private Mono>> scaleWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2141,7 +2157,7 @@ private Mono>> scaleWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorImpl.java index a98cb68e4d0f..cf66f2b92d9b 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorImpl.java @@ -4,12 +4,9 @@ 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.StreamingLocatorInner; -import com.azure.resourcemanager.mediaservices.models.ListContentKeysResponse; -import com.azure.resourcemanager.mediaservices.models.ListPathsResponse; import com.azure.resourcemanager.mediaservices.models.StreamingLocator; import com.azure.resourcemanager.mediaservices.models.StreamingLocatorContentKey; import java.time.OffsetDateTime; @@ -162,26 +159,6 @@ public StreamingLocator refresh(Context context) { return this; } - public ListContentKeysResponse listContentKeys() { - return serviceManager.streamingLocators().listContentKeys(resourceGroupName, accountName, streamingLocatorName); - } - - public Response listContentKeysWithResponse(Context context) { - return serviceManager - .streamingLocators() - .listContentKeysWithResponse(resourceGroupName, accountName, streamingLocatorName, context); - } - - public ListPathsResponse listPaths() { - return serviceManager.streamingLocators().listPaths(resourceGroupName, accountName, streamingLocatorName); - } - - public Response listPathsWithResponse(Context context) { - return serviceManager - .streamingLocators() - .listPathsWithResponse(resourceGroupName, accountName, streamingLocatorName, context); - } - public StreamingLocatorImpl withAssetName(String assetName) { this.innerModel().withAssetName(assetName); return this; 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 6dd8c6b5ae75..2d63c12be19f 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,6 +211,7 @@ 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( @@ -221,7 +222,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, filter, top, orderby, @@ -276,6 +277,7 @@ 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 @@ -284,7 +286,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, filter, top, orderby, @@ -442,6 +444,7 @@ 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( @@ -453,7 +456,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -497,6 +500,7 @@ 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 @@ -506,7 +510,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -613,6 +617,7 @@ private Mono> createWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -624,7 +629,7 @@ private Mono> createWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -679,6 +684,7 @@ private Mono> createWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -688,7 +694,7 @@ private Mono> createWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -799,6 +805,7 @@ 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( @@ -810,7 +817,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -854,6 +861,7 @@ 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 @@ -863,7 +871,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -955,6 +963,7 @@ 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( @@ -966,7 +975,7 @@ private Mono> listContentKeysWithResponse resourceGroupName, accountName, streamingLocatorName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1010,6 +1019,7 @@ 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 @@ -1019,7 +1029,7 @@ private Mono> listContentKeysWithResponse resourceGroupName, accountName, streamingLocatorName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -1121,6 +1131,7 @@ 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( @@ -1132,7 +1143,7 @@ private Mono> listPathsWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1176,6 +1187,7 @@ 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 @@ -1185,7 +1197,7 @@ private Mono> listPathsWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - this.client.getApiVersion(), + apiVersion, 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 9659b88cf3a9..a9faa8afdd6b 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,6 +176,7 @@ 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( @@ -186,7 +187,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, filter, top, orderby, @@ -241,6 +242,7 @@ 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 @@ -249,7 +251,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, filter, top, orderby, @@ -407,6 +409,7 @@ 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( @@ -418,7 +421,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -462,6 +465,7 @@ 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 @@ -471,7 +475,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -578,6 +582,7 @@ private Mono> createWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -589,7 +594,7 @@ private Mono> createWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -644,6 +649,7 @@ private Mono> createWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -653,7 +659,7 @@ private Mono> createWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -764,6 +770,7 @@ 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( @@ -775,7 +782,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -819,6 +826,7 @@ 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 @@ -828,7 +836,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - this.client.getApiVersion(), + apiVersion, accept, context); } 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 index e41fb3c8803c..e06a648fe2fc 100644 --- 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 @@ -191,6 +191,7 @@ 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( @@ -201,7 +202,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, filter, orderby, accept, @@ -253,6 +254,7 @@ 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 @@ -261,7 +263,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - this.client.getApiVersion(), + apiVersion, filter, orderby, accept, @@ -409,6 +411,7 @@ private Mono> getWithResponseAsync( 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( @@ -420,7 +423,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, transformName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -463,6 +466,7 @@ private Mono> getWithResponseAsync( 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 @@ -472,7 +476,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, transformName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -578,6 +582,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -589,7 +594,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, accountName, transformName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -644,6 +649,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -653,7 +659,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, accountName, transformName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); @@ -766,6 +772,7 @@ private Mono> deleteWithResponseAsync( 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( @@ -777,7 +784,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, transformName, - this.client.getApiVersion(), + apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -820,6 +827,7 @@ private Mono> deleteWithResponseAsync( 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 @@ -829,7 +837,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, transformName, - this.client.getApiVersion(), + apiVersion, accept, context); } @@ -927,6 +935,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -938,7 +947,7 @@ private Mono> updateWithResponseAsync( resourceGroupName, accountName, transformName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context)) @@ -993,6 +1002,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } + final String apiVersion = "2020-05-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1002,7 +1012,7 @@ private Mono> updateWithResponseAsync( resourceGroupName, accountName, transformName, - this.client.getApiVersion(), + apiVersion, parameters, accept, context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AccessControl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AccessControl.java new file mode 100644 index 000000000000..660727e45037 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/AccessControl.java @@ -0,0 +1,80 @@ +// 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; + +/** The AccessControl model. */ +@Fluent +public final class AccessControl { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AccessControl.class); + + /* + * The behavior for IP access control in Key Delivery. + */ + @JsonProperty(value = "defaultAction") + private DefaultAction defaultAction; + + /* + * The IP allow list for access control in Key Delivery. If the default + * action is set to 'Allow', the IP allow list must be empty. + */ + @JsonProperty(value = "ipAllowList") + private List ipAllowList; + + /** + * Get the defaultAction property: The behavior for IP access control in Key Delivery. + * + * @return the defaultAction value. + */ + public DefaultAction defaultAction() { + return this.defaultAction; + } + + /** + * Set the defaultAction property: The behavior for IP access control in Key Delivery. + * + * @param defaultAction the defaultAction value to set. + * @return the AccessControl object itself. + */ + public AccessControl withDefaultAction(DefaultAction defaultAction) { + this.defaultAction = defaultAction; + return this; + } + + /** + * Get the ipAllowList property: The IP allow list for access control in Key Delivery. If the default action is set + * to 'Allow', the IP allow list must be empty. + * + * @return the ipAllowList value. + */ + public List ipAllowList() { + return this.ipAllowList; + } + + /** + * Set the ipAllowList property: The IP allow list for access control in Key Delivery. If the default action is set + * to 'Allow', the IP allow list must be empty. + * + * @param ipAllowList the ipAllowList value to set. + * @return the AccessControl object itself. + */ + public AccessControl withIpAllowList(List ipAllowList) { + this.ipAllowList = ipAllowList; + 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/ActionType.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ActionType.java new file mode 100644 index 000000000000..8c8b65a30b3c --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ActionType.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ActionType. */ +public final class ActionType extends ExpandableStringEnum { + /** Static value Internal for ActionType. */ + public static final ActionType INTERNAL = fromString("Internal"); + + /** + * Creates or finds a ActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionType. + */ + @JsonCreator + public static ActionType fromString(String name) { + return fromString(name, ActionType.class); + } + + /** @return known ActionType values. */ + public static Collection values() { + return values(ActionType.class); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Asset.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Asset.java index 1b42a5277bbc..de3addbb7264 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Asset.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Asset.java @@ -4,7 +4,6 @@ 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.AssetInner; @@ -274,69 +273,4 @@ interface WithStorageAccountName { * @return the refreshed resource. */ Asset refresh(Context context); - - /** - * Lists storage container URLs with shared access signatures (SAS) for uploading and downloading Asset content. The - * signatures are derived from the storage account keys. - * - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Asset Storage container SAS URLs. - */ - AssetContainerSas listContainerSas(ListContainerSasInput parameters); - - /** - * Lists storage container URLs with shared access signatures (SAS) for uploading and downloading Asset content. The - * signatures are derived from the storage account keys. - * - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Asset Storage container SAS URLs. - */ - Response listContainerSasWithResponse(ListContainerSasInput parameters, Context context); - - /** - * Gets the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API. - */ - StorageEncryptedAssetDecryptionData getEncryptionKey(); - - /** - * Gets the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Asset storage encryption keys used to decrypt content created by version 2 of the Media Services API. - */ - Response getEncryptionKeyWithResponse(Context context); - - /** - * Lists Streaming Locators which are associated with this asset. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Streaming Locators associated with this Asset. - */ - ListStreamingLocatorsResponse listStreamingLocators(); - - /** - * Lists Streaming Locators which are associated with this asset. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Streaming Locators associated with this Asset. - */ - Response listStreamingLocatorsWithResponse(Context context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicy.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicy.java index 28e34e140ec2..9e4455fa5f3b 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicy.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/ContentKeyPolicy.java @@ -4,7 +4,6 @@ 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.ContentKeyPolicyInner; @@ -206,24 +205,4 @@ interface WithOptions { * @return the refreshed resource. */ ContentKeyPolicy refresh(Context context); - - /** - * Get a Content Key Policy including secret values. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy including secret values. - */ - ContentKeyPolicyProperties getPolicyPropertiesWithSecrets(); - - /** - * Get a Content Key Policy including secret values. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Content Key Policy including secret values. - */ - Response getPolicyPropertiesWithSecretsWithResponse(Context context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/DefaultAction.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/DefaultAction.java new file mode 100644 index 000000000000..5572f3b22dba --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/DefaultAction.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 DefaultAction. */ +public final class DefaultAction extends ExpandableStringEnum { + /** Static value Allow for DefaultAction. */ + public static final DefaultAction ALLOW = fromString("Allow"); + + /** Static value Deny for DefaultAction. */ + public static final DefaultAction DENY = fromString("Deny"); + + /** + * Creates or finds a DefaultAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding DefaultAction. + */ + @JsonCreator + public static DefaultAction fromString(String name) { + return fromString(name, DefaultAction.class); + } + + /** @return known DefaultAction values. */ + public static Collection values() { + return values(DefaultAction.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 index a2aa85a956ca..68d646a9db94 100644 --- 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 @@ -4,7 +4,6 @@ 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; @@ -324,23 +323,4 @@ interface WithCorrelationData { * @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/KeyDelivery.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/KeyDelivery.java new file mode 100644 index 000000000000..79904f05924c --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/KeyDelivery.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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 KeyDelivery model. */ +@Fluent +public final class KeyDelivery { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KeyDelivery.class); + + /* + * The access control properties for Key Delivery. + */ + @JsonProperty(value = "accessControl") + private AccessControl accessControl; + + /** + * Get the accessControl property: The access control properties for Key Delivery. + * + * @return the accessControl value. + */ + public AccessControl accessControl() { + return this.accessControl; + } + + /** + * Set the accessControl property: The access control properties for Key Delivery. + * + * @param accessControl the accessControl value to set. + * @return the KeyDelivery object itself. + */ + public KeyDelivery withAccessControl(AccessControl accessControl) { + this.accessControl = accessControl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (accessControl() != null) { + accessControl().validate(); + } + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEvent.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEvent.java index e6fc7d314671..517faf98fb57 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEvent.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/LiveEvent.java @@ -557,83 +557,4 @@ interface WithStreamOptions { * @return the refreshed resource. */ LiveEvent refresh(Context context); - - /** - * A live event is in StandBy state after allocation completes, and is ready to start. - * - * @throws com.azure.core.management.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 allocate(); - - /** - * A live event is in StandBy state after allocation completes, and is ready to start. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 allocate(Context context); - - /** - * A live event in Stopped or StandBy state will be in Running state after the start operation completes. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void start(); - - /** - * A live event in Stopped or StandBy state will be in Running state after the start operation completes. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void start(Context context); - - /** - * Stops a running live event. - * - * @param parameters LiveEvent stop 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. - */ - void stop(LiveEventActionInput parameters); - - /** - * Stops a running live event. - * - * @param parameters LiveEvent stop 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. - */ - void stop(LiveEventActionInput parameters, Context context); - - /** - * Resets an existing live event. All live outputs for the live event are deleted and the live event is stopped and - * will be started again. All assets used by the live outputs and streaming locators created on these assets are - * unaffected. - * - * @throws com.azure.core.management.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 reset(); - - /** - * Resets an existing live event. All live outputs for the live event are deleted and the live event is stopped and - * will be started again. All assets used by the live outputs and streaming locators created on these assets are - * unaffected. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 reset(Context context); } 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 af882340ab36..bbe0ddd8decd 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 @@ -4,7 +4,6 @@ package com.azure.resourcemanager.mediaservices.models; -import com.azure.core.http.rest.Response; import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; @@ -92,6 +91,13 @@ public interface MediaService { */ AccountEncryption encryption(); + /** + * Gets the keyDelivery property: The Key Delivery properties for Media Services account. + * + * @return the keyDelivery value. + */ + KeyDelivery keyDelivery(); + /** * Gets the region of the resource. * @@ -162,7 +168,8 @@ interface WithCreate DefinitionStages.WithIdentity, DefinitionStages.WithStorageAccounts, DefinitionStages.WithStorageAuthentication, - DefinitionStages.WithEncryption { + DefinitionStages.WithEncryption, + DefinitionStages.WithKeyDelivery { /** * Executes the create request. * @@ -228,6 +235,16 @@ interface WithEncryption { */ WithCreate withEncryption(AccountEncryption encryption); } + /** The stage of the MediaService definition allowing to specify keyDelivery. */ + interface WithKeyDelivery { + /** + * Specifies the keyDelivery property: The Key Delivery properties for Media Services account.. + * + * @param keyDelivery The Key Delivery properties for Media Services account. + * @return the next definition stage. + */ + WithCreate withKeyDelivery(KeyDelivery keyDelivery); + } } /** * Begins update for the MediaService resource. @@ -242,7 +259,8 @@ interface Update UpdateStages.WithIdentity, UpdateStages.WithStorageAccounts, UpdateStages.WithStorageAuthentication, - UpdateStages.WithEncryption { + UpdateStages.WithEncryption, + UpdateStages.WithKeyDelivery { /** * Executes the update request. * @@ -310,6 +328,16 @@ interface WithEncryption { */ Update withEncryption(AccountEncryption encryption); } + /** The stage of the MediaService update allowing to specify keyDelivery. */ + interface WithKeyDelivery { + /** + * Specifies the keyDelivery property: The Key Delivery properties for Media Services account.. + * + * @param keyDelivery The Key Delivery properties for Media Services account. + * @return the next definition stage. + */ + Update withKeyDelivery(KeyDelivery keyDelivery); + } } /** * Refreshes the resource to sync with Azure. @@ -325,49 +353,4 @@ interface WithEncryption { * @return the refreshed resource. */ MediaService refresh(Context context); - - /** - * Synchronizes storage account keys for a storage account associated with the Media Service account. - * - * @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. - */ - void syncStorageKeys(SyncStorageKeysInput parameters); - - /** - * Synchronizes storage account keys for a storage account associated with the Media Service account. - * - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response syncStorageKeysWithResponse(SyncStorageKeysInput parameters, Context context); - - /** - * List the media edge policies associated with the Media Services account. - * - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - EdgePolicies listEdgePolicies(ListEdgePoliciesInput parameters); - - /** - * List the media edge policies associated with the Media Services account. - * - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response listEdgePoliciesWithResponse(ListEdgePoliciesInput parameters, Context context); } 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 new file mode 100644 index 000000000000..a90b0eb769cf --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceUpdate.java @@ -0,0 +1,212 @@ +// 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 java.util.List; +import java.util.Map; +import java.util.UUID; + +/** A Media Services account update. */ +@JsonFlatten +@Fluent +public class MediaServiceUpdate { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MediaServiceUpdate.class); + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /* + * The Managed Identity for the Media Services account. + */ + @JsonProperty(value = "identity") + private MediaServiceIdentity identity; + + /* + * The Media Services account ID. + */ + @JsonProperty(value = "properties.mediaServiceId", access = JsonProperty.Access.WRITE_ONLY) + private UUID mediaServiceId; + + /* + * The storage accounts for this resource. + */ + @JsonProperty(value = "properties.storageAccounts") + private List storageAccounts; + + /* + * The storageAuthentication property. + */ + @JsonProperty(value = "properties.storageAuthentication") + private StorageAuthentication storageAuthentication; + + /* + * The account encryption properties. + */ + @JsonProperty(value = "properties.encryption") + private AccountEncryption encryption; + + /* + * The Key Delivery properties for Media Services account. + */ + @JsonProperty(value = "properties.keyDelivery") + private KeyDelivery keyDelivery; + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the MediaServiceUpdate object itself. + */ + public MediaServiceUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the identity property: The Managed Identity for the Media Services account. + * + * @return the identity value. + */ + public MediaServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The Managed Identity for the Media Services account. + * + * @param identity the identity value to set. + * @return the MediaServiceUpdate object itself. + */ + public MediaServiceUpdate withIdentity(MediaServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the mediaServiceId property: The Media Services account ID. + * + * @return the mediaServiceId value. + */ + public UUID mediaServiceId() { + return this.mediaServiceId; + } + + /** + * Get the storageAccounts property: The storage accounts for this resource. + * + * @return the storageAccounts value. + */ + public List storageAccounts() { + return this.storageAccounts; + } + + /** + * Set the storageAccounts property: The storage accounts for this resource. + * + * @param storageAccounts the storageAccounts value to set. + * @return the MediaServiceUpdate object itself. + */ + public MediaServiceUpdate withStorageAccounts(List storageAccounts) { + this.storageAccounts = storageAccounts; + return this; + } + + /** + * Get the storageAuthentication property: The storageAuthentication property. + * + * @return the storageAuthentication value. + */ + public StorageAuthentication storageAuthentication() { + return this.storageAuthentication; + } + + /** + * Set the storageAuthentication property: The storageAuthentication property. + * + * @param storageAuthentication the storageAuthentication value to set. + * @return the MediaServiceUpdate object itself. + */ + public MediaServiceUpdate withStorageAuthentication(StorageAuthentication storageAuthentication) { + this.storageAuthentication = storageAuthentication; + return this; + } + + /** + * Get the encryption property: The account encryption properties. + * + * @return the encryption value. + */ + public AccountEncryption encryption() { + return this.encryption; + } + + /** + * Set the encryption property: The account encryption properties. + * + * @param encryption the encryption value to set. + * @return the MediaServiceUpdate object itself. + */ + public MediaServiceUpdate withEncryption(AccountEncryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the keyDelivery property: The Key Delivery properties for Media Services account. + * + * @return the keyDelivery value. + */ + public KeyDelivery keyDelivery() { + return this.keyDelivery; + } + + /** + * Set the keyDelivery property: The Key Delivery properties for Media Services account. + * + * @param keyDelivery the keyDelivery value to set. + * @return the MediaServiceUpdate object itself. + */ + public MediaServiceUpdate withKeyDelivery(KeyDelivery keyDelivery) { + this.keyDelivery = keyDelivery; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (storageAccounts() != null) { + storageAccounts().forEach(e -> e.validate()); + } + if (encryption() != null) { + encryption().validate(); + } + if (keyDelivery() != null) { + keyDelivery().validate(); + } + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mediaservices.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mediaservices.java index 1eaffe56d12f..f7698928c9b8 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mediaservices.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mediaservices.java @@ -158,29 +158,6 @@ Response listEdgePoliciesWithResponse( */ PagedIterable list(Context context); - /** - * Get the details of a Media Services account. - * - * @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 the details of a Media Services account. - */ - MediaService getBySubscription(String accountName); - - /** - * Get the details of a Media Services account. - * - * @param accountName The Media Services account name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of a Media Services account. - */ - Response getBySubscriptionWithResponse(String accountName, Context context); - /** * Get the details of a Media Services account. * diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MetricSpecification.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MetricSpecification.java index b4868a6a1bdc..bbca5709d35b 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MetricSpecification.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MetricSpecification.java @@ -63,6 +63,30 @@ public final class MetricSpecification { @JsonProperty(value = "dimensions", access = JsonProperty.Access.WRITE_ONLY) private List dimensions; + /* + * Indicates whether regional MDM account is enabled. + */ + @JsonProperty(value = "enableRegionalMdmAccount", access = JsonProperty.Access.WRITE_ONLY) + private Boolean enableRegionalMdmAccount; + + /* + * The source MDM account. + */ + @JsonProperty(value = "sourceMdmAccount", access = JsonProperty.Access.WRITE_ONLY) + private String sourceMdmAccount; + + /* + * The source MDM namespace. + */ + @JsonProperty(value = "sourceMdmNamespace", access = JsonProperty.Access.WRITE_ONLY) + private String sourceMdmNamespace; + + /* + * The supported time grain types. + */ + @JsonProperty(value = "supportedTimeGrainTypes", access = JsonProperty.Access.WRITE_ONLY) + private List supportedTimeGrainTypes; + /** * Get the name property: The metric name. * @@ -146,6 +170,42 @@ public List dimensions() { return this.dimensions; } + /** + * Get the enableRegionalMdmAccount property: Indicates whether regional MDM account is enabled. + * + * @return the enableRegionalMdmAccount value. + */ + public Boolean enableRegionalMdmAccount() { + return this.enableRegionalMdmAccount; + } + + /** + * Get the sourceMdmAccount property: The source MDM account. + * + * @return the sourceMdmAccount value. + */ + public String sourceMdmAccount() { + return this.sourceMdmAccount; + } + + /** + * Get the sourceMdmNamespace property: The source MDM namespace. + * + * @return the sourceMdmNamespace value. + */ + public String sourceMdmNamespace() { + return this.sourceMdmNamespace; + } + + /** + * Get the supportedTimeGrainTypes property: The supported time grain types. + * + * @return the supportedTimeGrainTypes value. + */ + public List supportedTimeGrainTypes() { + return this.supportedTimeGrainTypes; + } + /** * Validates the instance. * 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 b20a45c80d71..004125b0ba95 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 @@ -36,6 +36,20 @@ public interface Operation { */ Properties properties(); + /** + * Gets the isDataAction property: Whether the operation applies to data-plane. + * + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * Gets the actionType property: Indicates the action type. + * + * @return the actionType value. + */ + ActionType actionType(); + /** * Gets the inner com.azure.resourcemanager.mediaservices.fluent.models.OperationInner object. * diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpoint.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpoint.java index 937a8ff008b2..56dc4e7373f7 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpoint.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingEndpoint.java @@ -550,61 +550,4 @@ interface WithCrossSiteAccessPolicies { * @return the refreshed resource. */ StreamingEndpoint refresh(Context context); - - /** - * Starts an existing streaming endpoint. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void start(); - - /** - * Starts an existing streaming endpoint. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void start(Context context); - - /** - * Stops an existing streaming endpoint. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stop(); - - /** - * Stops an existing streaming endpoint. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stop(Context context); - - /** - * Scales an existing streaming endpoint. - * - * @param parameters Streaming endpoint scale 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. - */ - void scale(StreamingEntityScaleUnit parameters); - - /** - * Scales an existing streaming endpoint. - * - * @param parameters Streaming endpoint scale 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. - */ - void scale(StreamingEntityScaleUnit parameters, Context context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingLocator.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingLocator.java index 5c462e6a1d6d..dd81c2c3aa59 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingLocator.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/StreamingLocator.java @@ -4,7 +4,6 @@ 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.StreamingLocatorInner; @@ -287,44 +286,4 @@ interface WithFilters { * @return the refreshed resource. */ StreamingLocator refresh(Context context); - - /** - * List Content Keys used by this Streaming Locator. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class of response for listContentKeys action. - */ - ListContentKeysResponse listContentKeys(); - - /** - * List Content Keys used by this Streaming Locator. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class of response for listContentKeys action. - */ - Response listContentKeysWithResponse(Context context); - - /** - * List Paths supported by this Streaming Locator. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class of response for listPaths action. - */ - ListPathsResponse listPaths(); - - /** - * List Paths supported by this Streaming Locator. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return class of response for listPaths action. - */ - Response listPathsWithResponse(Context context); }