scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -213,6 +237,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -246,7 +283,7 @@ public MediaServicesManager authenticate(TokenCredential credential, AzureProfil
.append("-")
.append("com.azure.resourcemanager.mediaservices")
.append("/")
- .append("2.0.0");
+ .append("2.1.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -264,10 +301,15 @@ public MediaServicesManager authenticate(TokenCredential credential, AzureProfil
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
@@ -347,6 +389,24 @@ public Locations locations() {
return locations;
}
+ /** @return Resource collection API of MediaServiceOperationStatuses. */
+ public MediaServiceOperationStatuses mediaServiceOperationStatuses() {
+ if (this.mediaServiceOperationStatuses == null) {
+ this.mediaServiceOperationStatuses =
+ new MediaServiceOperationStatusesImpl(clientObject.getMediaServiceOperationStatuses(), this);
+ }
+ return mediaServiceOperationStatuses;
+ }
+
+ /** @return Resource collection API of MediaServiceOperationResults. */
+ public MediaServiceOperationResults mediaServiceOperationResults() {
+ if (this.mediaServiceOperationResults == null) {
+ this.mediaServiceOperationResults =
+ new MediaServiceOperationResultsImpl(clientObject.getMediaServiceOperationResults(), this);
+ }
+ return mediaServiceOperationResults;
+ }
+
/** @return Resource collection API of Assets. */
public Assets assets() {
if (this.assets == null) {
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AzureMediaServices.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AzureMediaServices.java
index a3248dbe18ce..85765070ad17 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AzureMediaServices.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AzureMediaServices.java
@@ -23,6 +23,13 @@ public interface AzureMediaServices {
*/
String getEndpoint();
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
/**
* Gets The HTTP pipeline to send requests through.
*
@@ -79,6 +86,20 @@ public interface AzureMediaServices {
*/
LocationsClient getLocations();
+ /**
+ * Gets the MediaServiceOperationStatusesClient object to access its operations.
+ *
+ * @return the MediaServiceOperationStatusesClient object.
+ */
+ MediaServiceOperationStatusesClient getMediaServiceOperationStatuses();
+
+ /**
+ * Gets the MediaServiceOperationResultsClient object to access its operations.
+ *
+ * @return the MediaServiceOperationResultsClient object.
+ */
+ MediaServiceOperationResultsClient getMediaServiceOperationResults();
+
/**
* Gets the AssetsClient object to access its operations.
*
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/LocationsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/LocationsClient.java
index 74568344a012..d8f330a914d3 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/LocationsClient.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/LocationsClient.java
@@ -16,7 +16,7 @@ public interface LocationsClient {
/**
* Checks whether the Media Service resource name is available.
*
- * @param locationName The name of the location.
+ * @param locationName Location name.
* @param parameters The request parameters.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -30,7 +30,7 @@ EntityNameAvailabilityCheckOutputInner checkNameAvailability(
/**
* Checks whether the Media Service resource name is available.
*
- * @param locationName The name of the location.
+ * @param locationName Location name.
* @param parameters The request parameters.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaServiceOperationResultsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaServiceOperationResultsClient.java
new file mode 100644
index 000000000000..80b5a6f88726
--- /dev/null
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaServiceOperationResultsClient.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mediaservices.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner;
+import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationResultsGetResponse;
+
+/** An instance of this class provides access to all the operations defined in MediaServiceOperationResultsClient. */
+public interface MediaServiceOperationResultsClient {
+ /**
+ * Get media service operation result.
+ *
+ * @param locationName Location name.
+ * @param operationId Operation Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return media service operation result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MediaServiceInner get(String locationName, String operationId);
+
+ /**
+ * Get media service operation result.
+ *
+ * @param locationName Location name.
+ * @param operationId Operation Id.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return media service operation result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MediaServiceOperationResultsGetResponse getWithResponse(String locationName, String operationId, Context context);
+}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaServiceOperationStatusesClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaServiceOperationStatusesClient.java
new file mode 100644
index 000000000000..1c32aa4be234
--- /dev/null
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/MediaServiceOperationStatusesClient.java
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mediaservices.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceOperationStatusInner;
+
+/** An instance of this class provides access to all the operations defined in MediaServiceOperationStatusesClient. */
+public interface MediaServiceOperationStatusesClient {
+ /**
+ * Get media service operation status.
+ *
+ * @param locationName Location name.
+ * @param operationId Operation ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return media service operation status.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MediaServiceOperationStatusInner get(String locationName, String operationId);
+
+ /**
+ * Get media service operation status.
+ *
+ * @param locationName Location name.
+ * @param operationId Operation ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return media service operation status along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String locationName, String operationId, Context context);
+}
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 00953ef26ebd..5a8dc5945db0 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
@@ -8,7 +8,9 @@
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.mediaservices.fluent.models.EdgePoliciesInner;
import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner;
import com.azure.resourcemanager.mediaservices.models.ListEdgePoliciesInput;
@@ -70,6 +72,37 @@ public interface MediaservicesClient {
Response getByResourceGroupWithResponse(
String resourceGroupName, String accountName, Context context);
+ /**
+ * Creates or updates a Media Services account.
+ *
+ * @param resourceGroupName The name of the resource group within the Azure subscription.
+ * @param accountName The Media Services account name.
+ * @param parameters The request parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Media Services account.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, MediaServiceInner> beginCreateOrUpdate(
+ String resourceGroupName, String accountName, MediaServiceInner parameters);
+
+ /**
+ * Creates or updates a Media Services account.
+ *
+ * @param resourceGroupName The name of the resource group within the Azure subscription.
+ * @param accountName The Media Services account name.
+ * @param parameters The request parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Media Services account.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, MediaServiceInner> beginCreateOrUpdate(
+ String resourceGroupName, String accountName, MediaServiceInner parameters, Context context);
+
/**
* Creates or updates a Media Services account.
*
@@ -94,10 +127,10 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a Media Services account along with {@link Response}.
+ * @return a Media Services account.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(
+ MediaServiceInner createOrUpdate(
String resourceGroupName, String accountName, MediaServiceInner parameters, Context context);
/**
@@ -126,6 +159,37 @@ Response createOrUpdateWithResponse(
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String resourceGroupName, String accountName, Context context);
+ /**
+ * Updates an existing Media Services account.
+ *
+ * @param resourceGroupName The name of the resource group within the Azure subscription.
+ * @param accountName The Media Services account name.
+ * @param parameters The request parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Media Services account.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, MediaServiceInner> beginUpdate(
+ String resourceGroupName, String accountName, MediaServiceUpdate parameters);
+
+ /**
+ * Updates an existing Media Services account.
+ *
+ * @param resourceGroupName The name of the resource group within the Azure subscription.
+ * @param accountName The Media Services account name.
+ * @param parameters The request parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Media Services account.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, MediaServiceInner> beginUpdate(
+ String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context);
+
/**
* Updates an existing Media Services account.
*
@@ -150,10 +214,10 @@ Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a Media Services account along with {@link Response}.
+ * @return a Media Services account.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(
+ MediaServiceInner update(
String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context);
/**
@@ -186,7 +250,7 @@ Response syncStorageKeysWithResponse(
String resourceGroupName, String accountName, SyncStorageKeysInput parameters, Context context);
/**
- * List the media edge policies associated with the Media Services account.
+ * List all the media edge policies associated with the Media Services account.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
@@ -200,7 +264,7 @@ Response syncStorageKeysWithResponse(
EdgePoliciesInner listEdgePolicies(String resourceGroupName, String accountName, ListEdgePoliciesInput parameters);
/**
- * List the media edge policies associated with the Media Services account.
+ * List all the media edge policies associated with the Media Services account.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/PrivateEndpointConnectionsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/PrivateEndpointConnectionsClient.java
index ac5b58bf492c..4b15ea4d7191 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/PrivateEndpointConnectionsClient.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/PrivateEndpointConnectionsClient.java
@@ -14,20 +14,20 @@
/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */
public interface PrivateEndpointConnectionsClient {
/**
- * Get all private endpoint connections.
+ * List all private endpoint connections.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all private endpoint connections.
+ * @return list of private endpoint connection associated with the specified storage account.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
PrivateEndpointConnectionListResultInner list(String resourceGroupName, String accountName);
/**
- * Get all private endpoint connections.
+ * List all private endpoint connections.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
@@ -35,14 +35,15 @@ public interface PrivateEndpointConnectionsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all private endpoint connections along with {@link Response}.
+ * @return list of private endpoint connection associated with the specified storage account along with {@link
+ * Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response listWithResponse(
String resourceGroupName, String accountName, Context context);
/**
- * Get private endpoint connection.
+ * Get the details of a private endpoint connection.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
@@ -50,13 +51,13 @@ Response listWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return private endpoint connection.
+ * @return the details of a private endpoint connection.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
PrivateEndpointConnectionInner get(String resourceGroupName, String accountName, String name);
/**
- * Get private endpoint connection.
+ * Get the details of a private endpoint connection.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
@@ -65,14 +66,14 @@ Response listWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return private endpoint connection along with {@link Response}.
+ * @return the details of a private endpoint connection along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
String resourceGroupName, String accountName, String name, Context context);
/**
- * Update private endpoint connection.
+ * Update an existing private endpoint connection.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
@@ -88,7 +89,7 @@ PrivateEndpointConnectionInner createOrUpdate(
String resourceGroupName, String accountName, String name, PrivateEndpointConnectionInner parameters);
/**
- * Update private endpoint connection.
+ * Update an existing private endpoint connection.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
@@ -109,7 +110,7 @@ Response createOrUpdateWithResponse(
Context context);
/**
- * Delete private endpoint connection.
+ * Deletes a private endpoint connection.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
@@ -122,7 +123,7 @@ Response createOrUpdateWithResponse(
void delete(String resourceGroupName, String accountName, String name);
/**
- * Delete private endpoint connection.
+ * Deletes a private endpoint connection.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/PrivateLinkResourcesClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/PrivateLinkResourcesClient.java
index abed0b0362be..49947daadede 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/PrivateLinkResourcesClient.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/PrivateLinkResourcesClient.java
@@ -14,20 +14,20 @@
/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */
public interface PrivateLinkResourcesClient {
/**
- * Get list of group IDs.
+ * List supported group IDs.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of group IDs.
+ * @return a list of private link resources.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
PrivateLinkResourceListResultInner list(String resourceGroupName, String accountName);
/**
- * Get list of group IDs.
+ * List supported group IDs.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
@@ -35,14 +35,14 @@ public interface PrivateLinkResourcesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of group IDs along with {@link Response}.
+ * @return a list of private link resources along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response listWithResponse(
String resourceGroupName, String accountName, Context context);
/**
- * Get group ID.
+ * Get details of a group ID.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
@@ -50,13 +50,13 @@ Response listWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return group ID.
+ * @return details of a group ID.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
PrivateLinkResourceInner get(String resourceGroupName, String accountName, String name);
/**
- * Get group ID.
+ * Get details of a group ID.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
@@ -65,7 +65,7 @@ Response listWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return group ID along with {@link Response}.
+ * @return details of a group ID along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
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 de0e2f0ef11a..14546f2d6216 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.resourcemanager.mediaservices.models.AccountEncryption;
import com.azure.resourcemanager.mediaservices.models.KeyDelivery;
import com.azure.resourcemanager.mediaservices.models.MediaServiceIdentity;
+import com.azure.resourcemanager.mediaservices.models.ProvisioningState;
import com.azure.resourcemanager.mediaservices.models.PublicNetworkAccess;
import com.azure.resourcemanager.mediaservices.models.StorageAccount;
import com.azure.resourcemanager.mediaservices.models.StorageAuthentication;
@@ -27,18 +28,18 @@ public final class MediaServiceInner extends Resource {
@JsonProperty(value = "properties")
private MediaServiceProperties innerProperties;
- /*
- * The Managed Identity for the Media Services account.
- */
- @JsonProperty(value = "identity")
- private MediaServiceIdentity identity;
-
/*
* The system metadata relating to this resource.
*/
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * The Managed Identity for the Media Services account.
+ */
+ @JsonProperty(value = "identity")
+ private MediaServiceIdentity identity;
+
/**
* Get the innerProperties property: The resource properties.
*
@@ -48,6 +49,15 @@ private MediaServiceProperties innerProperties() {
return this.innerProperties;
}
+ /**
+ * Get the systemData property: The system metadata relating to this resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Get the identity property: The Managed Identity for the Media Services account.
*
@@ -68,15 +78,6 @@ public MediaServiceInner withIdentity(MediaServiceIdentity identity) {
return this;
}
- /**
- * Get the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/** {@inheritDoc} */
@Override
public MediaServiceInner withLocation(String location) {
@@ -217,6 +218,25 @@ public MediaServiceInner withPublicNetworkAccess(PublicNetworkAccess publicNetwo
return this;
}
+ /**
+ * Get the provisioningState property: Provisioning state of the Media Services account.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the privateEndpointConnections property: The Private Endpoint Connections created for the Media Service
+ * account.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public Object privateEndpointConnections() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections();
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceOperationStatusInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceOperationStatusInner.java
new file mode 100644
index 000000000000..5b72ed4f13f1
--- /dev/null
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceOperationStatusInner.java
@@ -0,0 +1,193 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mediaservices.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Status of media service operation. */
+@Fluent
+public final class MediaServiceOperationStatusInner {
+ /*
+ * Operation identifier.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /*
+ * Operation resource ID.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Operation start time.
+ */
+ @JsonProperty(value = "startTime")
+ private OffsetDateTime startTime;
+
+ /*
+ * Operation end time.
+ */
+ @JsonProperty(value = "endTime")
+ private OffsetDateTime endTime;
+
+ /*
+ * Operation status.
+ */
+ @JsonProperty(value = "status", required = true)
+ private String status;
+
+ /*
+ * The error detail.
+ */
+ @JsonProperty(value = "error")
+ private ManagementError error;
+
+ /**
+ * Get the name property: Operation identifier.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Operation identifier.
+ *
+ * @param name the name value to set.
+ * @return the MediaServiceOperationStatusInner object itself.
+ */
+ public MediaServiceOperationStatusInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the id property: Operation resource ID.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Operation resource ID.
+ *
+ * @param id the id value to set.
+ * @return the MediaServiceOperationStatusInner object itself.
+ */
+ public MediaServiceOperationStatusInner withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the startTime property: Operation start time.
+ *
+ * @return the startTime value.
+ */
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Set the startTime property: Operation start time.
+ *
+ * @param startTime the startTime value to set.
+ * @return the MediaServiceOperationStatusInner object itself.
+ */
+ public MediaServiceOperationStatusInner withStartTime(OffsetDateTime startTime) {
+ this.startTime = startTime;
+ return this;
+ }
+
+ /**
+ * Get the endTime property: Operation end time.
+ *
+ * @return the endTime value.
+ */
+ public OffsetDateTime endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Set the endTime property: Operation end time.
+ *
+ * @param endTime the endTime value to set.
+ * @return the MediaServiceOperationStatusInner object itself.
+ */
+ public MediaServiceOperationStatusInner withEndTime(OffsetDateTime endTime) {
+ this.endTime = endTime;
+ return this;
+ }
+
+ /**
+ * Get the status property: Operation status.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Operation status.
+ *
+ * @param status the status value to set.
+ * @return the MediaServiceOperationStatusInner object itself.
+ */
+ public MediaServiceOperationStatusInner withStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the error property: The error detail.
+ *
+ * @return the error value.
+ */
+ public ManagementError error() {
+ return this.error;
+ }
+
+ /**
+ * Set the error property: The error detail.
+ *
+ * @param error the error value to set.
+ * @return the MediaServiceOperationStatusInner object itself.
+ */
+ public MediaServiceOperationStatusInner withError(ManagementError error) {
+ this.error = error;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (name() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property name in model MediaServiceOperationStatusInner"));
+ }
+ if (status() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property status in model MediaServiceOperationStatusInner"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(MediaServiceOperationStatusInner.class);
+}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceProperties.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceProperties.java
index c7c5d773d7ae..3b52dd137347 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceProperties.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceProperties.java
@@ -7,6 +7,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.mediaservices.models.AccountEncryption;
import com.azure.resourcemanager.mediaservices.models.KeyDelivery;
+import com.azure.resourcemanager.mediaservices.models.ProvisioningState;
import com.azure.resourcemanager.mediaservices.models.PublicNetworkAccess;
import com.azure.resourcemanager.mediaservices.models.StorageAccount;
import com.azure.resourcemanager.mediaservices.models.StorageAuthentication;
@@ -54,6 +55,18 @@ public final class MediaServiceProperties {
@JsonProperty(value = "publicNetworkAccess")
private PublicNetworkAccess publicNetworkAccess;
+ /*
+ * Provisioning state of the Media Services account.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * The Private Endpoint Connections created for the Media Service account.
+ */
+ @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
+ private Object privateEndpointConnections;
+
/**
* Get the mediaServiceId property: The Media Services account ID.
*
@@ -165,6 +178,25 @@ public MediaServiceProperties withPublicNetworkAccess(PublicNetworkAccess public
return this;
}
+ /**
+ * Get the provisioningState property: Provisioning state of the Media Services account.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the privateEndpointConnections property: The Private Endpoint Connections created for the Media Service
+ * account.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public Object privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
/**
* 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 91d749960a9e..36862b38b1ee 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
@@ -184,7 +184,6 @@ private Mono> listSinglePageAsync(String resou
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -195,7 +194,7 @@ private Mono> listSinglePageAsync(String resou
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.>map(
@@ -244,7 +243,6 @@ private Mono> listSinglePageAsync(
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -253,7 +251,7 @@ private Mono> listSinglePageAsync(
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context)
.map(
@@ -369,7 +367,6 @@ private Mono> getWithResponseAsync(
if (filterName == null) {
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -381,7 +378,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
accountName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -425,7 +422,6 @@ private Mono> getWithResponseAsync(
if (filterName == null) {
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -435,7 +431,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
accountName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -540,7 +536,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -552,7 +547,7 @@ private Mono> createOrUpdateWithResponseAsync(
resourceGroupName,
accountName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -606,7 +601,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -616,7 +610,7 @@ private Mono> createOrUpdateWithResponseAsync(
resourceGroupName,
accountName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -725,7 +719,6 @@ private Mono> deleteWithResponseAsync(
if (filterName == null) {
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -737,7 +730,7 @@ private Mono> deleteWithResponseAsync(
resourceGroupName,
accountName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -780,7 +773,6 @@ private Mono> deleteWithResponseAsync(
if (filterName == null) {
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -790,7 +782,7 @@ private Mono> deleteWithResponseAsync(
resourceGroupName,
accountName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -887,7 +879,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -899,7 +890,7 @@ private Mono> updateWithResponseAsync(
resourceGroupName,
accountName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -953,7 +944,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -963,7 +953,7 @@ private Mono> updateWithResponseAsync(
resourceGroupName,
accountName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersClientImpl.java
index 51478bdc7541..ad49267774a0 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
@@ -194,7 +194,6 @@ private Mono> listSinglePageAsync(
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -206,7 +205,7 @@ private Mono> listSinglePageAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.>map(
@@ -259,7 +258,6 @@ private Mono> listSinglePageAsync(
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -269,7 +267,7 @@ private Mono> listSinglePageAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context)
.map(
@@ -396,7 +394,6 @@ private Mono> getWithResponseAsync(
if (filterName == null) {
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -409,7 +406,7 @@ private Mono> getWithResponseAsync(
accountName,
assetName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -457,7 +454,6 @@ private Mono> getWithResponseAsync(
if (filterName == null) {
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -468,7 +464,7 @@ private Mono> getWithResponseAsync(
accountName,
assetName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -586,7 +582,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -599,7 +594,7 @@ private Mono> createOrUpdateWithResponseAsync(
accountName,
assetName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -658,7 +653,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -669,7 +663,7 @@ private Mono> createOrUpdateWithResponseAsync(
accountName,
assetName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -796,7 +790,6 @@ private Mono> deleteWithResponseAsync(
if (filterName == null) {
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -809,7 +802,7 @@ private Mono> deleteWithResponseAsync(
accountName,
assetName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -856,7 +849,6 @@ private Mono> deleteWithResponseAsync(
if (filterName == null) {
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -867,7 +859,7 @@ private Mono> deleteWithResponseAsync(
accountName,
assetName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -975,7 +967,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -988,7 +979,7 @@ private Mono> updateWithResponseAsync(
accountName,
assetName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -1047,7 +1038,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1058,7 +1048,7 @@ private Mono> updateWithResponseAsync(
accountName,
assetName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsClientImpl.java
index efbb2bf85647..7db323bffaac 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
@@ -244,7 +244,6 @@ private Mono> listSinglePageAsync(
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -255,7 +254,7 @@ private Mono> listSinglePageAsync(
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
filter,
top,
orderby,
@@ -310,7 +309,6 @@ private Mono> listSinglePageAsync(
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -319,7 +317,7 @@ private Mono> listSinglePageAsync(
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
filter,
top,
orderby,
@@ -477,7 +475,6 @@ private Mono> getWithResponseAsync(
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -489,7 +486,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -533,7 +530,6 @@ private Mono> getWithResponseAsync(
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -543,7 +539,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -648,7 +644,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -660,7 +655,7 @@ private Mono> createOrUpdateWithResponseAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -710,7 +705,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -720,7 +714,7 @@ private Mono> createOrUpdateWithResponseAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -825,7 +819,6 @@ private Mono> deleteWithResponseAsync(
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -837,7 +830,7 @@ private Mono> deleteWithResponseAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -880,7 +873,6 @@ private Mono> deleteWithResponseAsync(
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -890,7 +882,7 @@ private Mono> deleteWithResponseAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -987,7 +979,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -999,7 +990,7 @@ private Mono> updateWithResponseAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -1049,7 +1040,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1059,7 +1049,7 @@ private Mono> updateWithResponseAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -1171,7 +1161,6 @@ private Mono> listContainerSasWithResponseAsync
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1183,7 +1172,7 @@ private Mono> listContainerSasWithResponseAsync
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -1239,7 +1228,6 @@ private Mono> listContainerSasWithResponseAsync
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1249,7 +1237,7 @@ private Mono> listContainerSasWithResponseAsync
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -1363,7 +1351,6 @@ private Mono> getEncryptionKe
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1375,7 +1362,7 @@ private Mono> getEncryptionKe
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -1419,7 +1406,6 @@ private Mono> getEncryptionKe
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1429,7 +1415,7 @@ private Mono> getEncryptionKe
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -1533,7 +1519,6 @@ private Mono> listStreamingLocators
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1545,7 +1530,7 @@ private Mono> listStreamingLocators
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -1589,7 +1574,6 @@ private Mono> listStreamingLocators
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1599,7 +1583,7 @@ private Mono> listStreamingLocators
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AzureMediaServicesBuilder.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AzureMediaServicesBuilder.java
index 68129cf63d6a..9d38d4f15fb1 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AzureMediaServicesBuilder.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AzureMediaServicesBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -67,34 +66,34 @@ public AzureMediaServicesBuilder environment(AzureEnvironment environment) {
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the AzureMediaServicesBuilder.
*/
- public AzureMediaServicesBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public AzureMediaServicesBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the AzureMediaServicesBuilder.
*/
- public AzureMediaServicesBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public AzureMediaServicesBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -120,21 +119,21 @@ public AzureMediaServicesBuilder serializerAdapter(SerializerAdapter serializerA
* @return an instance of AzureMediaServicesImpl.
*/
public AzureMediaServicesImpl buildClient() {
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
if (endpoint == null) {
this.endpoint = "https://management.azure.com";
}
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
}
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
if (defaultPollInterval == null) {
this.defaultPollInterval = Duration.ofSeconds(30);
}
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
if (serializerAdapter == null) {
this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
}
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 b0fbe5e60e37..128d9ea521ad 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
@@ -30,6 +30,8 @@
import com.azure.resourcemanager.mediaservices.fluent.LiveEventsClient;
import com.azure.resourcemanager.mediaservices.fluent.LiveOutputsClient;
import com.azure.resourcemanager.mediaservices.fluent.LocationsClient;
+import com.azure.resourcemanager.mediaservices.fluent.MediaServiceOperationResultsClient;
+import com.azure.resourcemanager.mediaservices.fluent.MediaServiceOperationStatusesClient;
import com.azure.resourcemanager.mediaservices.fluent.MediaservicesClient;
import com.azure.resourcemanager.mediaservices.fluent.OperationResultsClient;
import com.azure.resourcemanager.mediaservices.fluent.OperationStatusesClient;
@@ -78,6 +80,18 @@ public String getEndpoint() {
return this.endpoint;
}
+ /** Api Version. */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
/** The HTTP pipeline to send requests through. */
private final HttpPipeline httpPipeline;
@@ -186,6 +200,30 @@ public LocationsClient getLocations() {
return this.locations;
}
+ /** The MediaServiceOperationStatusesClient object to access its operations. */
+ private final MediaServiceOperationStatusesClient mediaServiceOperationStatuses;
+
+ /**
+ * Gets the MediaServiceOperationStatusesClient object to access its operations.
+ *
+ * @return the MediaServiceOperationStatusesClient object.
+ */
+ public MediaServiceOperationStatusesClient getMediaServiceOperationStatuses() {
+ return this.mediaServiceOperationStatuses;
+ }
+
+ /** The MediaServiceOperationResultsClient object to access its operations. */
+ private final MediaServiceOperationResultsClient mediaServiceOperationResults;
+
+ /**
+ * Gets the MediaServiceOperationResultsClient object to access its operations.
+ *
+ * @return the MediaServiceOperationResultsClient object.
+ */
+ public MediaServiceOperationResultsClient getMediaServiceOperationResults() {
+ return this.mediaServiceOperationResults;
+ }
+
/** The AssetsClient object to access its operations. */
private final AssetsClient assets;
@@ -364,12 +402,15 @@ public StreamingEndpointsClient getStreamingEndpoints() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
+ this.apiVersion = "2021-11-01";
this.accountFilters = new AccountFiltersClientImpl(this);
this.operations = new OperationsClientImpl(this);
this.mediaservices = new MediaservicesClientImpl(this);
this.privateLinkResources = new PrivateLinkResourcesClientImpl(this);
this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this);
this.locations = new LocationsClientImpl(this);
+ this.mediaServiceOperationStatuses = new MediaServiceOperationStatusesClientImpl(this);
+ this.mediaServiceOperationResults = new MediaServiceOperationResultsClientImpl(this);
this.assets = new AssetsClientImpl(this);
this.assetFilters = new AssetFiltersClientImpl(this);
this.tracks = new TracksClientImpl(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 a98ea66a8ede..e41e28d3f63a 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
@@ -210,7 +210,6 @@ private Mono> listSinglePageAsync(
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -221,7 +220,7 @@ private Mono> listSinglePageAsync(
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
filter,
top,
orderby,
@@ -277,7 +276,6 @@ private Mono> listSinglePageAsync(
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -286,7 +284,7 @@ private Mono> listSinglePageAsync(
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
filter,
top,
orderby,
@@ -445,7 +443,6 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -457,7 +454,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -502,7 +499,6 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -512,7 +508,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -620,7 +616,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -632,7 +627,7 @@ private Mono> createOrUpdateWithResponseAsync(
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -687,7 +682,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -697,7 +691,7 @@ private Mono> createOrUpdateWithResponseAsync(
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -809,7 +803,6 @@ private Mono> deleteWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -821,7 +814,7 @@ private Mono> deleteWithResponseAsync(
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -865,7 +858,6 @@ private Mono> deleteWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -875,7 +867,7 @@ private Mono> deleteWithResponseAsync(
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -973,7 +965,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -985,7 +976,7 @@ private Mono> updateWithResponseAsync(
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -1040,7 +1031,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1050,7 +1040,7 @@ private Mono> updateWithResponseAsync(
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -1162,7 +1152,6 @@ private Mono> getPolicyPropertiesWithS
return Mono
.error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1174,7 +1163,7 @@ private Mono> getPolicyPropertiesWithS
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -1219,7 +1208,6 @@ private Mono> getPolicyPropertiesWithS
return Mono
.error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1229,7 +1217,7 @@ private Mono> getPolicyPropertiesWithS
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsClientImpl.java
index 1d47877a5541..4389e171699a 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
@@ -214,7 +214,6 @@ private Mono> listSinglePageAsync(
if (transformName == null) {
return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -226,7 +225,7 @@ private Mono> listSinglePageAsync(
resourceGroupName,
accountName,
transformName,
- apiVersion,
+ this.client.getApiVersion(),
filter,
orderby,
accept,
@@ -287,7 +286,6 @@ private Mono> listSinglePageAsync(
if (transformName == null) {
return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -297,7 +295,7 @@ private Mono> listSinglePageAsync(
resourceGroupName,
accountName,
transformName,
- apiVersion,
+ this.client.getApiVersion(),
filter,
orderby,
accept,
@@ -464,7 +462,6 @@ private Mono> getWithResponseAsync(
if (jobName == null) {
return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -477,7 +474,7 @@ private Mono> getWithResponseAsync(
accountName,
transformName,
jobName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -524,7 +521,6 @@ private Mono> getWithResponseAsync(
if (jobName == null) {
return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -535,7 +531,7 @@ private Mono> getWithResponseAsync(
accountName,
transformName,
jobName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -648,7 +644,6 @@ private Mono> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -661,7 +656,7 @@ private Mono> createWithResponseAsync(
accountName,
transformName,
jobName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -720,7 +715,6 @@ private Mono> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -731,7 +725,7 @@ private Mono> createWithResponseAsync(
accountName,
transformName,
jobName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -849,7 +843,6 @@ private Mono> deleteWithResponseAsync(
if (jobName == null) {
return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -862,7 +855,7 @@ private Mono> deleteWithResponseAsync(
accountName,
transformName,
jobName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -909,7 +902,6 @@ private Mono> deleteWithResponseAsync(
if (jobName == null) {
return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -920,7 +912,7 @@ private Mono> deleteWithResponseAsync(
accountName,
transformName,
jobName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -1025,7 +1017,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1038,7 +1029,7 @@ private Mono> updateWithResponseAsync(
accountName,
transformName,
jobName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -1098,7 +1089,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1109,7 +1099,7 @@ private Mono> updateWithResponseAsync(
accountName,
transformName,
jobName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -1230,7 +1220,6 @@ private Mono> cancelJobWithResponseAsync(
if (jobName == null) {
return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1243,7 +1232,7 @@ private Mono> cancelJobWithResponseAsync(
accountName,
transformName,
jobName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -1290,7 +1279,6 @@ private Mono> cancelJobWithResponseAsync(
if (jobName == null) {
return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1301,7 +1289,7 @@ private Mono> cancelJobWithResponseAsync(
accountName,
transformName,
jobName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
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 21cbaacfd7e8..b18457c5db83 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
@@ -256,7 +256,6 @@ private Mono> listSinglePageAsync(String resourceG
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -267,7 +266,7 @@ private Mono> listSinglePageAsync(String resourceG
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.>map(
@@ -315,7 +314,6 @@ private Mono> listSinglePageAsync(
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -324,7 +322,7 @@ private Mono> listSinglePageAsync(
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context)
.map(
@@ -439,7 +437,6 @@ private Mono> getWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -451,7 +448,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -494,7 +491,6 @@ private Mono> getWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -504,7 +500,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -614,7 +610,6 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -626,7 +621,7 @@ private Mono>> createWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
autoStart,
parameters,
accept,
@@ -683,7 +678,6 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -693,7 +687,7 @@ private Mono>> createWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
autoStart,
parameters,
accept,
@@ -994,7 +988,6 @@ private Mono>> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1006,7 +999,7 @@ private Mono>> updateWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -1060,7 +1053,6 @@ private Mono>> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1070,7 +1062,7 @@ private Mono>> updateWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -1295,7 +1287,6 @@ private Mono>> deleteWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1307,7 +1298,7 @@ private Mono>> deleteWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -1350,7 +1341,6 @@ private Mono>> deleteWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1360,7 +1350,7 @@ private Mono>> deleteWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -1549,7 +1539,6 @@ private Mono>> allocateWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1561,7 +1550,7 @@ private Mono>> allocateWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -1604,7 +1593,6 @@ private Mono>> allocateWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1614,7 +1602,7 @@ private Mono>> allocateWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -1804,7 +1792,6 @@ private Mono>> startWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1816,7 +1803,7 @@ private Mono>> startWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -1859,7 +1846,6 @@ private Mono>> startWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1869,7 +1855,7 @@ private Mono>> startWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -2063,7 +2049,6 @@ private Mono>> stopWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -2075,7 +2060,7 @@ private Mono>> stopWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -2129,7 +2114,6 @@ private Mono>> stopWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -2139,7 +2123,7 @@ private Mono>> stopWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -2359,7 +2343,6 @@ private Mono>> resetWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -2371,7 +2354,7 @@ private Mono>> resetWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -2416,7 +2399,6 @@ private Mono>> resetWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -2426,7 +2408,7 @@ private Mono>> resetWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputsClientImpl.java
index ae1c02ba734a..411a3bf55499 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
@@ -179,7 +179,6 @@ private Mono> listSinglePageAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -191,7 +190,7 @@ private Mono> listSinglePageAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.>map(
@@ -243,7 +242,6 @@ private Mono> listSinglePageAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -253,7 +251,7 @@ private Mono> listSinglePageAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context)
.map(
@@ -379,7 +377,6 @@ private Mono> getWithResponseAsync(
if (liveOutputName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveOutputName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -392,7 +389,7 @@ private Mono> getWithResponseAsync(
accountName,
liveEventName,
liveOutputName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -439,7 +436,6 @@ private Mono> getWithResponseAsync(
if (liveOutputName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveOutputName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -450,7 +446,7 @@ private Mono> getWithResponseAsync(
accountName,
liveEventName,
liveOutputName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -568,7 +564,6 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -581,7 +576,7 @@ private Mono>> createWithResponseAsync(
accountName,
liveEventName,
liveOutputName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -640,7 +635,6 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -651,7 +645,7 @@ private Mono>> createWithResponseAsync(
accountName,
liveEventName,
liveOutputName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -910,7 +904,6 @@ private Mono>> deleteWithResponseAsync(
if (liveOutputName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveOutputName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -923,7 +916,7 @@ private Mono>> deleteWithResponseAsync(
accountName,
liveEventName,
liveOutputName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -970,7 +963,6 @@ private Mono>> deleteWithResponseAsync(
if (liveOutputName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveOutputName is required and cannot be null."));
}
- final String apiVersion = "2021-11-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -981,7 +973,7 @@ private Mono>> deleteWithResponseAsync(
accountName,
liveEventName,
liveOutputName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LocationsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LocationsClientImpl.java
index c5428aad73e7..089594fc4bbd 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
@@ -71,7 +71,7 @@ Mono> checkNameAvailability(
/**
* Checks whether the Media Service resource name is available.
*
- * @param locationName The name of the location.
+ * @param locationName Location name.
* @param parameters The request parameters.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -102,7 +102,6 @@ private Mono> checkNameAvailabi
} else {
parameters.validate();
}
- final String apiVersion = "2021-06-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -112,7 +111,7 @@ private Mono> checkNameAvailabi
this.client.getEndpoint(),
this.client.getSubscriptionId(),
locationName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -122,7 +121,7 @@ private Mono> checkNameAvailabi
/**
* Checks whether the Media Service resource name is available.
*
- * @param locationName The name of the location.
+ * @param locationName Location name.
* @param parameters The request parameters.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -154,7 +153,6 @@ private Mono> checkNameAvailabi
} else {
parameters.validate();
}
- final String apiVersion = "2021-06-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -162,7 +160,7 @@ private Mono> checkNameAvailabi
this.client.getEndpoint(),
this.client.getSubscriptionId(),
locationName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -171,7 +169,7 @@ private Mono> checkNameAvailabi
/**
* Checks whether the Media Service resource name is available.
*
- * @param locationName The name of the location.
+ * @param locationName Location name.
* @param parameters The request parameters.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -195,7 +193,7 @@ private Mono checkNameAvailabilityAsync(
/**
* Checks whether the Media Service resource name is available.
*
- * @param locationName The name of the location.
+ * @param locationName Location name.
* @param parameters The request parameters.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -211,7 +209,7 @@ public EntityNameAvailabilityCheckOutputInner checkNameAvailability(
/**
* Checks whether the Media Service resource name is available.
*
- * @param locationName The name of the location.
+ * @param locationName Location name.
* @param parameters The request parameters.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
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 6ba1c7bbfb0a..2516547e2876 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceImpl.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceImpl.java
@@ -16,6 +16,7 @@
import com.azure.resourcemanager.mediaservices.models.MediaService;
import com.azure.resourcemanager.mediaservices.models.MediaServiceIdentity;
import com.azure.resourcemanager.mediaservices.models.MediaServiceUpdate;
+import com.azure.resourcemanager.mediaservices.models.ProvisioningState;
import com.azure.resourcemanager.mediaservices.models.PublicNetworkAccess;
import com.azure.resourcemanager.mediaservices.models.StorageAccount;
import com.azure.resourcemanager.mediaservices.models.StorageAuthentication;
@@ -55,14 +56,14 @@ public Map tags() {
}
}
- public MediaServiceIdentity identity() {
- return this.innerModel().identity();
- }
-
public SystemData systemData() {
return this.innerModel().systemData();
}
+ public MediaServiceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
public UUID mediaServiceId() {
return this.innerModel().mediaServiceId();
}
@@ -92,6 +93,14 @@ public PublicNetworkAccess publicNetworkAccess() {
return this.innerModel().publicNetworkAccess();
}
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public Object privateEndpointConnections() {
+ return this.innerModel().privateEndpointConnections();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -124,8 +133,7 @@ public MediaService create() {
serviceManager
.serviceClient()
.getMediaservices()
- .createOrUpdateWithResponse(resourceGroupName, accountName, this.innerModel(), Context.NONE)
- .getValue();
+ .createOrUpdate(resourceGroupName, accountName, this.innerModel(), Context.NONE);
return this;
}
@@ -134,8 +142,7 @@ public MediaService create(Context context) {
serviceManager
.serviceClient()
.getMediaservices()
- .createOrUpdateWithResponse(resourceGroupName, accountName, this.innerModel(), context)
- .getValue();
+ .createOrUpdate(resourceGroupName, accountName, this.innerModel(), context);
return this;
}
@@ -155,8 +162,7 @@ public MediaService apply() {
serviceManager
.serviceClient()
.getMediaservices()
- .updateWithResponse(resourceGroupName, accountName, updateParameters, Context.NONE)
- .getValue();
+ .update(resourceGroupName, accountName, updateParameters, Context.NONE);
return this;
}
@@ -165,8 +171,7 @@ public MediaService apply(Context context) {
serviceManager
.serviceClient()
.getMediaservices()
- .updateWithResponse(resourceGroupName, accountName, updateParameters, context)
- .getValue();
+ .update(resourceGroupName, accountName, updateParameters, context);
return this;
}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationResultsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationResultsClientImpl.java
new file mode 100644
index 000000000000..5ac5a41b42bf
--- /dev/null
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationResultsClientImpl.java
@@ -0,0 +1,218 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mediaservices.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.mediaservices.fluent.MediaServiceOperationResultsClient;
+import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner;
+import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationResultsGetResponse;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in MediaServiceOperationResultsClient. */
+public final class MediaServiceOperationResultsClientImpl implements MediaServiceOperationResultsClient {
+ /** The proxy service used to perform REST calls. */
+ private final MediaServiceOperationResultsService service;
+
+ /** The service client containing this operation class. */
+ private final AzureMediaServicesImpl client;
+
+ /**
+ * Initializes an instance of MediaServiceOperationResultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ MediaServiceOperationResultsClientImpl(AzureMediaServicesImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ MediaServiceOperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureMediaServicesMediaServiceOperationResults to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureMediaServicesMe")
+ private interface MediaServiceOperationResultsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}"
+ + "/mediaServiceOperationResults/{operationId}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("locationName") String locationName,
+ @PathParam("operationId") String operationId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get media service operation result.
+ *
+ * @param locationName Location name.
+ * @param operationId Operation Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return media service operation result on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getWithResponseAsync(
+ String locationName, String operationId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (locationName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
+ }
+ if (operationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ locationName,
+ operationId,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get media service operation result.
+ *
+ * @param locationName Location name.
+ * @param operationId Operation Id.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return media service operation result on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getWithResponseAsync(
+ String locationName, String operationId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (locationName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
+ }
+ if (operationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ locationName,
+ operationId,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Get media service operation result.
+ *
+ * @param locationName Location name.
+ * @param operationId Operation Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return media service operation result on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String locationName, String operationId) {
+ return getWithResponseAsync(locationName, operationId)
+ .flatMap(
+ (MediaServiceOperationResultsGetResponse res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get media service operation result.
+ *
+ * @param locationName Location name.
+ * @param operationId Operation Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return media service operation result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public MediaServiceInner get(String locationName, String operationId) {
+ return getAsync(locationName, operationId).block();
+ }
+
+ /**
+ * Get media service operation result.
+ *
+ * @param locationName Location name.
+ * @param operationId Operation Id.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return media service operation result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public MediaServiceOperationResultsGetResponse getWithResponse(
+ String locationName, String operationId, Context context) {
+ return getWithResponseAsync(locationName, operationId, context).block();
+ }
+}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationResultsImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationResultsImpl.java
new file mode 100644
index 000000000000..389204d5f172
--- /dev/null
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationResultsImpl.java
@@ -0,0 +1,61 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mediaservices.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mediaservices.fluent.MediaServiceOperationResultsClient;
+import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner;
+import com.azure.resourcemanager.mediaservices.models.MediaService;
+import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationResults;
+import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationResultsGetResponse;
+
+public final class MediaServiceOperationResultsImpl implements MediaServiceOperationResults {
+ private static final ClientLogger LOGGER = new ClientLogger(MediaServiceOperationResultsImpl.class);
+
+ private final MediaServiceOperationResultsClient innerClient;
+
+ private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager;
+
+ public MediaServiceOperationResultsImpl(
+ MediaServiceOperationResultsClient innerClient,
+ com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public MediaService get(String locationName, String operationId) {
+ MediaServiceInner inner = this.serviceClient().get(locationName, operationId);
+ if (inner != null) {
+ return new MediaServiceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(String locationName, String operationId, Context context) {
+ MediaServiceOperationResultsGetResponse inner =
+ this.serviceClient().getWithResponse(locationName, operationId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new MediaServiceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private MediaServiceOperationResultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusImpl.java
new file mode 100644
index 000000000000..7eafea5d0fe8
--- /dev/null
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusImpl.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mediaservices.implementation;
+
+import com.azure.core.management.exception.ManagementError;
+import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceOperationStatusInner;
+import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationStatus;
+import java.time.OffsetDateTime;
+
+public final class MediaServiceOperationStatusImpl implements MediaServiceOperationStatus {
+ private MediaServiceOperationStatusInner innerObject;
+
+ private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager;
+
+ MediaServiceOperationStatusImpl(
+ MediaServiceOperationStatusInner innerObject,
+ com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public OffsetDateTime startTime() {
+ return this.innerModel().startTime();
+ }
+
+ public OffsetDateTime endTime() {
+ return this.innerModel().endTime();
+ }
+
+ public String status() {
+ return this.innerModel().status();
+ }
+
+ public ManagementError error() {
+ return this.innerModel().error();
+ }
+
+ public MediaServiceOperationStatusInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusesClientImpl.java
new file mode 100644
index 000000000000..bb8ebf2de608
--- /dev/null
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusesClientImpl.java
@@ -0,0 +1,220 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mediaservices.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.mediaservices.fluent.MediaServiceOperationStatusesClient;
+import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceOperationStatusInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in MediaServiceOperationStatusesClient. */
+public final class MediaServiceOperationStatusesClientImpl implements MediaServiceOperationStatusesClient {
+ /** The proxy service used to perform REST calls. */
+ private final MediaServiceOperationStatusesService service;
+
+ /** The service client containing this operation class. */
+ private final AzureMediaServicesImpl client;
+
+ /**
+ * Initializes an instance of MediaServiceOperationStatusesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ MediaServiceOperationStatusesClientImpl(AzureMediaServicesImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ MediaServiceOperationStatusesService.class,
+ client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureMediaServicesMediaServiceOperationStatuses to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureMediaServicesMe")
+ private interface MediaServiceOperationStatusesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}"
+ + "/mediaServiceOperationStatuses/{operationId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("locationName") String locationName,
+ @PathParam("operationId") String operationId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get media service operation status.
+ *
+ * @param locationName Location name.
+ * @param operationId Operation ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return media service operation status along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String locationName, String operationId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (locationName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
+ }
+ if (operationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ locationName,
+ operationId,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get media service operation status.
+ *
+ * @param locationName Location name.
+ * @param operationId Operation ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return media service operation status along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String locationName, String operationId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (locationName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
+ }
+ if (operationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ locationName,
+ operationId,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Get media service operation status.
+ *
+ * @param locationName Location name.
+ * @param operationId Operation ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return media service operation status on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String locationName, String operationId) {
+ return getWithResponseAsync(locationName, operationId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get media service operation status.
+ *
+ * @param locationName Location name.
+ * @param operationId Operation ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return media service operation status.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public MediaServiceOperationStatusInner get(String locationName, String operationId) {
+ return getAsync(locationName, operationId).block();
+ }
+
+ /**
+ * Get media service operation status.
+ *
+ * @param locationName Location name.
+ * @param operationId Operation ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return media service operation status along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String locationName, String operationId, Context context) {
+ return getWithResponseAsync(locationName, operationId, context).block();
+ }
+}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusesImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusesImpl.java
new file mode 100644
index 000000000000..5ae6a2b4382a
--- /dev/null
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceOperationStatusesImpl.java
@@ -0,0 +1,61 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mediaservices.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mediaservices.fluent.MediaServiceOperationStatusesClient;
+import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceOperationStatusInner;
+import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationStatus;
+import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationStatuses;
+
+public final class MediaServiceOperationStatusesImpl implements MediaServiceOperationStatuses {
+ private static final ClientLogger LOGGER = new ClientLogger(MediaServiceOperationStatusesImpl.class);
+
+ private final MediaServiceOperationStatusesClient innerClient;
+
+ private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager;
+
+ public MediaServiceOperationStatusesImpl(
+ MediaServiceOperationStatusesClient innerClient,
+ com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public MediaServiceOperationStatus get(String locationName, String operationId) {
+ MediaServiceOperationStatusInner inner = this.serviceClient().get(locationName, operationId);
+ if (inner != null) {
+ return new MediaServiceOperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String locationName, String operationId, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(locationName, operationId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new MediaServiceOperationStatusImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private MediaServiceOperationStatusesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesClientImpl.java
index c32636adc6d9..76f0cc430ceb 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
@@ -28,8 +28,11 @@
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.RestProxy;
import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.mediaservices.fluent.MediaservicesClient;
import com.azure.resourcemanager.mediaservices.fluent.models.EdgePoliciesInner;
import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner;
@@ -37,6 +40,8 @@
import com.azure.resourcemanager.mediaservices.models.MediaServiceCollection;
import com.azure.resourcemanager.mediaservices.models.MediaServiceUpdate;
import com.azure.resourcemanager.mediaservices.models.SyncStorageKeysInput;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in MediaservicesClient. */
@@ -100,7 +105,7 @@ Mono> getByResourceGroup(
+ "/{accountName}")
@ExpectedResponses({200, 201})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> createOrUpdate(
+ Mono>> createOrUpdate(
@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@@ -129,9 +134,9 @@ Mono> delete(
@Patch(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices"
+ "/{accountName}")
- @ExpectedResponses({200})
+ @ExpectedResponses({202})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> update(
+ Mono>> update(
@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@@ -233,7 +238,6 @@ private Mono> listByResourceGroupSinglePageAsyn
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- final String apiVersion = "2021-06-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -243,7 +247,7 @@ private Mono> listByResourceGroupSinglePageAsyn
this.client.getEndpoint(),
this.client.getSubscriptionId(),
resourceGroupName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.>map(
@@ -288,7 +292,6 @@ private Mono> listByResourceGroupSinglePageAsyn
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- final String apiVersion = "2021-06-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -296,7 +299,7 @@ private Mono> listByResourceGroupSinglePageAsyn
this.client.getEndpoint(),
this.client.getSubscriptionId(),
resourceGroupName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context)
.map(
@@ -404,7 +407,6 @@ private Mono> getByResourceGroupWithResponseAsync(
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2021-06-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -415,7 +417,7 @@ private Mono> getByResourceGroupWithResponseAsync(
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -455,7 +457,6 @@ private Mono> getByResourceGroupWithResponseAsync(
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2021-06-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -464,7 +465,7 @@ private Mono> getByResourceGroupWithResponseAsync(
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -536,7 +537,7 @@ public Response getByResourceGroupWithResponse(
* @return a Media Services account along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createOrUpdateWithResponseAsync(
+ private Mono>> createOrUpdateWithResponseAsync(
String resourceGroupName, String accountName, MediaServiceInner parameters) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -562,7 +563,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-06-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -573,7 +573,7 @@ private Mono> createOrUpdateWithResponseAsync(
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -593,7 +593,7 @@ private Mono> createOrUpdateWithResponseAsync(
* @return a Media Services account along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createOrUpdateWithResponseAsync(
+ private Mono>> createOrUpdateWithResponseAsync(
String resourceGroupName, String accountName, MediaServiceInner parameters, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -619,7 +619,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2021-06-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -628,12 +627,97 @@ private Mono> createOrUpdateWithResponseAsync(
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
}
+ /**
+ * Creates or updates a Media Services account.
+ *
+ * @param resourceGroupName The name of the resource group within the Azure subscription.
+ * @param accountName The Media Services account name.
+ * @param parameters The request parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a Media Services account.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, MediaServiceInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String accountName, MediaServiceInner parameters) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, accountName, parameters);
+ return this
+ .client
+ .