diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md b/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md index 766eee6e73bd..eb1496ad4baa 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md @@ -1,14 +1,48 @@ # Release History -## 2.1.0-beta.1 (Unreleased) +## 2.1.0-beta.1 (2022-04-14) + +- Azure Resource Manager MediaServices client library for Java. This package contains Microsoft Azure SDK for MediaServices Management SDK. This Swagger was generated by the API Framework. Package tag package-account-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +* `models.MediaServiceOperationStatuses` was added + +* `models.MediaServiceOperationResultsGetResponse` was added + +* `models.MediaservicesCreateOrUpdateResponse` was added + +* `models.MediaServiceOperationResultsGetHeaders` was added + +* `models.MediaservicesUpdateResponse` was added + +* `models.MediaservicesUpdateHeaders` was added + +* `models.MediaServiceOperationResults` was added + +* `models.MediaservicesCreateOrUpdateHeaders` was added + +* `models.MediaServiceOperationStatus` was added + +#### `MediaServicesManager` was modified + +* `authenticate(com.azure.core.http.HttpPipeline,com.azure.core.management.profile.AzureProfile)` was added +* `mediaServiceOperationResults()` was added +* `mediaServiceOperationStatuses()` was added + +#### `models.MediaService` was modified + +* `privateEndpointConnections()` was added +* `provisioningState()` was added + +#### `MediaServicesManager$Configurable` was modified + +* `withRetryOptions(com.azure.core.http.policy.RetryOptions)` was added -### Bugs Fixed +#### `models.MediaServiceUpdate` was modified -### Other Changes +* `privateEndpointConnections()` was added +* `provisioningState()` was added ## 2.0.0 (2022-03-30) diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md b/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md index 67dbe56bf97d..b56026cd5733 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md @@ -2,7 +2,7 @@ Azure Resource Manager MediaServices client library for Java. -This package contains Microsoft Azure SDK for MediaServices Management SDK. This Swagger was generated by the API Framework. Package tag package-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for MediaServices Management SDK. This Swagger was generated by the API Framework. Package tag package-account-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-mediaservices - 2.0.0 + 2.1.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/SAMPLE.md b/sdk/mediaservices/azure-resourcemanager-mediaservices/SAMPLE.md index 4f18db2aed07..295aeae7c81d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/SAMPLE.md +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/SAMPLE.md @@ -69,6 +69,14 @@ - [CheckNameAvailability](#locations_checknameavailability) +## MediaServiceOperationResults + +- [Get](#mediaserviceoperationresults_get) + +## MediaServiceOperationStatuses + +- [Get](#mediaserviceoperationstatuses_get) + ## Mediaservices - [CreateOrUpdate](#mediaservices_createorupdate) @@ -1788,7 +1796,7 @@ import com.azure.resourcemanager.mediaservices.models.CheckNameAvailabilityInput /** Samples for Locations CheckNameAvailability. */ public final class LocationsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-check-name-availability.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accounts-check-name-availability.json */ /** * Sample code: Check Name Availability. @@ -1806,13 +1814,94 @@ public final class LocationsCheckNameAvailabilitySamples { } ``` +### MediaServiceOperationResults_Get + +```java +import com.azure.core.util.Context; + +/** Samples for MediaServiceOperationResults Get. */ +public final class MediaServiceOperationResultsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/media-service-operation-result-by-id.json + */ + /** + * Sample code: Get status of asynchronous operation. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperation( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaServiceOperationResults() + .getWithResponse("westus", "6FBA62C4-99B5-4FF8-9826-FC4744A8864F", Context.NONE); + } +} +``` + +### MediaServiceOperationStatuses_Get + +```java +import com.azure.core.util.Context; + +/** Samples for MediaServiceOperationStatuses Get. */ +public final class MediaServiceOperationStatusesGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/media-service-operation-status-by-id-non-terminal-state-failed.json + */ + /** + * Sample code: Get status of asynchronous operation when it is completed with error. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsCompletedWithError( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaServiceOperationStatuses() + .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/media-service-operation-status-by-id-terminal-state.json + */ + /** + * Sample code: Get status of asynchronous operation when it is completed. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsCompleted( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaServiceOperationStatuses() + .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/media-service-operation-status-by-id-non-terminal-state.json + */ + /** + * Sample code: Get status of asynchronous operation when it is ongoing. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsOngoing( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaServiceOperationStatuses() + .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); + } +} +``` + ### Mediaservices_CreateOrUpdate ```java +import com.azure.resourcemanager.mediaservices.models.AccessControl; import com.azure.resourcemanager.mediaservices.models.AccountEncryption; import com.azure.resourcemanager.mediaservices.models.AccountEncryptionKeyType; -import com.azure.resourcemanager.mediaservices.models.KeyVaultProperties; +import com.azure.resourcemanager.mediaservices.models.DefaultAction; +import com.azure.resourcemanager.mediaservices.models.KeyDelivery; import com.azure.resourcemanager.mediaservices.models.MediaServiceIdentity; +import com.azure.resourcemanager.mediaservices.models.PublicNetworkAccess; import com.azure.resourcemanager.mediaservices.models.ResourceIdentity; import com.azure.resourcemanager.mediaservices.models.StorageAccount; import com.azure.resourcemanager.mediaservices.models.StorageAccountType; @@ -1825,7 +1914,7 @@ import java.util.Map; /** Samples for Mediaservices CreateOrUpdate. */ public final class MediaservicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-create.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/async-accounts-create.json */ /** * Sample code: Create a Media Services account. @@ -1845,9 +1934,9 @@ public final class MediaservicesCreateOrUpdateSamples { .withType("UserAssigned") .withUserAssignedIdentities( mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", new UserAssignedManagedIdentity(), - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2", new UserAssignedManagedIdentity()))) .withStorageAccounts( Arrays @@ -1859,19 +1948,20 @@ public final class MediaservicesCreateOrUpdateSamples { .withIdentity( new ResourceIdentity() .withUserAssignedIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1") .withUseSystemAssignedIdentity(false)))) .withStorageAuthentication(StorageAuthentication.MANAGED_IDENTITY) .withEncryption( new AccountEncryption() .withType(AccountEncryptionKeyType.CUSTOMER_KEY) - .withKeyVaultProperties( - new KeyVaultProperties().withKeyIdentifier("https://keyvault.vault.azure.net/keys/key1")) .withIdentity( new ResourceIdentity() .withUserAssignedIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1") .withUseSystemAssignedIdentity(false))) + .withKeyDelivery( + new KeyDelivery().withAccessControl(new AccessControl().withDefaultAction(DefaultAction.ALLOW))) + .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) .create(); } @@ -1896,7 +1986,7 @@ import com.azure.core.util.Context; /** Samples for Mediaservices Delete. */ public final class MediaservicesDeleteSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-delete.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accounts-delete.json */ /** * Sample code: Delete a Media Services account. @@ -1918,7 +2008,7 @@ import com.azure.core.util.Context; /** Samples for Mediaservices GetByResourceGroup. */ public final class MediaservicesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-get-by-name.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accounts-get-by-name.json */ /** * Sample code: Get a Media Services account by name. @@ -1940,7 +2030,7 @@ import com.azure.core.util.Context; /** Samples for Mediaservices List. */ public final class MediaservicesListSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-subscription-list-all-accounts.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accounts-subscription-list-all-accounts.json */ /** * Sample code: List all Media Services accounts. @@ -1962,7 +2052,7 @@ import com.azure.core.util.Context; /** Samples for Mediaservices ListByResourceGroup. */ public final class MediaservicesListByResourceGroupSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-list-all-accounts.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accounts-list-all-accounts.json */ /** * Sample code: List all Media Services accounts. @@ -1985,7 +2075,7 @@ import com.azure.resourcemanager.mediaservices.models.ListEdgePoliciesInput; /** Samples for Mediaservices ListEdgePolicies. */ public final class MediaservicesListEdgePoliciesSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-list-media-edge-policies.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accounts-list-media-edge-policies.json */ /** * Sample code: List the media edge policies. @@ -2013,7 +2103,7 @@ import com.azure.resourcemanager.mediaservices.models.SyncStorageKeysInput; /** Samples for Mediaservices SyncStorageKeys. */ public final class MediaservicesSyncStorageKeysSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-sync-storage-keys.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accounts-sync-storage-keys.json */ /** * Sample code: Synchronizes Storage Account Keys. @@ -2041,7 +2131,7 @@ import java.util.Map; /** Samples for Mediaservices Update. */ public final class MediaservicesUpdateSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-update.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/async-accounts-update.json */ /** * Sample code: Update a Media Services accounts. @@ -2178,7 +2268,7 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/operations-list-all.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/operations-list-all.json */ /** * Sample code: List Operations. @@ -2202,7 +2292,7 @@ import com.azure.resourcemanager.mediaservices.models.PrivateLinkServiceConnecti /** Samples for PrivateEndpointConnections CreateOrUpdate. */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-endpoint-connection-put.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/private-endpoint-connection-put.json */ /** * Sample code: Update private endpoint connection. @@ -2235,7 +2325,7 @@ import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-endpoint-connection-delete.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/private-endpoint-connection-delete.json */ /** * Sample code: Delete private endpoint connection. @@ -2259,7 +2349,7 @@ import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-endpoint-connection-get-by-name.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/private-endpoint-connection-get-by-name.json */ /** * Sample code: Get private endpoint connection. @@ -2283,7 +2373,7 @@ import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections List. */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-endpoint-connection-list.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/private-endpoint-connection-list.json */ /** * Sample code: Get all private endpoint connections. @@ -2305,7 +2395,7 @@ import com.azure.core.util.Context; /** Samples for PrivateLinkResources Get. */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-link-resources-get-by-name.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/private-link-resources-get-by-name.json */ /** * Sample code: Get details of a group ID. @@ -2326,7 +2416,7 @@ import com.azure.core.util.Context; /** Samples for PrivateLinkResources List. */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-link-resources-list.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/private-link-resources-list.json */ /** * Sample code: Get list of all group IDs. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml index 149d692fcf84..44dcf8f1f43d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for MediaServices Management - This package contains Microsoft Azure SDK for MediaServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. This Swagger was generated by the API Framework. Package tag package-2021-11. + This package contains Microsoft Azure SDK for MediaServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. This Swagger was generated by the API Framework. Package tag package-account-2021-11. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/MediaServicesManager.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/MediaServicesManager.java index 3ee30dc7c7d7..834ae6871bc5 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/MediaServicesManager.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/MediaServicesManager.java @@ -10,11 +10,13 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; @@ -31,6 +33,8 @@ import com.azure.resourcemanager.mediaservices.implementation.LiveEventsImpl; import com.azure.resourcemanager.mediaservices.implementation.LiveOutputsImpl; import com.azure.resourcemanager.mediaservices.implementation.LocationsImpl; +import com.azure.resourcemanager.mediaservices.implementation.MediaServiceOperationResultsImpl; +import com.azure.resourcemanager.mediaservices.implementation.MediaServiceOperationStatusesImpl; import com.azure.resourcemanager.mediaservices.implementation.MediaservicesImpl; import com.azure.resourcemanager.mediaservices.implementation.OperationResultsImpl; import com.azure.resourcemanager.mediaservices.implementation.OperationStatusesImpl; @@ -50,6 +54,8 @@ import com.azure.resourcemanager.mediaservices.models.LiveEvents; import com.azure.resourcemanager.mediaservices.models.LiveOutputs; import com.azure.resourcemanager.mediaservices.models.Locations; +import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationResults; +import com.azure.resourcemanager.mediaservices.models.MediaServiceOperationStatuses; import com.azure.resourcemanager.mediaservices.models.Mediaservices; import com.azure.resourcemanager.mediaservices.models.OperationResults; import com.azure.resourcemanager.mediaservices.models.OperationStatuses; @@ -82,6 +88,10 @@ public final class MediaServicesManager { private Locations locations; + private MediaServiceOperationStatuses mediaServiceOperationStatuses; + + private MediaServiceOperationResults mediaServiceOperationResults; + private Assets assets; private AssetFilters assetFilters; @@ -135,6 +145,19 @@ public static MediaServicesManager authenticate(TokenCredential credential, Azur return configure().authenticate(credential, profile); } + /** + * Creates an instance of MediaServices service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the MediaServices service API instance. + */ + public static MediaServicesManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new MediaServicesManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create MediaServicesManager with optional configuration. * @@ -153,6 +176,7 @@ public static final class Configurable { private final List policies = new ArrayList<>(); private final List 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 + .getLroResult( + mono, + this.client.getHttpPipeline(), + MediaServiceInner.class, + MediaServiceInner.class, + this.client.getContext()); + } + + /** + * 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 ManagementException 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, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, accountName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), MediaServiceInner.class, MediaServiceInner.class, 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 SyncPoller} for polling of a Media Services account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MediaServiceInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, MediaServiceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, parameters).getSyncPoller(); + } + + /** + * 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 ManagementException 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) + public SyncPoller, MediaServiceInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, MediaServiceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, parameters, context).getSyncPoller(); + } + /** * Creates or updates a Media Services account. * @@ -648,15 +732,29 @@ private Mono> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( String resourceGroupName, String accountName, MediaServiceInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return beginCreateOrUpdateAsync(resourceGroupName, accountName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * 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 ManagementException 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String accountName, MediaServiceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -686,12 +784,12 @@ public MediaServiceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) - public Response createOrUpdateWithResponse( + public MediaServiceInner createOrUpdate( String resourceGroupName, String accountName, MediaServiceInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, parameters, context).block(); + return createOrUpdateAsync(resourceGroupName, accountName, parameters, context).block(); } /** @@ -725,7 +823,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -736,7 +833,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -775,7 +872,6 @@ private Mono> deleteWithResponseAsync( 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 @@ -784,7 +880,7 @@ private Mono> deleteWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -846,7 +942,7 @@ public Response deleteWithResponse(String resourceGroupName, String accoun * @return a Media Services account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( + private Mono>> updateWithResponseAsync( String resourceGroupName, String accountName, MediaServiceUpdate parameters) { if (this.client.getEndpoint() == null) { return Mono @@ -872,7 +968,6 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -883,7 +978,7 @@ private Mono> updateWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -903,7 +998,7 @@ private Mono> updateWithResponseAsync( * @return a Media Services account along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( + private Mono>> updateWithResponseAsync( String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -929,7 +1024,6 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -938,12 +1032,96 @@ private Mono> updateWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), parameters, accept, 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 ManagementException 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> beginUpdateAsync( + String resourceGroupName, String accountName, MediaServiceUpdate parameters) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, accountName, parameters); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + MediaServiceInner.class, + MediaServiceInner.class, + this.client.getContext()); + } + + /** + * 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 ManagementException 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> beginUpdateAsync( + String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, accountName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), MediaServiceInner.class, MediaServiceInner.class, 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 ManagementException 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) + public SyncPoller, MediaServiceInner> beginUpdate( + String resourceGroupName, String accountName, MediaServiceUpdate parameters) { + return beginUpdateAsync(resourceGroupName, accountName, parameters).getSyncPoller(); + } + + /** + * 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 ManagementException 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) + public SyncPoller, MediaServiceInner> beginUpdate( + String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, accountName, parameters, context).getSyncPoller(); + } + /** * Updates an existing Media Services account. * @@ -958,15 +1136,29 @@ private Mono> updateWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( String resourceGroupName, String accountName, MediaServiceUpdate parameters) { - return updateWithResponseAsync(resourceGroupName, accountName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return beginUpdateAsync(resourceGroupName, accountName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * 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 ManagementException 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, accountName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -995,12 +1187,12 @@ public MediaServiceInner update(String resourceGroupName, String accountName, Me * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) - public Response updateWithResponse( + public MediaServiceInner update( String resourceGroupName, String accountName, MediaServiceUpdate parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, accountName, parameters, context).block(); + return updateAsync(resourceGroupName, accountName, parameters, context).block(); } /** @@ -1041,7 +1233,6 @@ private Mono> syncStorageKeysWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1052,7 +1243,7 @@ private Mono> syncStorageKeysWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -1098,7 +1289,6 @@ private Mono> syncStorageKeysWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1107,7 +1297,7 @@ private Mono> syncStorageKeysWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -1165,7 +1355,7 @@ public Response syncStorageKeysWithResponse( } /** - * 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. @@ -1202,7 +1392,6 @@ private Mono> listEdgePoliciesWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1213,7 +1402,7 @@ private Mono> listEdgePoliciesWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -1221,7 +1410,7 @@ private Mono> listEdgePoliciesWithResponseAsync( } /** - * 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. @@ -1259,7 +1448,6 @@ private Mono> listEdgePoliciesWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1268,14 +1456,14 @@ private Mono> listEdgePoliciesWithResponseAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), parameters, accept, 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. @@ -1300,7 +1488,7 @@ private Mono listEdgePoliciesAsync( } /** - * 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. @@ -1317,7 +1505,7 @@ public EdgePoliciesInner listEdgePolicies( } /** - * 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. @@ -1356,13 +1544,17 @@ private Mono> listSinglePageAsync() { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil .withContext( context -> service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context)) + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) .>map( res -> new PagedResponseBase<>( @@ -1399,11 +1591,15 @@ private Mono> listSinglePageAsync(Context conte new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context) + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) .map( res -> new PagedResponseBase<>( diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationResultsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationResultsClientImpl.java index bd8fca29ac2d..09aa6a8f0373 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationResultsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationResultsClientImpl.java @@ -114,7 +114,6 @@ private Mono getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -128,7 +127,7 @@ private Mono getWithResponseAsync( assetName, trackName, operationId, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -184,7 +183,6 @@ private Mono getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -196,7 +194,7 @@ private Mono getWithResponseAsync( assetName, trackName, operationId, - apiVersion, + this.client.getApiVersion(), accept, context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationStatusesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationStatusesClientImpl.java index 57a2cbc2525b..b71b96da0b46 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationStatusesClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationStatusesClientImpl.java @@ -114,7 +114,6 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -128,7 +127,7 @@ private Mono> getWithResponseAsync( assetName, trackName, operationId, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -184,7 +183,6 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -196,7 +194,7 @@ private Mono> getWithResponseAsync( assetName, trackName, operationId, - apiVersion, + this.client.getApiVersion(), accept, context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationsClientImpl.java index 177d48251a03..d83a84b51f7c 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/OperationsClientImpl.java @@ -76,10 +76,10 @@ private Mono> listWithResponseAsync() { new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) + .withContext( + context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -100,10 +100,9 @@ private Mono> listWithResponseAsync(Context c new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), apiVersion, accept, context); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); } /** diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateEndpointConnectionsClientImpl.java index 684bc864eb15..129c38b4031d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateEndpointConnectionsClientImpl.java @@ -123,14 +123,15 @@ Mono> delete( } /** - * 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 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} on successful completion of {@link Mono}. + * @return list of private endpoint connection associated with the specified storage account along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -154,7 +155,6 @@ private Mono> listWithRespons 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( @@ -165,14 +165,14 @@ private Mono> listWithRespons this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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. @@ -180,7 +180,8 @@ private Mono> listWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link Mono}. + * @return list of private endpoint connection associated with the specified storage account along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -204,7 +205,6 @@ private Mono> listWithRespons 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 @@ -213,20 +213,21 @@ private Mono> listWithRespons this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context); } /** - * 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 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 on successful completion of {@link Mono}. + * @return list of private endpoint connection associated with the specified storage account on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync(String resourceGroupName, String accountName) { @@ -242,14 +243,14 @@ private Mono listAsync(String resource } /** - * 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 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) public PrivateEndpointConnectionListResultInner list(String resourceGroupName, String accountName) { @@ -257,7 +258,7 @@ public PrivateEndpointConnectionListResultInner list(String resourceGroupName, S } /** - * 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. @@ -265,7 +266,8 @@ public PrivateEndpointConnectionListResultInner list(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public Response listWithResponse( @@ -274,7 +276,7 @@ public Response listWithResponse( } /** - * 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. @@ -282,7 +284,8 @@ public Response listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link Mono}. + * @return the details of a private endpoint connection along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -309,7 +312,6 @@ private Mono> getWithResponseAsync( if (name == null) { return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -321,14 +323,14 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, name, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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. @@ -337,7 +339,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link Mono}. + * @return the details of a private endpoint connection along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -364,7 +367,6 @@ private Mono> getWithResponseAsync( if (name == null) { return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -374,13 +376,13 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, name, - apiVersion, + this.client.getApiVersion(), accept, 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. @@ -388,7 +390,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. + * @return the details of a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String accountName, String name) { @@ -404,7 +406,7 @@ private Mono getAsync(String resourceGroupName, } /** - * 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. @@ -412,7 +414,7 @@ private Mono getAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PrivateEndpointConnectionInner get(String resourceGroupName, String accountName, String name) { @@ -420,7 +422,7 @@ public PrivateEndpointConnectionInner get(String resourceGroupName, String accou } /** - * 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. @@ -429,7 +431,7 @@ public PrivateEndpointConnectionInner get(String resourceGroupName, String accou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public Response getWithResponse( @@ -438,7 +440,7 @@ public Response getWithResponse( } /** - * 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. @@ -480,7 +482,6 @@ private Mono> createOrUpdateWithRespons } else { parameters.validate(); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -492,7 +493,7 @@ private Mono> createOrUpdateWithRespons resourceGroupName, accountName, name, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -500,7 +501,7 @@ private Mono> createOrUpdateWithRespons } /** - * 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. @@ -547,7 +548,6 @@ private Mono> createOrUpdateWithRespons } else { parameters.validate(); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -557,14 +557,14 @@ private Mono> createOrUpdateWithRespons resourceGroupName, accountName, name, - apiVersion, + this.client.getApiVersion(), parameters, accept, 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. @@ -590,7 +590,7 @@ private Mono createOrUpdateAsync( } /** - * 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. @@ -608,7 +608,7 @@ public PrivateEndpointConnectionInner createOrUpdate( } /** - * 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. @@ -631,7 +631,7 @@ public Response createOrUpdateWithResponse( } /** - * 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. @@ -665,7 +665,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (name == null) { return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -677,14 +676,14 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S resourceGroupName, accountName, name, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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. @@ -720,7 +719,6 @@ private Mono> deleteWithResponseAsync( if (name == null) { return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -730,13 +728,13 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, name, - apiVersion, + this.client.getApiVersion(), accept, 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. @@ -753,7 +751,7 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str } /** - * 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. @@ -768,7 +766,7 @@ public 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/implementation/PrivateLinkResourcesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateLinkResourcesClientImpl.java index c5255b1109f7..dabbd6550932 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/PrivateLinkResourcesClientImpl.java @@ -86,14 +86,14 @@ Mono> get( } /** - * 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 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} on successful completion of {@link Mono}. + * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -117,7 +117,6 @@ private Mono> listWithResponseAsync 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( @@ -128,14 +127,14 @@ private Mono> listWithResponseAsync this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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. @@ -143,7 +142,7 @@ private Mono> listWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link Mono}. + * @return a list of private link resources along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -167,7 +166,6 @@ private Mono> listWithResponseAsync 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 @@ -176,20 +174,20 @@ private Mono> listWithResponseAsync this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context); } /** - * 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 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 on successful completion of {@link Mono}. + * @return a list of private link resources on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync(String resourceGroupName, String accountName) { @@ -205,14 +203,14 @@ private Mono listAsync(String resourceGroupN } /** - * 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 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) public PrivateLinkResourceListResultInner list(String resourceGroupName, String accountName) { @@ -220,7 +218,7 @@ public PrivateLinkResourceListResultInner list(String resourceGroupName, String } /** - * 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. @@ -228,7 +226,7 @@ public PrivateLinkResourceListResultInner list(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public Response listWithResponse( @@ -237,7 +235,7 @@ public Response listWithResponse( } /** - * 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. @@ -245,7 +243,7 @@ public Response listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link Mono}. + * @return details of a group ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -272,7 +270,6 @@ private Mono> getWithResponseAsync( if (name == null) { return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -284,14 +281,14 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, name, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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. @@ -300,7 +297,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link Mono}. + * @return details of a group ID along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -327,7 +324,6 @@ private Mono> getWithResponseAsync( if (name == null) { return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); } - final String apiVersion = "2021-06-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -337,13 +333,13 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, name, - apiVersion, + this.client.getApiVersion(), accept, 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. @@ -351,7 +347,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. + * @return details of a group ID on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String accountName, String name) { @@ -367,7 +363,7 @@ private Mono getAsync(String resourceGroupName, String } /** - * 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. @@ -375,7 +371,7 @@ private Mono getAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PrivateLinkResourceInner get(String resourceGroupName, String accountName, String name) { @@ -383,7 +379,7 @@ public PrivateLinkResourceInner get(String resourceGroupName, String accountName } /** - * 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. @@ -392,7 +388,7 @@ public PrivateLinkResourceInner get(String resourceGroupName, String accountName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public Response getWithResponse( diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointsClientImpl.java index 2aed4f6b230f..4630be7a579c 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingEndpointsClientImpl.java @@ -258,7 +258,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( @@ -269,7 +268,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context)) .>map( @@ -317,7 +316,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 @@ -326,7 +324,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), accept, context) .map( @@ -442,7 +440,6 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -454,7 +451,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -498,7 +495,6 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -508,7 +504,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -620,7 +616,6 @@ private Mono>> createWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -632,7 +627,7 @@ private Mono>> createWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), autoStart, parameters, accept, @@ -690,7 +685,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 @@ -700,7 +694,7 @@ private Mono>> createWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), autoStart, parameters, accept, @@ -1009,7 +1003,6 @@ private Mono>> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1021,7 +1014,7 @@ private Mono>> updateWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -1076,7 +1069,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 @@ -1086,7 +1078,7 @@ private Mono>> updateWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -1317,7 +1309,6 @@ private Mono>> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1329,7 +1320,7 @@ private Mono>> deleteWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1373,7 +1364,6 @@ private Mono>> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1383,7 +1373,7 @@ private Mono>> deleteWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -1574,7 +1564,6 @@ private Mono> skusWithResponse return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1586,7 +1575,7 @@ private Mono> skusWithResponse resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1630,7 +1619,6 @@ private Mono> skusWithResponse return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1640,7 +1628,7 @@ private Mono> skusWithResponse resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -1742,7 +1730,6 @@ private Mono>> startWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1754,7 +1741,7 @@ private Mono>> startWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1798,7 +1785,6 @@ private Mono>> startWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1808,7 +1794,7 @@ private Mono>> startWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -1999,7 +1985,6 @@ private Mono>> stopWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2011,7 +1996,7 @@ private Mono>> stopWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -2055,7 +2040,6 @@ private Mono>> stopWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2065,7 +2049,7 @@ private Mono>> stopWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -2265,7 +2249,6 @@ private Mono>> scaleWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -2277,7 +2260,7 @@ private Mono>> scaleWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -2332,7 +2315,6 @@ private Mono>> scaleWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2342,7 +2324,7 @@ private Mono>> scaleWithResponseAsync( resourceGroupName, accountName, streamingEndpointName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorsClientImpl.java index b9470205c09c..696b72ca0a87 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingLocatorsClientImpl.java @@ -209,7 +209,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( @@ -220,7 +219,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), filter, top, orderby, @@ -276,7 +275,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 @@ -285,7 +283,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), filter, top, orderby, @@ -444,7 +442,6 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingLocatorName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -456,7 +453,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -501,7 +498,6 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingLocatorName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -511,7 +507,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -619,7 +615,6 @@ private Mono> createWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -631,7 +626,7 @@ private Mono> createWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -686,7 +681,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 @@ -696,7 +690,7 @@ private Mono> createWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -807,7 +801,6 @@ private Mono> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingLocatorName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -819,7 +812,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -863,7 +856,6 @@ private Mono> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingLocatorName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -873,7 +865,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -966,7 +958,6 @@ private Mono> listContentKeysWithResponse return Mono .error(new IllegalArgumentException("Parameter streamingLocatorName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -978,7 +969,7 @@ private Mono> listContentKeysWithResponse resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1023,7 +1014,6 @@ private Mono> listContentKeysWithResponse return Mono .error(new IllegalArgumentException("Parameter streamingLocatorName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1033,7 +1023,7 @@ private Mono> listContentKeysWithResponse resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -1136,7 +1126,6 @@ private Mono> listPathsWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingLocatorName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1148,7 +1137,7 @@ private Mono> listPathsWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1193,7 +1182,6 @@ private Mono> listPathsWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingLocatorName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1203,7 +1191,7 @@ private Mono> listPathsWithResponseAsync( resourceGroupName, accountName, streamingLocatorName, - apiVersion, + this.client.getApiVersion(), accept, context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingPoliciesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingPoliciesClientImpl.java index 92393a89510e..e59c83698045 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingPoliciesClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/StreamingPoliciesClientImpl.java @@ -174,7 +174,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( @@ -185,7 +184,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), filter, top, orderby, @@ -241,7 +240,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 @@ -250,7 +248,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), filter, top, orderby, @@ -409,7 +407,6 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingPolicyName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -421,7 +418,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -466,7 +463,6 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingPolicyName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -476,7 +472,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -583,7 +579,6 @@ private Mono> createWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -595,7 +590,7 @@ private Mono> createWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -650,7 +645,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 @@ -660,7 +654,7 @@ private Mono> createWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -771,7 +765,6 @@ private Mono> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingPolicyName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -783,7 +776,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -827,7 +820,6 @@ private Mono> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter streamingPolicyName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -837,7 +829,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, streamingPolicyName, - apiVersion, + this.client.getApiVersion(), accept, context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TracksClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TracksClientImpl.java index 2ab300f95cc0..0133704b597d 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TracksClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TracksClientImpl.java @@ -206,7 +206,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( @@ -218,7 +217,7 @@ private Mono> listSinglePageAsync( resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), accept, context)) .>map( @@ -266,7 +265,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 @@ -276,7 +274,7 @@ private Mono> listSinglePageAsync( resourceGroupName, accountName, assetName, - apiVersion, + this.client.getApiVersion(), accept, context) .map( @@ -393,7 +391,6 @@ private Mono> getWithResponseAsync( if (trackName == null) { return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -406,7 +403,7 @@ private Mono> getWithResponseAsync( accountName, assetName, trackName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -453,7 +450,6 @@ private Mono> getWithResponseAsync( if (trackName == null) { return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -464,7 +460,7 @@ private Mono> getWithResponseAsync( accountName, assetName, trackName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -577,7 +573,6 @@ private Mono>> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -590,7 +585,7 @@ private Mono>> createOrUpdateWithResponseAsync( accountName, assetName, trackName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -649,7 +644,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 @@ -660,7 +654,7 @@ private Mono>> createOrUpdateWithResponseAsync( accountName, assetName, trackName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -903,7 +897,6 @@ private Mono>> deleteWithResponseAsync( if (trackName == null) { return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -916,7 +909,7 @@ private Mono>> deleteWithResponseAsync( accountName, assetName, trackName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -963,7 +956,6 @@ private Mono>> deleteWithResponseAsync( if (trackName == null) { return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -974,7 +966,7 @@ private Mono>> deleteWithResponseAsync( accountName, assetName, trackName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -1183,7 +1175,6 @@ private Mono>> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1196,7 +1187,7 @@ private Mono>> updateWithResponseAsync( accountName, assetName, trackName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -1255,7 +1246,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 @@ -1266,7 +1256,7 @@ private Mono>> updateWithResponseAsync( accountName, assetName, trackName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -1511,7 +1501,6 @@ private Mono>> updateTrackDataWithResponseAsync( if (trackName == null) { return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1524,7 +1513,7 @@ private Mono>> updateTrackDataWithResponseAsync( accountName, assetName, trackName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1574,7 +1563,6 @@ private Mono>> updateTrackDataWithResponseAsync( if (trackName == null) { return Mono.error(new IllegalArgumentException("Parameter trackName is required and cannot be null.")); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1585,7 +1573,7 @@ private Mono>> updateTrackDataWithResponseAsync( accountName, assetName, trackName, - apiVersion, + this.client.getApiVersion(), accept, context); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsClientImpl.java index 932ee61f403e..9e61d34280ce 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsClientImpl.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/TransformsClientImpl.java @@ -189,7 +189,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( @@ -200,7 +199,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), filter, orderby, accept, @@ -253,7 +252,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 @@ -262,7 +260,7 @@ private Mono> listSinglePageAsync( this.client.getSubscriptionId(), resourceGroupName, accountName, - apiVersion, + this.client.getApiVersion(), filter, orderby, accept, @@ -410,7 +408,6 @@ private Mono> getWithResponseAsync( 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( @@ -422,7 +419,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, transformName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -465,7 +462,6 @@ private Mono> getWithResponseAsync( 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 @@ -475,7 +471,7 @@ private Mono> getWithResponseAsync( resourceGroupName, accountName, transformName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -582,7 +578,6 @@ private Mono> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -594,7 +589,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, accountName, transformName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -650,7 +645,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 @@ -660,7 +654,7 @@ private Mono> createOrUpdateWithResponseAsync( resourceGroupName, accountName, transformName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); @@ -773,7 +767,6 @@ private Mono> deleteWithResponseAsync( 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( @@ -785,7 +778,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, transformName, - apiVersion, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -828,7 +821,6 @@ private Mono> deleteWithResponseAsync( 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 @@ -838,7 +830,7 @@ private Mono> deleteWithResponseAsync( resourceGroupName, accountName, transformName, - apiVersion, + this.client.getApiVersion(), accept, context); } @@ -937,7 +929,6 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-11-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -949,7 +940,7 @@ private Mono> updateWithResponseAsync( resourceGroupName, accountName, transformName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context)) @@ -1005,7 +996,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 @@ -1015,7 +1005,7 @@ private Mono> updateWithResponseAsync( resourceGroupName, accountName, transformName, - apiVersion, + this.client.getApiVersion(), parameters, accept, context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Locations.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Locations.java index cf78def4e7b2..e15647a34dbe 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Locations.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Locations.java @@ -12,7 +12,7 @@ public interface Locations { /** * 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. @@ -24,7 +24,7 @@ public interface Locations { /** * 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/models/MediaService.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaService.java index 2fdf27b3139b..0f66b61090a9 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaService.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaService.java @@ -51,18 +51,18 @@ public interface MediaService { Map tags(); /** - * Gets the identity property: The Managed Identity for the Media Services account. + * Gets the systemData property: The system metadata relating to this resource. * - * @return the identity value. + * @return the systemData value. */ - MediaServiceIdentity identity(); + SystemData systemData(); /** - * Gets the systemData property: The system metadata relating to this resource. + * Gets the identity property: The Managed Identity for the Media Services account. * - * @return the systemData value. + * @return the identity value. */ - SystemData systemData(); + MediaServiceIdentity identity(); /** * Gets the mediaServiceId property: The Media Services account ID. @@ -107,6 +107,21 @@ public interface MediaService { */ PublicNetworkAccess publicNetworkAccess(); + /** + * Gets the provisioningState property: Provisioning state of the Media Services account. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the privateEndpointConnections property: The Private Endpoint Connections created for the Media Service + * account. + * + * @return the privateEndpointConnections value. + */ + Object privateEndpointConnections(); + /** * Gets the region of the resource. * @@ -412,7 +427,7 @@ interface WithPublicNetworkAccess { Response syncStorageKeysWithResponse(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 parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -423,7 +438,7 @@ interface WithPublicNetworkAccess { EdgePolicies listEdgePolicies(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 parameters The request parameters. * @param context The context to associate with this operation. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResults.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResults.java new file mode 100644 index 000000000000..9fab861bc18b --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResults.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of MediaServiceOperationResults. */ +public interface MediaServiceOperationResults { + /** + * 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. + */ + MediaService 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. + */ + Response getWithResponse(String locationName, String operationId, Context context); +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResultsGetHeaders.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResultsGetHeaders.java new file mode 100644 index 000000000000..f10bbd1593a8 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResultsGetHeaders.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MediaServiceOperationResultsGetHeaders model. */ +@Fluent +public final class MediaServiceOperationResultsGetHeaders { + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the MediaServiceOperationResultsGetHeaders object itself. + */ + public MediaServiceOperationResultsGetHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the MediaServiceOperationResultsGetHeaders object itself. + */ + public MediaServiceOperationResultsGetHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the MediaServiceOperationResultsGetHeaders object itself. + */ + public MediaServiceOperationResultsGetHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResultsGetResponse.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResultsGetResponse.java new file mode 100644 index 000000000000..f6f0728d9015 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationResultsGetResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner; + +/** Contains all response data for the get operation. */ +public final class MediaServiceOperationResultsGetResponse + extends ResponseBase { + /** + * Creates an instance of MediaServiceOperationResultsGetResponse. + * + * @param request the request which resulted in this MediaServiceOperationResultsGetResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public MediaServiceOperationResultsGetResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + MediaServiceInner value, + MediaServiceOperationResultsGetHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public MediaServiceInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationStatus.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationStatus.java new file mode 100644 index 000000000000..217a11fc76a0 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationStatus.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.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceOperationStatusInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of MediaServiceOperationStatus. */ +public interface MediaServiceOperationStatus { + /** + * Gets the name property: Operation identifier. + * + * @return the name value. + */ + String name(); + + /** + * Gets the id property: Operation resource ID. + * + * @return the id value. + */ + String id(); + + /** + * Gets the startTime property: Operation start time. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: Operation end time. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the error property: The error detail. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceOperationStatusInner object. + * + * @return the inner object. + */ + MediaServiceOperationStatusInner innerModel(); +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationStatuses.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationStatuses.java new file mode 100644 index 000000000000..50887fe69302 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceOperationStatuses.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of MediaServiceOperationStatuses. */ +public interface MediaServiceOperationStatuses { + /** + * 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. + */ + MediaServiceOperationStatus 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}. + */ + Response getWithResponse(String locationName, String operationId, Context context); +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceUpdate.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceUpdate.java index f2a129d5b075..79f2883e9c5e 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceUpdate.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaServiceUpdate.java @@ -209,6 +209,25 @@ public MediaServiceUpdate withPublicNetworkAccess(PublicNetworkAccess publicNetw 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/models/Mediaservices.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mediaservices.java index e6131155425b..e22564b960ee 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mediaservices.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/Mediaservices.java @@ -111,7 +111,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. @@ -124,7 +124,7 @@ Response syncStorageKeysWithResponse( EdgePolicies 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/models/MediaservicesCreateOrUpdateHeaders.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesCreateOrUpdateHeaders.java new file mode 100644 index 000000000000..3f8c55496226 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesCreateOrUpdateHeaders.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MediaservicesCreateOrUpdateHeaders model. */ +@Fluent +public final class MediaservicesCreateOrUpdateHeaders { + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the MediaservicesCreateOrUpdateHeaders object itself. + */ + public MediaservicesCreateOrUpdateHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the MediaservicesCreateOrUpdateHeaders object itself. + */ + public MediaservicesCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the MediaservicesCreateOrUpdateHeaders object itself. + */ + public MediaservicesCreateOrUpdateHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesCreateOrUpdateResponse.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesCreateOrUpdateResponse.java new file mode 100644 index 000000000000..52982b814907 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesCreateOrUpdateResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner; + +/** Contains all response data for the createOrUpdate operation. */ +public final class MediaservicesCreateOrUpdateResponse + extends ResponseBase { + /** + * Creates an instance of MediaservicesCreateOrUpdateResponse. + * + * @param request the request which resulted in this MediaservicesCreateOrUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public MediaservicesCreateOrUpdateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + MediaServiceInner value, + MediaservicesCreateOrUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public MediaServiceInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesUpdateHeaders.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesUpdateHeaders.java new file mode 100644 index 000000000000..5f58d4bd1019 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesUpdateHeaders.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The MediaservicesUpdateHeaders model. */ +@Fluent +public final class MediaservicesUpdateHeaders { + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the MediaservicesUpdateHeaders object itself. + */ + public MediaservicesUpdateHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the MediaservicesUpdateHeaders object itself. + */ + public MediaservicesUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the MediaservicesUpdateHeaders object itself. + */ + public MediaservicesUpdateHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesUpdateResponse.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesUpdateResponse.java new file mode 100644 index 000000000000..621e4ab8dbbf --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/MediaservicesUpdateResponse.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.mediaservices.fluent.models.MediaServiceInner; + +/** Contains all response data for the update operation. */ +public final class MediaservicesUpdateResponse extends ResponseBase { + /** + * Creates an instance of MediaservicesUpdateResponse. + * + * @param request the request which resulted in this MediaservicesUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public MediaservicesUpdateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + MediaServiceInner value, + MediaservicesUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public MediaServiceInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PrivateEndpointConnections.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PrivateEndpointConnections.java index 60a283a61624..9a82a7f1046b 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PrivateEndpointConnections.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PrivateEndpointConnections.java @@ -10,19 +10,19 @@ /** Resource collection API of PrivateEndpointConnections. */ public interface PrivateEndpointConnections { /** - * 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. */ PrivateEndpointConnectionListResult 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. @@ -30,13 +30,14 @@ public interface PrivateEndpointConnections { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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}. */ 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. @@ -44,12 +45,12 @@ 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. */ PrivateEndpointConnection 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. @@ -58,13 +59,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 along with {@link Response}. + * @return the details of a private endpoint connection along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String name, 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. @@ -76,7 +77,7 @@ Response getWithResponse( 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. @@ -90,30 +91,30 @@ Response getWithResponse( Response deleteWithResponse(String resourceGroupName, String accountName, String name, Context context); /** - * Get private endpoint connection. + * Get the details of a private endpoint connection. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection along with {@link Response}. + * @return the details of a private endpoint connection along with {@link Response}. */ PrivateEndpointConnection getById(String id); /** - * Get private endpoint connection. + * Get the details of a private endpoint connection. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private endpoint connection along with {@link Response}. + * @return the details of a private endpoint connection along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete private endpoint connection. + * Deletes a private endpoint connection. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -123,7 +124,7 @@ Response getWithResponse( void deleteById(String id); /** - * Delete private endpoint connection. + * Deletes a private endpoint connection. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PrivateLinkResources.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PrivateLinkResources.java index 8244d985b4a0..f7c5ce742587 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PrivateLinkResources.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/models/PrivateLinkResources.java @@ -10,19 +10,19 @@ /** Resource collection API of PrivateLinkResources. */ public interface PrivateLinkResources { /** - * 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. */ PrivateLinkResourceListResult 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. @@ -30,13 +30,13 @@ public interface PrivateLinkResources { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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}. */ 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. @@ -44,12 +44,12 @@ 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. */ PrivateLinkResource 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. @@ -58,7 +58,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}. */ Response getWithResponse( String resourceGroupName, String accountName, String name, Context context); diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LocationsCheckNameAvailabilitySamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LocationsCheckNameAvailabilitySamples.java index 664dc5d1f310..8473c05b4f9e 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LocationsCheckNameAvailabilitySamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/LocationsCheckNameAvailabilitySamples.java @@ -10,7 +10,7 @@ /** Samples for Locations CheckNameAvailability. */ public final class LocationsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-check-name-availability.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accounts-check-name-availability.json */ /** * Sample code: Check Name Availability. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaServiceOperationResultsGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaServiceOperationResultsGetSamples.java new file mode 100644 index 000000000000..ad23c6f4a7c1 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaServiceOperationResultsGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mediaservices.generated; + +import com.azure.core.util.Context; + +/** Samples for MediaServiceOperationResults Get. */ +public final class MediaServiceOperationResultsGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/media-service-operation-result-by-id.json + */ + /** + * Sample code: Get status of asynchronous operation. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperation( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaServiceOperationResults() + .getWithResponse("westus", "6FBA62C4-99B5-4FF8-9826-FC4744A8864F", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaServiceOperationStatusesGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaServiceOperationStatusesGetSamples.java new file mode 100644 index 000000000000..c1c3ba9f5c94 --- /dev/null +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaServiceOperationStatusesGetSamples.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.generated; + +import com.azure.core.util.Context; + +/** Samples for MediaServiceOperationStatuses Get. */ +public final class MediaServiceOperationStatusesGetSamples { + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/media-service-operation-status-by-id-non-terminal-state-failed.json + */ + /** + * Sample code: Get status of asynchronous operation when it is completed with error. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsCompletedWithError( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaServiceOperationStatuses() + .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/media-service-operation-status-by-id-terminal-state.json + */ + /** + * Sample code: Get status of asynchronous operation when it is completed. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsCompleted( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaServiceOperationStatuses() + .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); + } + + /* + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/media-service-operation-status-by-id-non-terminal-state.json + */ + /** + * Sample code: Get status of asynchronous operation when it is ongoing. + * + * @param manager Entry point to MediaServicesManager. + */ + public static void getStatusOfAsynchronousOperationWhenItIsOngoing( + com.azure.resourcemanager.mediaservices.MediaServicesManager manager) { + manager + .mediaServiceOperationStatuses() + .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE); + } +} diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesCreateOrUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesCreateOrUpdateSamples.java index a18192dcfc62..7cd585d7b98f 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesCreateOrUpdateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesCreateOrUpdateSamples.java @@ -4,10 +4,13 @@ package com.azure.resourcemanager.mediaservices.generated; +import com.azure.resourcemanager.mediaservices.models.AccessControl; import com.azure.resourcemanager.mediaservices.models.AccountEncryption; import com.azure.resourcemanager.mediaservices.models.AccountEncryptionKeyType; -import com.azure.resourcemanager.mediaservices.models.KeyVaultProperties; +import com.azure.resourcemanager.mediaservices.models.DefaultAction; +import com.azure.resourcemanager.mediaservices.models.KeyDelivery; import com.azure.resourcemanager.mediaservices.models.MediaServiceIdentity; +import com.azure.resourcemanager.mediaservices.models.PublicNetworkAccess; import com.azure.resourcemanager.mediaservices.models.ResourceIdentity; import com.azure.resourcemanager.mediaservices.models.StorageAccount; import com.azure.resourcemanager.mediaservices.models.StorageAccountType; @@ -20,7 +23,7 @@ /** Samples for Mediaservices CreateOrUpdate. */ public final class MediaservicesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-create.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/async-accounts-create.json */ /** * Sample code: Create a Media Services account. @@ -40,9 +43,9 @@ public static void createAMediaServicesAccount( .withType("UserAssigned") .withUserAssignedIdentities( mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", new UserAssignedManagedIdentity(), - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2", new UserAssignedManagedIdentity()))) .withStorageAccounts( Arrays @@ -54,19 +57,20 @@ public static void createAMediaServicesAccount( .withIdentity( new ResourceIdentity() .withUserAssignedIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1") .withUseSystemAssignedIdentity(false)))) .withStorageAuthentication(StorageAuthentication.MANAGED_IDENTITY) .withEncryption( new AccountEncryption() .withType(AccountEncryptionKeyType.CUSTOMER_KEY) - .withKeyVaultProperties( - new KeyVaultProperties().withKeyIdentifier("https://keyvault.vault.azure.net/keys/key1")) .withIdentity( new ResourceIdentity() .withUserAssignedIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1") .withUseSystemAssignedIdentity(false))) + .withKeyDelivery( + new KeyDelivery().withAccessControl(new AccessControl().withDefaultAction(DefaultAction.ALLOW))) + .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) .create(); } diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesDeleteSamples.java index 70a4356e767d..73f23a132460 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesDeleteSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Mediaservices Delete. */ public final class MediaservicesDeleteSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-delete.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accounts-delete.json */ /** * Sample code: Delete a Media Services account. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesGetByResourceGroupSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesGetByResourceGroupSamples.java index b4df7de3d5eb..d3cbf1856fe5 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesGetByResourceGroupSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for Mediaservices GetByResourceGroup. */ public final class MediaservicesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-get-by-name.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accounts-get-by-name.json */ /** * Sample code: Get a Media Services account by name. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListByResourceGroupSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListByResourceGroupSamples.java index c074291ba006..244716ad29b3 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListByResourceGroupSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for Mediaservices ListByResourceGroup. */ public final class MediaservicesListByResourceGroupSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-list-all-accounts.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accounts-list-all-accounts.json */ /** * Sample code: List all Media Services accounts. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListEdgePoliciesSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListEdgePoliciesSamples.java index 1f382e1a56f6..dd05a8ef1505 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListEdgePoliciesSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListEdgePoliciesSamples.java @@ -10,7 +10,7 @@ /** Samples for Mediaservices ListEdgePolicies. */ public final class MediaservicesListEdgePoliciesSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-list-media-edge-policies.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accounts-list-media-edge-policies.json */ /** * Sample code: List the media edge policies. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListSamples.java index 41089bb6a87b..2421aa94e80b 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesListSamples.java @@ -9,7 +9,7 @@ /** Samples for Mediaservices List. */ public final class MediaservicesListSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-subscription-list-all-accounts.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accounts-subscription-list-all-accounts.json */ /** * Sample code: List all Media Services accounts. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesSyncStorageKeysSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesSyncStorageKeysSamples.java index 3e0dd9d66273..aacf72fff672 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesSyncStorageKeysSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesSyncStorageKeysSamples.java @@ -10,7 +10,7 @@ /** Samples for Mediaservices SyncStorageKeys. */ public final class MediaservicesSyncStorageKeysSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-sync-storage-keys.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/accounts-sync-storage-keys.json */ /** * Sample code: Synchronizes Storage Account Keys. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesUpdateSamples.java index ca594307dc67..153287dc2138 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesUpdateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/MediaservicesUpdateSamples.java @@ -12,7 +12,7 @@ /** Samples for Mediaservices Update. */ public final class MediaservicesUpdateSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/accounts-update.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/async-accounts-update.json */ /** * Sample code: Update a Media Services accounts. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/OperationsListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/OperationsListSamples.java index 1774ac0e06d1..494d9dc54cfa 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/OperationsListSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/operations-list-all.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/operations-list-all.json */ /** * Sample code: List Operations. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index 1c483d7f832b..12dd1a95bab5 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ /** Samples for PrivateEndpointConnections CreateOrUpdate. */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-endpoint-connection-put.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/private-endpoint-connection-put.json */ /** * Sample code: Update private endpoint connection. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsDeleteSamples.java index a321d0d73d46..fbc88b9c8762 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-endpoint-connection-delete.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/private-endpoint-connection-delete.json */ /** * Sample code: Delete private endpoint connection. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsGetSamples.java index 41c490757313..4470efcdf10e 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-endpoint-connection-get-by-name.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/private-endpoint-connection-get-by-name.json */ /** * Sample code: Get private endpoint connection. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsListSamples.java index bfe9183df187..3209b083b21e 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsListSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateEndpointConnectionsListSamples.java @@ -9,7 +9,7 @@ /** Samples for PrivateEndpointConnections List. */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-endpoint-connection-list.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/private-endpoint-connection-list.json */ /** * Sample code: Get all private endpoint connections. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateLinkResourcesGetSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateLinkResourcesGetSamples.java index b8ee755c51c8..14e46a07a0f4 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateLinkResourcesGetSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateLinkResourcesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for PrivateLinkResources Get. */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-link-resources-get-by-name.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/private-link-resources-get-by-name.json */ /** * Sample code: Get details of a group ID. diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateLinkResourcesListSamples.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateLinkResourcesListSamples.java index 05d0cac912a8..b1a9798f6d4b 100644 --- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateLinkResourcesListSamples.java +++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/generated/PrivateLinkResourcesListSamples.java @@ -9,7 +9,7 @@ /** Samples for PrivateLinkResources List. */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-06-01/examples/private-link-resources-list.json + * x-ms-original-file: specification/mediaservices/resource-manager/Microsoft.Media/stable/2021-11-01/examples/private-link-resources-list.json */ /** * Sample code: Get list of all group IDs.